IviTextToSpeech
Synthesizes speech from text (TTS) for immediate playback.
Note: Due to engine initialization after creating this object, any speak calls can only be made once available has been set to 'true'.
Currently, IviTextToSpeech abandons focus when the current utterance ID matches the one of the last TextToSpeech.speak operation and the last TTS operation has finished. Since it is possible to play audio from different Android apps, it is required to check whether the audio focus is granted or not:
When the audio focus is AudioManager.AUDIOFOCUS_REQUEST_GRANTED, then it is allowed to proceed with TextToSpeech.speak.
When the audio focus is not granted, this object will not allow to proceed with TextToSpeech.speak.
If there is an ongoing TextToSpeech.speak operation and the audio focus is lost, the speaking operation is then interrupted.
Note: When speaking is 'true', any speak action will be queued inside the speech engine.
When you are done using the IviTextToSpeech instance, call the shutdown method to release the native resources used by the IviTextToSpeech engine.
Types
Properties
Functions
Plays the specified text using text-to-speech and returns the asynchronous job. If the job is canceled, the utterance will be stopped.
Plays the specified text asynchronously using text-to-speech. If any other utterance that was initiated by the same object is running, it will be stopped.
Stops playing the current utterance.