speak With Preset
fun speakWithPreset(preset: SpeechPreset, queueMode: Int = TextToSpeech.QUEUE_FLUSH, block: SpeechBuilder.() -> Unit): SpeechResult
Speaks DSL content wrapped in the given preset prosody.
This is a convenience method equivalent to wrapping the entire DSL block inside a SpeechBuilder.withPreset call.
Return
SpeechResult indicating success or failure.
Parameters
preset
The SpeechPreset whose prosody wraps the DSL content.
queue Mode
TextToSpeech.QUEUE_FLUSH (default) or TextToSpeech.QUEUE_ADD.
block
DSL block executed on a SpeechBuilder receiver.