VoiceControllerDelegate

public protocol VoiceControllerDelegate

The VoiceControllerDelegate protocol defines methods that allow an object to respond to significant events related to spoken instructions.

  • Called when the voice controller failed to speak an instruction.

    Declaration

    Swift

    optional func voiceController(_ voiceController: RouteVoiceController, spokenInstructionsDidFailWith error: Error)

    Parameters

    voiceController

    The voice controller that experienced the failure.

    error

    An error explaining the failure and its cause. The MBSpokenInstructionErrorCodeKey key of the error’s user info dictionary is a SpokenInstructionErrorCode indicating the cause of the failure.

  • Called when one spoken instruction interrupts another instruction currently being spoken.

    Declaration

    Swift

    optional func voiceController(_ voiceController: RouteVoiceController, didInterrupt interruptedInstruction: SpokenInstruction, with interruptingInstruction: SpokenInstruction)

    Parameters

    voiceController

    The voice controller that experienced the interruption.

    interruptedInstruction

    The spoken instruction currently in progress that has been interrupted.

    interruptingInstruction

    The spoken instruction that is interrupting the current instruction.