MapboxSpeechApi

class MapboxSpeechApi @JvmOverloads() constructor(context: Context, accessToken: String, language: String, options: MapboxSpeechApiOptions)

Mapbox Speech Api that allows you to generate an announcement based on VoiceInstructions

Constructors

MapboxSpeechApi
Link copied to clipboard
fun MapboxSpeechApi(context: Context, accessToken: String, language: String, options: MapboxSpeechApiOptions = MapboxSpeechApiOptions.Builder().build())

Functions

cancel
Link copied to clipboard
fun cancel()
The method stops the process of retrieving the file voice instruction SpeechAnnouncement and destroys any related callbacks.
clean
Link copied to clipboard
fun clean(announcement: SpeechAnnouncement)
Given the SpeechAnnouncement the method may cleanup any associated files previously generated.
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
generate
Link copied to clipboard
fun generate(voiceInstruction: VoiceInstructions, consumer: MapboxNavigationConsumer<Expected<SpeechError, SpeechValue>>)
Given VoiceInstructions the method will try to generate the voice instruction SpeechAnnouncement including the synthesized speech mp3 file from Mapbox's API Voice.
hashCode
Link copied to clipboard
open fun hashCode(): Int
toString
Link copied to clipboard
open fun toString(): String