TtsEngineProvider

To be implemented by adapters for third-party TTS engines which can be used with TtsNavigator.

Inheritors

Functions

Link copied to clipboard
abstract fun createEmptyPreferences(): P

Creates an empty set of preferences of this TTS engine provider.

Link copied to clipboard
abstract suspend fun createEngine(publication: Publication, initialPreferences: P): Try<TtsEngine<S, P, F, V>, Error>
Link copied to clipboard
abstract fun createPreferencesEditor(publication: Publication, initialPreferences: P): E

Creates a preferences editor for publication and initialPreferences.

Link copied to clipboard
abstract fun getPlaybackParameters(settings: S): PlaybackParameters

Computes Media3 PlaybackParameters from the given settings.

Link copied to clipboard
abstract fun mapEngineError(error: F): PlaybackException

Maps an engine-specific error to Media3 PlaybackException.

Link copied to clipboard
abstract fun updatePlaybackParameters(previousPreferences: P, playbackParameters: PlaybackParameters): P

Updates previousPreferences to honor the given Media3 playbackParameters.