Colibrio Tts Synthesizer
class ColibrioTtsSynthesizer(textToSpeech: TextToSpeech) : UtteranceProgressListener, TtsSynthesizer, CoroutineScope
A TtsSynthesizer implementation based on the Android Text to speech API android.speech.tts.TextToSpeech.
To customize the language and voice used, see onBeforeSpeak.
Constructors
Types
Functions
Link copied to clipboard
Add the utterance to the queue of utterances to speak.
Link copied to clipboard
The implementation must stop any current playing utterance and set itself in paused state. It should then clear the queue of utterances to speak.
Link copied to clipboard
Called before any other method to register a callbacks instance used for reporting progress, etc.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Will be called by the SyncMediaPlayer when its playbackRate has been changed.
Properties
Link copied to clipboard
Assign a function to this field to receive a callback before a text segment is passed to TextToSpeech.speak.
Extensions
Link copied to clipboard
fun <T> CoroutineScope.convertToCallbacks(block: suspend () -> ColibrioResult<T>, onSuccess: (T) -> Unit, onError: (ColibrioException) -> Unit)
fun <T> CoroutineScope.convertToCallbacks(block: suspend () -> ColibrioResult<T>, onSuccess: () -> Unit, onError: (ColibrioException) -> Unit)