Speech Player Provider
open class SpeechPlayerProvider
Content copied to clipboard
Given to the constructor of NavigationSpeechPlayer, this class decides which SpeechPlayer should be used based on voice language compatibility.
If the given voiceLanguage is not null, this means the language is supported by the Mapbox Voice API, which can parse SSML. The boolean voiceLanguageSupported should be try in this case.
If false, an instance of MapboxSpeechPlayer will never be provided to the NavigationSpeechPlayer. The SDK will default to the AndroidSpeechPlayer powered by android.speech.tts.TextToSpeech.
Constructors
SpeechPlayerProvider
Link copied to clipboard
open fun SpeechPlayerProvider(context: Context, language: String, voiceLanguageSupported: Boolean, voiceInstructionLoader: VoiceInstructionLoader)
Content copied to clipboard
Constructed when creating an instance of NavigationSpeechPlayer.
SpeechPlayerProvider
Link copied to clipboard
open fun SpeechPlayerProvider(context: Context, language: String, voiceLanguageSupported: Boolean, voiceInstructionLoader: VoiceInstructionLoader, connectivityStatus: ConnectivityStatusProvider)
Content copied to clipboard
Functions
onOffRoute
Link copied to clipboard
open fun onOffRoute()
Content copied to clipboard
onSpeechPlayerStateChanged
Link copied to clipboard
open fun onSpeechPlayerStateChanged(speechPlayerState: SpeechPlayerState)
Content copied to clipboard
retrieveAndroidSpeechPlayer
Link copied to clipboard
retrieveSpeechPlayer
Link copied to clipboard
setSpeechPlayerStateChangeObserver
Link copied to clipboard
open fun setSpeechPlayerStateChangeObserver(observer: SpeechPlayerStateChangeObserver)
Content copied to clipboard
Properties
isFallbackAlwaysEnabled
Link copied to clipboard