Package speakeasy :: Module speakeasy_controller :: Class ButtonProgram
[hide private]
[frames] | no frames]

Class ButtonProgram

source code

object --+
         |
        ButtonProgram

Instance Methods [hide private]
 
__init__(self, buttonLabel, textToSave, voice, ttsEngine, playOnce=True)
Create an object that holds the playback parameters for a programmed button.
source code
 
getText(self) source code
 
setText(self, newText)
Change the button program's utterance text to newText.
source code
 
getLabel(self) source code
 
getTtsEngine(self) source code
 
getVoice(self) source code
 
toXML(self) source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, buttonLabel, textToSave, voice, ttsEngine, playOnce=True)
(Constructor)

source code 

Create an object that holds the playback parameters for a programmed button. This initializer is used in two contexts. When the ui is first built, and when a button program set is reconstituted from an XML file.

Parameters:
  • buttonLabel (string) - The label on the button
  • textToSave (string) - Text to play back with this button.
  • voice (string) - The voice to use for the utterance
  • ttsEngine (string) - The text-to-speech engine to use. (e.g. "festival", or "cepstral"
  • playOnce (bool) - Whether to play the utterance just once, or several times.
Overrides: object.__init__

setText(self, newText)

source code 

Change the button program's utterance text to newText.

Parameters:
  • newText (string) - The new utterance.