onQueueProgress

Registers a callback invoked on the main thread each time a new queue item starts playing.

tts.onQueueProgress { progress ->
Log.d("TTS", "Playing ${progress.currentIndex + 1}/${progress.totalItems}")
}

Return

This instance for chaining.

Parameters

callback

Receives a QueueProgress with the current position and total count.

See also