TtsEngine

A text-to-speech engine synthesizes text utterances (e.g. sentence).

Inheritors

Types

Link copied to clipboard
interface Error : Error

Marker interface for the errors that the TtsEngine returns.

Link copied to clipboard

TTS engine callbacks.

Link copied to clipboard
Link copied to clipboard
value class RequestId(val value: String)

An id to identify a request to speak.

Link copied to clipboard
Link copied to clipboard
interface Voice

Properties

Link copied to clipboard
abstract val settings: StateFlow<S>
Link copied to clipboard
abstract val voices: Set<V>

Sets of voices available with this TtsEngine.

Functions

Link copied to clipboard
abstract fun close()
Link copied to clipboard
abstract fun setListener(listener: TtsEngine.Listener<E>?)

Sets a new listener or removes the current one.

Link copied to clipboard
abstract fun speak(requestId: TtsEngine.RequestId, text: String, language: Language?)

Enqueues a new speak request.

Link copied to clipboard
abstract fun stop()

Stops the TtsEngine.

Link copied to clipboard
abstract fun submitPreferences(preferences: P)