Mapbox Speech Api
class MapboxSpeechApi @JvmOverloads() constructor(context: Context, accessToken: String, language: String, options: MapboxSpeechApiOptions)
Content copied to clipboard
Mapbox Speech Api that allows you to generate an announcement based on VoiceInstructions
Constructors
MapboxSpeechApi
Link copied to clipboard
@JvmOverloads()
Content copied to clipboard
Functions
cancel
Link copied to clipboard
fun cancel()
Content copied to clipboard
The method stops the process of retrieving the file voice instruction SpeechAnnouncement and destroys any related callbacks.
clean
Link copied to clipboard
generate
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.