-
- All Implemented Interfaces:
-
org.readium.navigator.media.tts.TtsEngineProvider
public final class AndroidTtsEngineProvider implements TtsEngineProvider<AndroidTtsSettings, AndroidTtsPreferences, AndroidTtsPreferencesEditor, AndroidTtsEngine.Error, AndroidTtsEngine.Voice>
-
-
Constructor Summary
Constructors Constructor Description AndroidTtsEngineProvider(Context context, AndroidTtsDefaults defaults, AndroidTtsEngine.VoiceSelector voiceSelector)
-
Method Summary
Modifier and Type Method Description Try<AndroidTtsEngine, Error>createEngine(Publication publication, AndroidTtsPreferences initialPreferences)Creates a TtsEngine for publication and initialPreferences. AndroidTtsPreferencesEditorcreatePreferencesEditor(Publication publication, AndroidTtsPreferences initialPreferences)Creates a preferences editor for publication and initialPreferences. AndroidTtsPreferencescreateEmptyPreferences()Creates an empty set of preferences of this TTS engine provider. PlaybackParametersgetPlaybackParameters(AndroidTtsSettings settings)Computes Media3 PlaybackParameters from the given settings. AndroidTtsPreferencesupdatePlaybackParameters(AndroidTtsPreferences previousPreferences, PlaybackParameters playbackParameters)Updates previousPreferences to honor the given Media3 playbackParameters. PlaybackExceptionmapEngineError(AndroidTtsEngine.Error error)Maps an engine-specific error to Media3 PlaybackException. -
-
Constructor Detail
-
AndroidTtsEngineProvider
AndroidTtsEngineProvider(Context context, AndroidTtsDefaults defaults, AndroidTtsEngine.VoiceSelector voiceSelector)
-
-
Method Detail
-
createEngine
Try<AndroidTtsEngine, Error> createEngine(Publication publication, AndroidTtsPreferences initialPreferences)
Creates a TtsEngine for publication and initialPreferences.
-
createPreferencesEditor
AndroidTtsPreferencesEditor createPreferencesEditor(Publication publication, AndroidTtsPreferences initialPreferences)
Creates a preferences editor for publication and initialPreferences.
-
createEmptyPreferences
AndroidTtsPreferences createEmptyPreferences()
Creates an empty set of preferences of this TTS engine provider.
-
getPlaybackParameters
PlaybackParameters getPlaybackParameters(AndroidTtsSettings settings)
Computes Media3 PlaybackParameters from the given settings.
-
updatePlaybackParameters
AndroidTtsPreferences updatePlaybackParameters(AndroidTtsPreferences previousPreferences, PlaybackParameters playbackParameters)
Updates previousPreferences to honor the given Media3 playbackParameters.
-
mapEngineError
PlaybackException mapEngineError(AndroidTtsEngine.Error error)
Maps an engine-specific error to Media3 PlaybackException.
-
-
-
-