0
0
mirror of https://github.com/python/cpython.git synced 2024-11-28 16:45:42 +01:00
cpython/Doc/mac/libmacspeech.tex

97 lines
2.9 KiB
TeX
Raw Normal View History

1998-08-10 20:40:22 +02:00
\section{\module{macspeech} ---
1999-03-02 17:37:17 +01:00
Interface to the Macintosh Speech Manager}
1999-03-02 17:37:17 +01:00
\declaremodule{builtin}{macspeech}
\platform{Mac}
\modulesynopsis{Interface to the Macintosh Speech Manager.}
1995-02-28 16:46:09 +01:00
This module provides an interface to the Macintosh Speech Manager,
1998-04-04 08:23:02 +02:00
\index{Macintosh Speech Manager}
\index{Speech Manager, Macintosh}
1995-03-13 11:03:32 +01:00
allowing you to let the Macintosh utter phrases. You need a version of
1998-04-04 08:23:02 +02:00
the Speech Manager extension (version 1 and 2 have been tested) in
your \file{Extensions} folder for this to work. The module does not
1995-04-10 13:34:00 +02:00
provide full access to all features of the Speech Manager yet. It may
not be available in all Mac Python versions.
1995-02-28 16:46:09 +01:00
\begin{funcdesc}{Available}{}
Test availability of the Speech Manager extension (and, on the
1998-04-04 08:23:02 +02:00
PowerPC, the Speech Manager shared library). Return \code{0} or
\code{1}.
1995-02-28 16:46:09 +01:00
\end{funcdesc}
\begin{funcdesc}{Version}{}
1995-03-13 11:03:32 +01:00
Return the (integer) version number of the Speech Manager.
1995-02-28 16:46:09 +01:00
\end{funcdesc}
\begin{funcdesc}{SpeakString}{str}
Utter the string \var{str} using the default voice,
asynchronously. This aborts any speech that may still be active from
1998-04-04 08:23:02 +02:00
prior \function{SpeakString()} invocations.
1995-02-28 16:46:09 +01:00
\end{funcdesc}
\begin{funcdesc}{Busy}{}
Return the number of speech channels busy, system-wide.
\end{funcdesc}
\begin{funcdesc}{CountVoices}{}
Return the number of different voices available.
\end{funcdesc}
\begin{funcdesc}{GetIndVoice}{num}
1998-04-04 08:23:02 +02:00
Return a \pytype{Voice} object for voice number \var{num}.
1995-02-28 16:46:09 +01:00
\end{funcdesc}
1998-04-04 08:23:02 +02:00
\subsection{Voice Objects}
\label{voice-objects}
1995-02-28 16:46:09 +01:00
Voice objects contain the description of a voice. It is currently not
yet possible to access the parameters of a voice.
\setindexsubitem{(voice object method)}
1995-02-28 16:46:09 +01:00
1998-04-04 08:23:02 +02:00
\begin{methoddesc}[Voice]{GetGender}{}
Return the gender of the voice: \code{0} for male, \code{1} for female
and \code{-1} for neuter.
\end{methoddesc}
1995-02-28 16:46:09 +01:00
1998-04-04 08:23:02 +02:00
\begin{methoddesc}[Voice]{NewChannel}{}
Return a new Speech Channel object using this voice.
\end{methoddesc}
1995-02-28 16:46:09 +01:00
1998-04-04 08:23:02 +02:00
\subsection{Speech Channel Objects}
\label{speech-channel-objects}
A Speech Channel object allows you to speak strings with slightly more
control than \function{SpeakString()}, and allows you to use multiple
1995-02-28 16:46:09 +01:00
speakers at the same time. Please note that channel pitch and rate are
1995-03-13 11:03:32 +01:00
interrelated in some way, so that to make your Macintosh sing you will
1995-02-28 16:46:09 +01:00
have to adjust both.
1998-04-04 08:23:02 +02:00
\begin{methoddesc}[Speech Channel]{SpeakText}{str}
1995-02-28 16:46:09 +01:00
Start uttering the given string.
1998-04-04 08:23:02 +02:00
\end{methoddesc}
1995-02-28 16:46:09 +01:00
1998-04-04 08:23:02 +02:00
\begin{methoddesc}[Speech Channel]{Stop}{}
1995-02-28 16:46:09 +01:00
Stop babbling.
1998-04-04 08:23:02 +02:00
\end{methoddesc}
1995-02-28 16:46:09 +01:00
1998-04-04 08:23:02 +02:00
\begin{methoddesc}[Speech Channel]{GetPitch}{}
1995-03-13 11:03:32 +01:00
Return the current pitch of the channel, as a floating-point number.
1998-04-04 08:23:02 +02:00
\end{methoddesc}
1995-02-28 16:46:09 +01:00
1998-04-04 08:23:02 +02:00
\begin{methoddesc}[Speech Channel]{SetPitch}{pitch}
1995-02-28 16:46:09 +01:00
Set the pitch of the channel.
1998-04-04 08:23:02 +02:00
\end{methoddesc}
1995-02-28 16:46:09 +01:00
1998-04-04 08:23:02 +02:00
\begin{methoddesc}[Speech Channel]{GetRate}{}
1995-02-28 16:46:09 +01:00
Get the speech rate (utterances per minute) of the channel as a
floating point number.
1998-04-04 08:23:02 +02:00
\end{methoddesc}
1995-02-28 16:46:09 +01:00
1998-04-04 08:23:02 +02:00
\begin{methoddesc}[Speech Channel]{SetRate}{rate}
1995-02-28 16:46:09 +01:00
Set the speech rate of the channel.
1998-04-04 08:23:02 +02:00
\end{methoddesc}
1995-02-28 16:46:09 +01:00