TTS
The TTS (text-to-speech) features include synthesizing text into sound data as utterances and playing them. It is also possible to pause and stop playing. When your application creates a handle and prepares the TTS service by the API, the TTS daemon is invoked and connected for background work. This daemon and your application communicate as the server and the client.
Basic TTS Processes
Using TTS, you can:
- Create a handle and register callback functions.
- Create a TTS handle which is used for distinguishing your application from other applications also using the TTS.
- To get notifications about state changes, language changes, starting or finishing utterances, and errors, register callback functions.
- Add text.
- Add the text that you want to read out by the TTS module. The requested text is handled as an utterance. You can add several texts, and they are managed using a queue.
- There is a limit on the maximum text length for one utterance, and the time spent for synthesizing is dependent on the text length.
- Play, pause, and stop playback.
- Synthesize the text in the queue and play the sound data after synthesizing.
- You can also pause and stop playing. If you call the function to stop, all requested data (both the sound data and text in the queue) is deleted.
The TTS life-cycle is described in the following figure.
Figure: TTS life-cycle
Getting TTS Information
You can get the following information about the TTS:
- Get the current state of the TTS. The state is also applied as a precondition for each function.
- Get the default voice.
- In the TTS, the voice is defined as a combination of the language and the type, such as male or female.
- You can request the synthesis of the text with your own voice option by the parameter of the add text function. However, if you do not set a specific option, the TTS synthesizes the text with the default voice.
- The default voice can be changed by the TTS setting an application or by the display language changing. If the display language is changed to a non-supported language, the language of the TTS is changed to UK English.
- Get a list of supported voices to check whether the language and voice type you want are supported.