Package synthDrivers :: Module sapi4 :: Class SynthDriver
[hide private]
[frames] | no frames]

Class SynthDriver

source code

                   object --+        
                            |        
baseObject.AutoPropertyObject --+    
                                |    
   synthDriverHandler.SynthDriver --+
                                    |
                                   SynthDriver

Nested Classes [hide private]

Inherited from baseObject.AutoPropertyObject: __metaclass__

Instance Methods [hide private]
 
_fetchEnginesList(self) source code
 
__init__(self)
Initialize this synth driver.
source code
 
terminate(self)
Terminate this synth driver.
source code
 
speak(self, speechSequence)
Speaks the given sequence of text and speech commands.
source code
 
cancel(self)
Silence speech immediately.
source code
 
pause(self, switch)
Pause or resume speech output.
source code
 
removeSetting(self, name) source code
 
_set_voice(self, val) source code
 
_get_voice(self) source code
OrderedDict
_getAvailableVoices(self)
fetches an ordered dictionary of voices that the synth supports.
source code
 
_get_rate(self) source code
 
_set_rate(self, val) source code
 
_get_pitch(self) source code
 
_set_pitch(self, val) source code
 
_get_volume(self) source code
 
_set_volume(self, val) source code

Inherited from synthDriverHandler.SynthDriver: getConfigSpec, isSupported, loadSettings, saveSettings, speakCharacter, speakText

Inherited from synthDriverHandler.SynthDriver (private): _getAvailableVariants, _get_availableLanguages, _get_availableVariants, _get_availableVoices, _get_inflection, _get_initialSettingsRingSetting, _get_language, _get_lastIndex, _get_supportedSettings, _get_variant, _set_inflection, _set_language, _set_variant

Inherited from baseObject.AutoPropertyObject: invalidateCache

Inherited from baseObject.AutoPropertyObject (private): _getPropertyViaCache

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
bool
check(cls)
Determine whether this synth is available.
source code

Inherited from synthDriverHandler.SynthDriver: InflectionSetting, LanguageSetting, PitchSetting, RateSetting, VariantSetting, VoiceSetting, VolumeSetting

Inherited from synthDriverHandler.SynthDriver (private): _paramToPercent, _percentToParam

Inherited from baseObject.AutoPropertyObject: invalidateCaches

Class Variables [hide private]
  name = "sapi4"
  description = "Microsoft Speech API version 4"
list or tuple of SynthSetting supportedSettings = [SynthDriver.VoiceSetting()]
The settings supported by the synthesiser.

Inherited from baseObject.AutoPropertyObject: cachePropertiesByDefault

Instance Variables [hide private]

Inherited from synthDriverHandler.SynthDriver: availableVariants, availableVoices, inflection, lastIndex, pitch, rate, variant, voice, volume

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

check(cls)
Class Method

source code 

Determine whether this synth is available. The synth will be excluded from the list of available synths if this method returns False. For example, if this synth requires installation and it is not installed, False should be returned.

Returns: bool
True if this synth is available, False if not.
Overrides: synthDriverHandler.SynthDriver.check
(inherited documentation)

__init__(self)
(Constructor)

source code 

Initialize this synth driver. This method can also set default settings for the synthesizer.

Raises:
  • Exception - If an error occurs.
Overrides: object.__init__
(inherited documentation)

terminate(self)

source code 

Terminate this synth driver. This should be used for any required clean up.

Overrides: synthDriverHandler.SynthDriver.terminate
(inherited documentation)

speak(self, speechSequence)

source code 

Speaks the given sequence of text and speech commands. This base implementation will fallback to making use of the old speakText and speakCharacter methods. But new synths should override this method to support its full functionality.

Parameters:
  • speechSequence - a list of text strings and SpeechCommand objects (such as index and parameter changes).
Overrides: synthDriverHandler.SynthDriver.speak
(inherited documentation)

cancel(self)

source code 

Silence speech immediately.

Overrides: synthDriverHandler.SynthDriver.cancel
(inherited documentation)

pause(self, switch)

source code 

Pause or resume speech output.

Parameters:
  • switch - True to pause, False to resume (unpause).
Overrides: synthDriverHandler.SynthDriver.pause
(inherited documentation)

_set_voice(self, val)

source code 
Overrides: synthDriverHandler.SynthDriver._set_voice

_get_voice(self)

source code 
Overrides: synthDriverHandler.SynthDriver._get_voice

_getAvailableVoices(self)

source code 

fetches an ordered dictionary of voices that the synth supports.

Returns: OrderedDict
an OrderedDict of VoiceInfo instances representing the available voices, keyed by ID
Overrides: synthDriverHandler.SynthDriver._getAvailableVoices
(inherited documentation)

_get_rate(self)

source code 
Overrides: synthDriverHandler.SynthDriver._get_rate

_set_rate(self, val)

source code 
Overrides: synthDriverHandler.SynthDriver._set_rate

_get_pitch(self)

source code 
Overrides: synthDriverHandler.SynthDriver._get_pitch

_set_pitch(self, val)

source code 
Overrides: synthDriverHandler.SynthDriver._set_pitch

_get_volume(self)

source code 
Overrides: synthDriverHandler.SynthDriver._get_volume

_set_volume(self, val)

source code 
Overrides: synthDriverHandler.SynthDriver._set_volume