cpython-withatomic / Doc / libmacspeech.tex

The branch 'legacy-trunk' does not exist.
\section{Built-in Module \sectcode{macspeech}}

\renewcommand{\indexsubitem}{(in module macspeech)}

This module provides an interface to the Macintosh Speech Manager,
allowing you to let the Macintosh utter phrases. You need a version of
the speech manager extension (version 1 and 2 have been tested) in
your \code{Extensions} folder for this to work. The module does not
provide full access to all features of the Speech Manager yet.  It may
not be available in all Mac Python versions.

Test availability of the Speech Manager extension (and, on the
PowerPC, the Speech Manager shared library). Return 0 or 1. 

Return the (integer) version number of the Speech Manager.

Utter the string \var{str} using the default voice,
asynchronously. This aborts any speech that may still be active from
prior \code{SpeakString} invocations.

Return the number of speech channels busy, system-wide.

Return the number of different voices available.

Return a voice object for voice number \var{num}.

\subsection{voice objects}
Voice objects contain the description of a voice. It is currently not
yet possible to access the parameters of a voice.

\renewcommand{\indexsubitem}{(voice object method)}

Return the gender of the voice:\ 0 for male, 1 for female and $-1$ for neuter.

Return a new speech channel object using this voice.

\subsection{speech channel objects}
A speech channel object allows you to speak strings with slightly more
control than \code{SpeakString()}, and allows you to use multiple
speakers at the same time. Please note that channel pitch and rate are
interrelated in some way, so that to make your Macintosh sing you will
have to adjust both.

\renewcommand{\indexsubitem}{(speech channel object method)}
Start uttering the given string.

Stop babbling.

Return the current pitch of the channel, as a floating-point number.

Set the pitch of the channel.

Get the speech rate (utterances per minute) of the channel as a
floating point number.

Set the speech rate of the channel.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.