Mercurial > cpython-lru_cache-weakref
annotate Doc/libmacspeech.tex @ 5817:48b94de85bf3 legacy-trunk
Extensive changes by AMK.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 17 Jul 1997 16:29:42 +0000 |
| parents | 9b7e6d9a528d |
| children | 3468ea8645ca |
| rev | line source |
|---|---|
|
2576
f47bc5554418
mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents:
2527
diff
changeset
|
1 \section{Built-in Module \sectcode{macspeech}} |
| 2452 | 2 \bimodindex{macspeech} |
| 3 | |
|
2453
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2452
diff
changeset
|
4 \renewcommand{\indexsubitem}{(in module macspeech)} |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2452
diff
changeset
|
5 |
| 2452 | 6 This module provides an interface to the Macintosh Speech Manager, |
|
2527
815dfaa6a778
small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents:
2453
diff
changeset
|
7 allowing you to let the Macintosh utter phrases. You need a version of |
| 2452 | 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 | |
|
2647
9b7e6d9a528d
typos, layout and other small things
Guido van Rossum <guido@python.org>
parents:
2576
diff
changeset
|
10 provide full access to all features of the Speech Manager yet. It may |
|
9b7e6d9a528d
typos, layout and other small things
Guido van Rossum <guido@python.org>
parents:
2576
diff
changeset
|
11 not be available in all Mac Python versions. |
| 2452 | 12 |
| 13 \begin{funcdesc}{Available}{} | |
| 14 Test availability of the Speech Manager extension (and, on the | |
|
2527
815dfaa6a778
small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents:
2453
diff
changeset
|
15 PowerPC, the Speech Manager shared library). Return 0 or 1. |
| 2452 | 16 \end{funcdesc} |
| 17 | |
| 18 \begin{funcdesc}{Version}{} | |
|
2527
815dfaa6a778
small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents:
2453
diff
changeset
|
19 Return the (integer) version number of the Speech Manager. |
| 2452 | 20 \end{funcdesc} |
| 21 | |
| 22 \begin{funcdesc}{SpeakString}{str} | |
| 23 Utter the string \var{str} using the default voice, | |
| 24 asynchronously. This aborts any speech that may still be active from | |
| 25 prior \code{SpeakString} invocations. | |
| 26 \end{funcdesc} | |
| 27 | |
| 28 \begin{funcdesc}{Busy}{} | |
| 29 Return the number of speech channels busy, system-wide. | |
| 30 \end{funcdesc} | |
| 31 | |
| 32 \begin{funcdesc}{CountVoices}{} | |
| 33 Return the number of different voices available. | |
| 34 \end{funcdesc} | |
| 35 | |
| 36 \begin{funcdesc}{GetIndVoice}{num} | |
| 37 Return a voice object for voice number \var{num}. | |
| 38 \end{funcdesc} | |
| 39 | |
| 40 \subsection{voice objects} | |
| 41 Voice objects contain the description of a voice. It is currently not | |
| 42 yet possible to access the parameters of a voice. | |
| 43 | |
| 44 \renewcommand{\indexsubitem}{(voice object method)} | |
| 45 | |
| 46 \begin{funcdesc}{GetGender}{} | |
|
2527
815dfaa6a778
small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents:
2453
diff
changeset
|
47 Return the gender of the voice:\ 0 for male, 1 for female and $-1$ for neuter. |
| 2452 | 48 \end{funcdesc} |
| 49 | |
| 50 \begin{funcdesc}{NewChannel}{} | |
| 51 Return a new speech channel object using this voice. | |
| 52 \end{funcdesc} | |
| 53 | |
| 54 \subsection{speech channel objects} | |
| 55 A speech channel object allows you to speak strings with slightly more | |
| 56 control than \code{SpeakString()}, and allows you to use multiple | |
| 57 speakers at the same time. Please note that channel pitch and rate are | |
|
2527
815dfaa6a778
small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents:
2453
diff
changeset
|
58 interrelated in some way, so that to make your Macintosh sing you will |
| 2452 | 59 have to adjust both. |
| 60 | |
| 61 \renewcommand{\indexsubitem}{(speech channel object method)} | |
| 62 \begin{funcdesc}{SpeakText}{str} | |
| 63 Start uttering the given string. | |
| 64 \end{funcdesc} | |
| 65 | |
| 66 \begin{funcdesc}{Stop}{} | |
| 67 Stop babbling. | |
| 68 \end{funcdesc} | |
| 69 | |
| 70 \begin{funcdesc}{GetPitch}{} | |
|
2527
815dfaa6a778
small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents:
2453
diff
changeset
|
71 Return the current pitch of the channel, as a floating-point number. |
| 2452 | 72 \end{funcdesc} |
| 73 | |
| 74 \begin{funcdesc}{SetPitch}{pitch} | |
| 75 Set the pitch of the channel. | |
| 76 \end{funcdesc} | |
| 77 | |
| 78 \begin{funcdesc}{GetRate}{} | |
| 79 Get the speech rate (utterances per minute) of the channel as a | |
| 80 floating point number. | |
| 81 \end{funcdesc} | |
| 82 | |
| 83 \begin{funcdesc}{SetRate}{rate} | |
| 84 Set the speech rate of the channel. | |
| 85 \end{funcdesc} | |
| 86 |
