speak

abstract fun speak(request: SpeechSynthesisRequest): Flow<SpeechSynthesisEvent>

Speaks request, interrupting anything already being spoken.

The returned flow is cold: collecting it starts speaking and it completes after SpeechSynthesisEvent.Finished or SpeechSynthesisEvent.Cancelled. It throws SpeechSynthesisException if synthesis fails. Cancelling the collection stops speech.