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