1 \section{\module{macspeech
} ---
2 Interface to the Macintosh Speech Manager
}
4 \declaremodule{builtin
}{macspeech
}
6 \modulesynopsis{Interface to the Macintosh Speech Manager.
}
9 This module provides an interface to the Macintosh Speech Manager,
10 \index{Macintosh Speech Manager
}
11 \index{Speech Manager, Macintosh
}
12 allowing you to let the Macintosh utter phrases. You need a version of
13 the Speech Manager extension (version
1 and
2 have been tested) in
14 your
\file{Extensions
} folder for this to work. The module does not
15 provide full access to all features of the Speech Manager.
17 This module is only available on MacOS9 and earlier in classic PPC
20 \begin{funcdesc
}{Available
}{}
21 Test availability of the Speech Manager extension (and, on the
22 PowerPC, the Speech Manager shared library). Return
\code{0} or
26 \begin{funcdesc
}{Version
}{}
27 Return the (integer) version number of the Speech Manager.
30 \begin{funcdesc
}{SpeakString
}{str
}
31 Utter the string
\var{str
} using the default voice,
32 asynchronously. This aborts any speech that may still be active from
33 prior
\function{SpeakString()
} invocations.
36 \begin{funcdesc
}{Busy
}{}
37 Return the number of speech channels busy, system-wide.
40 \begin{funcdesc
}{CountVoices
}{}
41 Return the number of different voices available.
44 \begin{funcdesc
}{GetIndVoice
}{num
}
45 Return a
\pytype{Voice
} object for voice number
\var{num
}.
48 \subsection{Voice Objects
}
51 Voice objects contain the description of a voice. It is currently not
52 yet possible to access the parameters of a voice.
54 \setindexsubitem{(voice object method)
}
56 \begin{methoddesc
}[Voice
]{GetGender
}{}
57 Return the gender of the voice:
\code{0} for male,
\code{1} for female
58 and
\code{-
1} for neuter.
61 \begin{methoddesc
}[Voice
]{NewChannel
}{}
62 Return a new Speech Channel object using this voice.
65 \subsection{Speech Channel Objects
}
66 \label{speech-channel-objects
}
68 A Speech Channel object allows you to speak strings with slightly more
69 control than
\function{SpeakString()
}, and allows you to use multiple
70 speakers at the same time. Please note that channel pitch and rate are
71 interrelated in some way, so that to make your Macintosh sing you will
74 \begin{methoddesc
}[Speech Channel
]{SpeakText
}{str
}
75 Start uttering the given string.
78 \begin{methoddesc
}[Speech Channel
]{Stop
}{}
82 \begin{methoddesc
}[Speech Channel
]{GetPitch
}{}
83 Return the current pitch of the channel, as a floating-point number.
86 \begin{methoddesc
}[Speech Channel
]{SetPitch
}{pitch
}
87 Set the pitch of the channel.
90 \begin{methoddesc
}[Speech Channel
]{GetRate
}{}
91 Get the speech rate (utterances per minute) of the channel as a
92 floating point number.
95 \begin{methoddesc
}[Speech Channel
]{SetRate
}{rate
}
96 Set the speech rate of the channel.