speakWithPreset

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.

block

DSL block executed on a SpeechBuilder receiver.