-
public interface TtsEngineProvider<S extends TtsEngine.Settings, P extends TtsEngine.Preferences<P>, E extends PreferencesEditor<P>, F extends TtsEngine.Error, V extends TtsEngine.Voice>To be implemented by adapters for third-party TTS engines which can be used with TtsNavigator.
-
-
Method Summary
Modifier and Type Method Description abstract Try<TtsEngine<S, P, F, V>, Error>createEngine(Publication publication, P initialPreferences)Creates a TtsEngine for publication and initialPreferences. abstract EcreatePreferencesEditor(Publication publication, P initialPreferences)Creates a preferences editor for publication and initialPreferences. abstract PcreateEmptyPreferences()Creates an empty set of preferences of this TTS engine provider. abstract PlaybackParametersgetPlaybackParameters(S settings)Computes Media3 PlaybackParameters from the given settings. abstract PupdatePlaybackParameters(P previousPreferences, PlaybackParameters playbackParameters)Updates previousPreferences to honor the given Media3 playbackParameters. abstract PlaybackExceptionmapEngineError(F error)Maps an engine-specific error to Media3 PlaybackException. -
-
Method Detail
-
createEngine
abstract Try<TtsEngine<S, P, F, V>, Error> createEngine(Publication publication, P initialPreferences)
Creates a TtsEngine for publication and initialPreferences.
-
createPreferencesEditor
abstract E createPreferencesEditor(Publication publication, P initialPreferences)
Creates a preferences editor for publication and initialPreferences.
-
createEmptyPreferences
abstract P createEmptyPreferences()
Creates an empty set of preferences of this TTS engine provider.
-
getPlaybackParameters
abstract PlaybackParameters getPlaybackParameters(S settings)
Computes Media3 PlaybackParameters from the given settings.
-
updatePlaybackParameters
abstract P updatePlaybackParameters(P previousPreferences, PlaybackParameters playbackParameters)
Updates previousPreferences to honor the given Media3 playbackParameters.
-
mapEngineError
abstract PlaybackException mapEngineError(F error)
Maps an engine-specific error to Media3 PlaybackException.
-
-
-
-