-
- All Implemented Interfaces:
-
org.readium.r2.navigator.preferences.Configurable,org.readium.r2.shared.util.Closeable
public interface TtsEngine<S extends TtsEngine.Settings, P extends TtsEngine.Preferences<P>, E extends TtsEngine.Error, V extends TtsEngine.Voice> implements Configurable<S, P>, Closeable
A text-to-speech engine synthesizes text utterances (e.g. sentence).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceTtsEngine.Preferencespublic interfaceTtsEngine.Settingspublic interfaceTtsEngine.Voicepublic interfaceTtsEngine.ErrorMarker interface for the errors that the TtsEngine returns.
public final classTtsEngine.RequestIdAn id to identify a request to speak.
public interfaceTtsEngine.ListenerTTS engine callbacks.
-
Method Summary
Modifier and Type Method Description abstract Unitspeak(TtsEngine.RequestId requestId, String text, Language language)Enqueues a new speak request. abstract Unitstop()Stops the TtsEngine. abstract UnitsetListener(TtsEngine.Listener<E> listener)Sets a new listener or removes the current one. abstract Set<V>getVoices()Sets of voices available with this TtsEngine. abstract StateFlow<S>getSettings()-
-
Method Detail
-
speak
abstract Unit speak(TtsEngine.RequestId requestId, String text, Language language)
Enqueues a new speak request.
-
setListener
abstract Unit setListener(TtsEngine.Listener<E> listener)
Sets a new listener or removes the current one.
-
getSettings
abstract StateFlow<S> getSettings()
-
-
-
-