MapboxSpeechApi
class MapboxSpeechApi @JvmOverloads constructor( context: Context, accessToken: String, language: String, options: MapboxSpeechApiOptions = MapboxSpeechApiOptions.Builder().build())
Content copied to clipboard
Mapbox Speech Api that allows you to generate an announcement based on VoiceInstructions
Parameters
context
Context
accessToken
String
language
Locale language (IETF BCP 47)
options
MapboxSpeechApiOptions (optional)
Constructors
Link copied to clipboard
fun MapboxSpeechApi( context: Context, accessToken: String, language: String, options: MapboxSpeechApiOptions = MapboxSpeechApiOptions.Builder().build())
Content copied to clipboard
Functions
Link copied to clipboard
The method stops the process of retrieving the file voice instruction SpeechAnnouncement and destroys any related callbacks.
Link copied to clipboard
Given the SpeechAnnouncement the method may cleanup any associated files previously generated.
Link copied to clipboard
fun generate(voiceInstruction: VoiceInstructions, consumer: MapboxNavigationConsumer<Expected<SpeechError, SpeechValue>>)
Content copied to clipboard
Given VoiceInstructions the method will try to generate the voice instruction SpeechAnnouncement including the synthesized speech mp3 file from Mapbox's API Voice.