Altova MobileTogether Designer

Text to Speech

Home Prev Top Next

The Text to Speech action, when set to Start (see screenshot below), converts a text string to speech and plays it back. The text string is either entered directly in an XPath expression or is taken from a node that is selected via an XPath expression. The screenshot below envisions a situation in which, when the main page is loaded, a greeting is played back in the language of the mobile device. The text of the greeting is taken from the Greeting element that has a language attribute with a value that matches the language setting of the mobile device.

MTActionTextToSpeechStart

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. This can be required, for example, if the text string is in a specific language and the conversion has to be attempted in that specific language rather than the language of the mobile device. The value of the Language setting is obtained via an XPath expression. Values must be in the Language-Country format, for example: en-US, en-UK, de-DE, es-US, fr-CH.

 

Note:If you enter more than one Text to Speech action, then the last one in sequential order is used.

 

Note:Text to Speech playback is available on mobile devices only and cannot be simulated on MobileTogether Designer.

 

Additional Text to Speech actions

Text to Speech functionality can be extended by using the additional Text to Speech actions of the project properties of the design. For an overview of Text to Speech functionality, see the section Audio, Video | Text to Speech.

 

Stopping a Text to Speech action

While a Text to Speech playback is running, it can be stopped by using the Stop function of the Text to Speech action (see screenshot below). When the action is triggered, any Text to Speech playback that is running at that time will be stopped. No specific text needs to be specified.

MTActionTextToSpeechStop
Note:Only one Text to Speech playback can be running at a time.

 

MobileTogether extension functions

MobileTogether provides a range of XPath extension functions that have been specifically created for use in MobileTogether designs. Some functions can be particularly useful with specific actions. For example, mt-available-languages() returns the languages in which the solution is available and could, for example, be used with the Message Box action. If a function is especially relevant to this action, it is listed below. For a full list of extension functions and their descriptions, see the topic MobileTogether Extension Functions.

 

© 2018-2024 Altova GmbH