annotate Doc/mac/libmacspeech.tex @ 21467:4e35fa5d5708 legacy-trunk

Add documentation for the help() built-in; contributed by Ka-Ping Yee. This is part of SF patch #494622.
author Fred Drake <fdrake@acm.org>
date Tue, 18 Dec 2001 16:31:08 +0000
parents 70bdf84862ad
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8915
552c6b3aba3d New style section headers.
Fred Drake <fdrake@acm.org>
parents: 8715
diff changeset
1 \section{\module{macspeech} ---
10334
61224459bb09 Added \platform annotations.
Fred Drake <fdrake@acm.org>
parents: 8915
diff changeset
2 Interface to the Macintosh Speech Manager}
61224459bb09 Added \platform annotations.
Fred Drake <fdrake@acm.org>
parents: 8915
diff changeset
3
8715
c750c7a21e03 Adjusted to use the new \declaremodule \modulesynopsis \localmoduletable
Fred Drake <fdrake@acm.org>
parents: 7866
diff changeset
4 \declaremodule{builtin}{macspeech}
10334
61224459bb09 Added \platform annotations.
Fred Drake <fdrake@acm.org>
parents: 8915
diff changeset
5 \platform{Mac}
8715
c750c7a21e03 Adjusted to use the new \declaremodule \modulesynopsis \localmoduletable
Fred Drake <fdrake@acm.org>
parents: 7866
diff changeset
6 \modulesynopsis{Interface to the Macintosh Speech Manager.}
c750c7a21e03 Adjusted to use the new \declaremodule \modulesynopsis \localmoduletable
Fred Drake <fdrake@acm.org>
parents: 7866
diff changeset
7
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
8
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
9 This module provides an interface to the Macintosh Speech Manager,
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
10 \index{Macintosh Speech Manager}
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
11 \index{Speech Manager, Macintosh}
2527
815dfaa6a778 small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents: 2453
diff changeset
12 allowing you to let the Macintosh utter phrases. You need a version of
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
13 the Speech Manager extension (version 1 and 2 have been tested) in
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
14 your \file{Extensions} folder for this to work. The module does not
19875
70bdf84862ad Added a note that these are not available under Carbon (or
Jack Jansen <jack.jansen@cwi.nl>
parents: 10334
diff changeset
15 provide full access to all features of the Speech Manager.
70bdf84862ad Added a note that these are not available under Carbon (or
Jack Jansen <jack.jansen@cwi.nl>
parents: 10334
diff changeset
16
70bdf84862ad Added a note that these are not available under Carbon (or
Jack Jansen <jack.jansen@cwi.nl>
parents: 10334
diff changeset
17 This module is only available on MacOS9 and earlier in classic PPC
70bdf84862ad Added a note that these are not available under Carbon (or
Jack Jansen <jack.jansen@cwi.nl>
parents: 10334
diff changeset
18 MacPython.
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
19
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
20 \begin{funcdesc}{Available}{}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
21 Test availability of the Speech Manager extension (and, on the
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
22 PowerPC, the Speech Manager shared library). Return \code{0} or
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
23 \code{1}.
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
24 \end{funcdesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
25
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
26 \begin{funcdesc}{Version}{}
2527
815dfaa6a778 small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents: 2453
diff changeset
27 Return the (integer) version number of the Speech Manager.
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
28 \end{funcdesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
29
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
30 \begin{funcdesc}{SpeakString}{str}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
31 Utter the string \var{str} using the default voice,
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
32 asynchronously. This aborts any speech that may still be active from
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
33 prior \function{SpeakString()} invocations.
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
34 \end{funcdesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
35
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
36 \begin{funcdesc}{Busy}{}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
37 Return the number of speech channels busy, system-wide.
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
38 \end{funcdesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
39
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
40 \begin{funcdesc}{CountVoices}{}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
41 Return the number of different voices available.
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
42 \end{funcdesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
43
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
44 \begin{funcdesc}{GetIndVoice}{num}
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
45 Return a \pytype{Voice} object for voice number \var{num}.
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
46 \end{funcdesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
47
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
48 \subsection{Voice Objects}
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
49 \label{voice-objects}
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
50
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
51 Voice objects contain the description of a voice. It is currently not
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
52 yet possible to access the parameters of a voice.
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
53
7277
bf4e790bd61a Remove all \bcode / \ecode cruft; this is no longer needed. See previous
Fred Drake <fdrake@acm.org>
parents: 6647
diff changeset
54 \setindexsubitem{(voice object method)}
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
55
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
56 \begin{methoddesc}[Voice]{GetGender}{}
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
57 Return the gender of the voice: \code{0} for male, \code{1} for female
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
58 and \code{-1} for neuter.
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
59 \end{methoddesc}
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
60
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
61 \begin{methoddesc}[Voice]{NewChannel}{}
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
62 Return a new Speech Channel object using this voice.
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
63 \end{methoddesc}
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
64
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
65 \subsection{Speech Channel Objects}
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
66 \label{speech-channel-objects}
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
67
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
68 A Speech Channel object allows you to speak strings with slightly more
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
69 control than \function{SpeakString()}, and allows you to use multiple
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
70 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
71 interrelated in some way, so that to make your Macintosh sing you will
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
72 have to adjust both.
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
73
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
74 \begin{methoddesc}[Speech Channel]{SpeakText}{str}
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
75 Start uttering the given string.
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
76 \end{methoddesc}
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
77
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
78 \begin{methoddesc}[Speech Channel]{Stop}{}
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
79 Stop babbling.
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
80 \end{methoddesc}
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
81
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
82 \begin{methoddesc}[Speech Channel]{GetPitch}{}
2527
815dfaa6a778 small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents: 2453
diff changeset
83 Return the current pitch of the channel, as a floating-point number.
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
84 \end{methoddesc}
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
85
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
86 \begin{methoddesc}[Speech Channel]{SetPitch}{pitch}
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
87 Set the pitch of the channel.
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
88 \end{methoddesc}
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
89
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
90 \begin{methoddesc}[Speech Channel]{GetRate}{}
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
91 Get the speech rate (utterances per minute) of the channel as a
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
92 floating point number.
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
93 \end{methoddesc}
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
94
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
95 \begin{methoddesc}[Speech Channel]{SetRate}{rate}
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
96 Set the speech rate of the channel.
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
97 \end{methoddesc}
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
98