Text to Speech
The Text to Speech feature converts a text string to audio and plays it back. The text string to play back can be specified directly in the Start settings of the Text to Speech action (see screenshot below) or via an XPath expression. The action's Language setting is set by default to the language setting of the mobile device. It can be used to override the device's language setting. For more details, see Text to Speech action.
The Stop mode of the action, when executed stops any currently playing Text to Speech playback.
|Note:||Text to Speech playback is available on mobile devices only and cannot be simulated on MobileTogether Designer.|
Text to Speech events
The Text to Speech actions of the project properties enable actions to be set on the following events: OnTextToSpeechStarted, OnTextToSpeechError, OnTextToSpeechCompleted. These events enable further action to be taken at those points in time when these events are triggered.
XPath functions related to Text to Speech
The following text-to-speech-related MobileTogether XPath extension functions are available:
•mt-text-to-speech-is-language-available(language) as xs:boolean
•mt-text-to-speech-is-speaking() as xs:boolean
You can use these functions in XPath expressions to test whether the conditions they define are fulfilled. The action to be taken by the design can thus be made conditional on these environment variables.