| |
Methods defined here:
- __init__(self, driver, iid)
- decreaseSpeechPitch(self, step=0.5)
- Decreases the speech pitch for the default voice.
Arguments:
- step: the pitch step decrement.
- decreaseSpeechRate(self, step=5)
- Decreases the rate of speech for the given ACSS. If
acssName is None, the rate decrease will be applied to all
known ACSSs.
[[[TODO: WDW - this is a hack for now. Need to take min/max
values in account, plus also need to take into account that
different engines provide different rate ranges.]]]
Arguments:
-acssName: the ACSS whose speech rate should be decreased
- getInfo(self)
- Returns [driverName, serverId]
- getVoiceFamilies(self)
- Returns a list of speechserver.VoiceFamily instances
representing all the voice families known by the speech server.
- increaseSpeechPitch(self, step=0.5)
- Increases the speech pitch for the default voice.
Arguments:
- step: the pitch step increment.
- increaseSpeechRate(self, step=5)
- Increases the speech rate.
[[[TODO: WDW - this is a hack for now. Need to take min/max
values in account, plus also need to take into account that
different engines provide different rate ranges.]]]
- isSpeaking(self)
- "Returns True if the system is currently speaking.
- notify(self, type, id, offset)
- Called by GNOME Speech when the GNOME Speech driver generates
a callback. This is for internal use only.
Arguments:
- type: one of GNOME.Speech.speech_callback_speech_started,
GNOME.Speech.speech_callback_speech_progress,
GNOME.Speech.speech_callback_speech_ended
- id: the id of the utterance (returned by say)
- offset: the character offset into the utterance (for progress)
- queueSilence(self, duration=50)
- Adds silence to the queue.
Output is produced by the next call to speak.
- queueText(self, text='', acss=None)
- Adds the text to the queue.
Arguments:
- text: text to be spoken
- acss: acss.ACSS instance; if None,
the default voice settings will be used.
Otherwise, the acss settings will be
used to augment/override the default
voice settings.
Output is produced by the next call to speak.
- queueTone(self, pitch=440, duration=50)
- Adds a tone to the queue.
Output is produced by the next call to speak.
- reset(self, text=None, acss=None)
- Resets the speech engine.
- sayAll(self, utteranceIterator, progressCallback)
- Iterates through the given utteranceIterator, speaking
each utterance one at a time.
Arguments:
- utteranceIterator: iterator/generator whose next() function
returns a new string to be spoken
- progressCallback: called as progress is made
- shutdown(self)
- Shuts down the speech engine.
- speak(self, text=None, acss=None, interrupt=True)
- Speaks all queued text immediately. If text is not None,
it is added to the queue before speaking.
Arguments:
- text: optional text to add to the queue before speaking
- acss: acss.ACSS instance; if None,
the default voice settings will be used.
Otherwise, the acss settings will be
used to augment/override the default
voice settings.
- interrupt: if True, stops any speech in progress before
speaking the text
- speakCharacter(self, character, acss=None)
- Speaks a single character immediately.
Arguments:
- character: text to be spoken
- acss: acss.ACSS instance; if None,
the default voice settings will be used.
Otherwise, the acss settings will be
used to augment/override the default
voice settings.
- speakUtterances(self, list, acss=None, interrupt=True)
- Speaks the given list of utterances immediately.
Arguments:
- list: list of strings to be spoken
- acss: acss.ACSS instance; if None,
the default voice settings will be used.
Otherwise, the acss settings will be
used to augment/override the default
voice settings.
- interrupt: if True, stop any speech currently in progress.
- stop(self)
- Stops ongoing speech and flushes the queue.
Static methods defined here:
- getFactoryName()
- Returns a localized name describing this factory.
- getSpeechServer(info=None)
- Gets a given SpeechServer based upon the info.
See SpeechServer.getInfo() for more info.
- getSpeechServers()
- Gets available speech servers as a list. The caller
is responsible for calling the shutdown() method of each
speech server returned.
- shutdownActiveServers()
- Cleans up and shuts down this factory.
|