This is a wrapper class for TTS strings and file names.
A class that specifies some text to say using TTS, or the name of a file to play. It also supplies functions to help configure the TTS engine and voice to use when speaking TTS. This class is used by some of the functions supplied by the high level UAS API library.
To use this class it must first be imported:
from prosody.uas import PlayableMedia
Usage example:
from prosody.uas import Hangup, Error, PlayableMedia
def main(channel, application_instance_id, file_man, my_log, application_parameters):
media = PlayableMedia(text_to_say='Good morning.', channel=channel)
Set a digit string to play.
Setting this option will replace any options that may have been previously set by text_to_say or file_to_play.
Set a file name to play.
Setting this option will replace any options that may have been previously set by text_to_say or digits_to_play.
For encryption or decryption, supply the cipher here.
Get the name of the file to play.
Get the text to say.
Also, add the TTS engine and voice to the string, if required.
Return True if a file name has been set.
Return True if some text to say has been set.
Set a TTS engine and voice. These will be added to the TTS string.
Set some text to say using TTS.
Setting this option will replace any options that may have been previously set by file_to_play or digits_to_play.
This function will also check the XML formatting of the text string and it will raise an Error exception if any errors are detected.