(py-indent-right, py-outdent-left): new commands, bound to C-c C-r and
[python/dscho.git] / Doc / libmacspeech.tex
blob737016e2a10f086278287c153ea8859cf41756ef
1 \section{Built-in module \sectcode{macspeech}}
2 \bimodindex{macspeech}
4 \renewcommand{\indexsubitem}{(in module macspeech)}
6 This module provides an interface to the Macintosh Speech Manager,
7 allowing you to let the Macintosh utter phrases. You need a version of
8 the speech manager extension (version 1 and 2 have been tested) in
9 your \code{Extensions} folder for this to work. The module does not
10 provide full access to all features of the Speech Manager yet.
12 \begin{funcdesc}{Available}{}
13 Test availability of the Speech Manager extension (and, on the
14 PowerPC, the Speech Manager shared library). Return 0 or 1.
15 \end{funcdesc}
17 \begin{funcdesc}{Version}{}
18 Return the (integer) version number of the Speech Manager.
19 \end{funcdesc}
21 \begin{funcdesc}{SpeakString}{str}
22 Utter the string \var{str} using the default voice,
23 asynchronously. This aborts any speech that may still be active from
24 prior \code{SpeakString} invocations.
25 \end{funcdesc}
27 \begin{funcdesc}{Busy}{}
28 Return the number of speech channels busy, system-wide.
29 \end{funcdesc}
31 \begin{funcdesc}{CountVoices}{}
32 Return the number of different voices available.
33 \end{funcdesc}
35 \begin{funcdesc}{GetIndVoice}{num}
36 Return a voice object for voice number \var{num}.
37 \end{funcdesc}
39 \subsection{voice objects}
40 Voice objects contain the description of a voice. It is currently not
41 yet possible to access the parameters of a voice.
43 \renewcommand{\indexsubitem}{(voice object method)}
45 \begin{funcdesc}{GetGender}{}
46 Return the gender of the voice:\ 0 for male, 1 for female and $-1$ for neuter.
47 \end{funcdesc}
49 \begin{funcdesc}{NewChannel}{}
50 Return a new speech channel object using this voice.
51 \end{funcdesc}
53 \subsection{speech channel objects}
54 A speech channel object allows you to speak strings with slightly more
55 control than \code{SpeakString()}, and allows you to use multiple
56 speakers at the same time. Please note that channel pitch and rate are
57 interrelated in some way, so that to make your Macintosh sing you will
58 have to adjust both.
60 \renewcommand{\indexsubitem}{(speech channel object method)}
61 \begin{funcdesc}{SpeakText}{str}
62 Start uttering the given string.
63 \end{funcdesc}
65 \begin{funcdesc}{Stop}{}
66 Stop babbling.
67 \end{funcdesc}
69 \begin{funcdesc}{GetPitch}{}
70 Return the current pitch of the channel, as a floating-point number.
71 \end{funcdesc}
73 \begin{funcdesc}{SetPitch}{pitch}
74 Set the pitch of the channel.
75 \end{funcdesc}
77 \begin{funcdesc}{GetRate}{}
78 Get the speech rate (utterances per minute) of the channel as a
79 floating point number.
80 \end{funcdesc}
82 \begin{funcdesc}{SetRate}{rate}
83 Set the speech rate of the channel.
84 \end{funcdesc}