NavigationSpeechPlayer

open class NavigationSpeechPlayer : SpeechPlayer

Used to play VoiceInstructionss.

Takes a SpeechPlayerProvider which will provide either a MapboxSpeechPlayer or AndroidSpeechPlayer based on the given language - if it is supported by our Voice API.

MapboxSpeechPlayer requires Internet connectivity. In cases where a connection is not available, the provider will fall back to the AndroidSpeechPlayer.

See also

com.mapbox.navigation.core.MapboxNavigation

MapboxNavigation#registerVoiceInstructionsObserver(VoiceInstructionsObserver)

Constructors

NavigationSpeechPlayer
Link copied to clipboard
open fun NavigationSpeechPlayer(speechPlayerProvider: SpeechPlayerProvider)

Functions

onDestroy
Link copied to clipboard
open fun onDestroy()
Required method to implement in onDestroy or onDestroy.
onOffRoute
Link copied to clipboard
open fun onOffRoute()
Optional method to implement in an OffRouteObserver.
play
Link copied to clipboard
open fun play(voiceInstructions: VoiceInstructions)
Plays the given VoiceInstructions.
abstract fun play(speechAnnouncement: VoiceInstructions)
Will play the given string speechAnnouncement.
setMuted
Link copied to clipboard
open fun setMuted(isMuted: Boolean)
Mutes or un-mutes the SpeechPlayer.

Properties

isMuted
Link copied to clipboard
private open val isMuted: Boolean