blob: 737016e2a10f086278287c153ea8859cf41756ef [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,
Guido van Rossum6bb1adc1995-03-13 10:03:32 +00007allowing you to let the Macintosh utter phrases. You need a version of
Jack Jansene4be9be1995-02-28 15:46:09 +00008the 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
Guido van Rossum6bb1adc1995-03-13 10:03:32 +000014PowerPC, the Speech Manager shared library). Return 0 or 1.
Jack Jansene4be9be1995-02-28 15:46:09 +000015\end{funcdesc}
16
17\begin{funcdesc}{Version}{}
Guido van Rossum6bb1adc1995-03-13 10:03:32 +000018Return the (integer) version number of the Speech Manager.
Jack Jansene4be9be1995-02-28 15:46:09 +000019\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}{}
Guido van Rossum6bb1adc1995-03-13 10:03:32 +000046Return the gender of the voice:\ 0 for male, 1 for female and $-1$ for neuter.
Jack Jansene4be9be1995-02-28 15:46:09 +000047\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
Guido van Rossum6bb1adc1995-03-13 10:03:32 +000057interrelated in some way, so that to make your Macintosh sing you will
Jack Jansene4be9be1995-02-28 15:46:09 +000058have 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}{}
Guido van Rossum6bb1adc1995-03-13 10:03:32 +000070Return the current pitch of the channel, as a floating-point number.
Jack Jansene4be9be1995-02-28 15:46:09 +000071\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