TextToSpeech
Facade for performing operations on TextToSpeechEngine.
Important: This is a Public Preview API. It may be changed or removed at any time.
Constructors
Creates an instance of TextToSpeech with the default TextToSpeechEngine which is based on Android's TextToSpeech.
Creates an instance of TextToSpeech with the desired TextToSpeechEngine implementation.
Functions
Sets a listener to report on the readiness of the TextToSpeechEngine.
Changes the language which will be used to synthesize audio messages.
Substitutes the current TextToSpeechEngine with a different one. TextToSpeechEngine.close is called on TextToSpeechEngine which is being replaced.
Clears all messages from the queue.
Returns current language used to synthesize audio messages.
Checks if the specified language as represented by the Locale is available.
Synthesizes an audio message. Message queuing depends on MessageConfig.priority. If the message currently being synthesized has priority equal or higher to the audioMessage, the new message will be added to the queue (taking the priorities of queued messages into account). If the message currently being synthesized has a lower priority, it will be interrupted and audioMessage will be processed right away.
Synthesizes a tagged message. Parsing to a supported message format is done in the underlying TextToSpeechEngine. Message queuing depends on MessageConfig.priority. If the message currently being synthesized has priority equal or higher to the taggedMessage, the new message will be added to the queue (taking the priorities of queued messages into account). If the message currently being synthesized has a lower priority, it will be interrupted and taggedMessage will be processed right away.
Removes the listener that reports on the readiness of the TextToSpeechEngine.
Stops synthesizing the current AudioMessage.