RouteVoiceController

open class RouteVoiceController : NSObject, AVSpeechSynthesizerDelegate
extension RouteVoiceController: AVAudioPlayerDelegate

A route voice controller monitors turn-by-turn navigation events and triggers playing spoken instructions as audio using the instance of SpeechSynthesizing type.

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 speechSynthesizer.