speakAsync

fun speakAsync(text: String, resultCallback: (IviTextToSpeech.ResultStatus) -> Unit)

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.

Parameters

resultCallback

A callback that runs on the main thread, contains the ResultStatus of the TTS operation.