open class RouteVoiceController : NSObject, AVSpeechSynthesizerDelegate
A route voice controller monitors turn-by-turn navigation events and triggers playing spoken instructions as audio using the instance of
You initialize a voice controller using a
NavigationService instance. The voice controller observes when the navigation service hints that the user has passed a spoken instruction point and responds by calling it’s
speechSynthesizer to handle the vocalization.
If you want to use your own custom
SpeechSynthesizing implementation - also pass it during initialization. If no implementation is provided -
MultiplexedSpeechSynthesizer will be used by default.
You can also subclass
RouteVoiceController to implement you own mechanism of monitoring navgiation events and calling
Default initializer for
public init(navigationService: NavigationService, speechSynthesizer: SpeechSynthesizing? = nil, accessToken: String? = nil, host: String? = nil)
SpeechSynthesizingimplementation, used to vocalize the spoken instructions. Defaults to
public let speechSynthesizer: SpeechSynthesizing
Delegate used for getting metadata information about route vocalization
public weak var routeVoiceControllerDelegate: RouteVoiceControllerDelegate?
If true, a noise indicating the user is going to be rerouted will play prior to rerouting.
public var playRerouteSound: Bool
Sound to play prior to reroute. Inherits volume level from
public var rerouteSoundPlayer: AVAudioPlayer