SpokestackDelegate

@objc
public protocol SpokestackDelegate : Tracer

Protocol for receiving events from Spokestack modules for speech, nlu, and tts.

SpeechPipeline

  • The speech pipeline has been initialized.

    Declaration

    Swift

    @objc
    optional func didInit()
  • The speech pipeline has been started.

    Declaration

    Swift

    @objc
    optional func didStart()
  • The speech pipeline has been stopped.

    Declaration

    Swift

    @objc
    optional func didStop()
  • The pipeline activate event. Occurs upon activation of speech recognition. The pipeline remains active until the user stops talking or the activation timeout is reached.

    See also

    wakeActiveMin

    Declaration

    Swift

    @objc
    optional func didActivate()
  • The pipeline deactivate event. Occurs upon deactivation of speech recognition. The pipeline remains inactive until activated again by either explicit activation or wakeword activation.

    Declaration

    Swift

    @objc
    optional func didDeactivate()
  • The pipeline recognized and transcribed speech.

    Declaration

    Swift

    @objc
    optional func didRecognize(_ result: SpeechContext)

    Parameters

    result

    The speech pipeline context, which contains the result.

  • The pipeline recognized and transcribed a portion of an incomplete utterance.

    Declaration

    Swift

    @objc
    optional func didRecognizePartial(_ result: SpeechContext)

    Parameters

    result

    The speech pipeline context, which contains the partial result.

  • The pipeline timeout event. The pipeline experienced a timeout in a component.

    Declaration

    Swift

    @objc
    optional func didTimeout()

TextToSpeech

  • The TTS synthesis request has resulted in a successful response.

    Note

    The URL will be invalidated within 60 seconds of generation.

    Declaration

    Swift

    @objc
    optional func success(result: TextToSpeechResult)

    Parameters

    url

    The url pointing to the TTS media container

  • The TTS synthesis request has begun playback over the default audio system.

    Declaration

    Swift

    @objc
    optional func didBeginSpeaking()
  • The TTS synthesis request has finished playback.

    Declaration

    Swift

    @objc
    optional func didFinishSpeaking()

NLU

Tracer

  • The trace event.

    Declaration

    Swift

    @objc
    optional func didTrace(_ trace: String)

    Parameters

    trace

    The trace message from a Spokestack module.

Error

  • The error event. An error occured in a Spokestack module.

    Declaration

    Swift

    @objc
    func failure(error: Error)

    Parameters

    error

    A human-readable error message.