macspeechX -- Interface to the Macintosh Speech Manager on MacOSX

Availability: Macintosh.

This module provides an interface to the Macintosh Speech Manager,  allowing you to let the Macintosh utter phrases. It uses SpeechSynthesis framework of MacOSX. The module does not provide full access to all features of the Speech Manager. This module trys to imitate the macspeech module which were available on MacPython for Mac OS 9.

This module is only available on MacOSX . It has been tested on MacOSX 10.3.9 and 10.4.5. It also requires ctyps module 0.9.6 or later.Most of part of this page is based on the macspeech module manual page in the Python2.2 distribution.

Available()
Test availability of the Speech Manager extension (and, on the PowerPC, the Speech Manager shared library). Return 0 or 1.
Version()
Return the (integer) version number of the Speech Manager.
SpeakString(str)
Utter the string str using the default voice, asynchronously. This aborts any speech that may still be active from prior SpeakString() invocations.
Busy()
Return the number of speech channels busy, system-wide.
CountVoices()
Return the number of different voices available.
GetIndVoice(num)
Return a Voice object for voice number num.

Voice Objects

Voice objects contain the description of a voice. GetDescription() method fill out .desc member of the voice object.

GetGender()
Return the gender of the voice: 0 for male, 1 for female and -1 for neuter.
NewChannel()
Return a new Speech Channel object using this voice.
GetDescription()
Return a Voice Description ojbect and also set a desc member of th voice object as this description object.

Voice Description Objects

Voice description objects contain the description of voice such as gender, age and name of the voice.

Speech Channel Objects

A Speech Channel object allows you to speak strings with slightly more control than 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.

SpeakText(str)
Start uttering the given string.
Stop()
Stop babbling.
StopAt(where=_kImmediate)
Stop babbing at "where". "Where" can be one of "_kImmediate", "_kEndOfWord" or "_kEndOfSentence".
Pause(where=_kImmediate)
Pause babbing at "where". "Where" can be one of "_kImmediate", "_kEndOfWord" or "_kEndOfSentence".
Continue()
Restart babbing after "Pause()" call.
GetPitch()
Return the current pitch of the channel, as a floating-point number.
SetPitch(pitch)
Set the pitch of the channel. 
GetRate()
Get the speech rate (utterances per minute) of the channel as a floating point number.
SetRate(rate)
Set the speech rate of the channel.
Tar-gzzipped file is available here.