MapboxSpeechPlayer

open class MapboxSpeechPlayer : SpeechPlayer

Will retrieve synthesized speech mp3s from Mapbox's API Voice.

Constructors

MapboxSpeechPlayer
Link copied to clipboard
open fun MapboxSpeechPlayer(context: Context, voiceListener: VoiceListener, voiceInstructionLoader: VoiceInstructionLoader)
Construct an instance of MapboxSpeechPlayer

Functions

onDestroy
Link copied to clipboard
open fun onDestroy()
Used to stop and release the media (if needed).
onOffRoute
Link copied to clipboard
open fun onOffRoute()
Used in off-route scenarios to stop currentannouncement (if playing) and voice a rerouting cue.
play
Link copied to clipboard
open fun play(announcement: VoiceInstructions)
Plays the specified text instruction using MapboxSpeech API, defaulting to SSML input type
abstract fun play(speechAnnouncement: VoiceInstructions)
Will play the given string speechAnnouncement.
setMuted
Link copied to clipboard
open fun setMuted(isMuted: Boolean)
Will determine if voice announcements will be played or not.

Properties

isMuted
Link copied to clipboard
private open val isMuted: Boolean