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