speak ouputs the synthesized text-to-speech content of text. This should be used only when you want to speak using a different voice option than the default one otherwise inbuilt functions like echo, print should be used. Default options can be changes using setvoiceoption.
The string that needs to be processed and output
This specifies the voice that should be used to render the audio output. Currently supported options include MALE or FEMALE.
This controls whether or not the caller will be able to interrupt the speech output with a DTMF keypress or voice utterance.By default, this value is set to 0. i.e. it forces the caller to listen to entire text before being allowed to give input.
If you wish to enable it, following options can be set.
| name | description |
|---|---|
| Bit 0 | When this bit is set, the caller can interrupt the speech output. |
| Bit 1 | When set, it specifies that DTMF keypresses can be used for interruption |
| Bit 2 | When set, it specifies that Voice utterance can be used for interruption. |
Returns user input.