Hermes 0.69.0

The Hermes protocol specifies the format of MQTT messages for a voice assistant platform.

Adapted from Snips.ai.

This documentation is currently an incomplete version of the Snips Hermes protocol.

Operations

  • PUB hermes/hotword/toggleOn

    This will activate the Wake Word component of the Snips Platform.

    Accepts the following message:

    Hotword Toggle Onhotword-toggle-on
    object

    Examples

  • PUB hermes/hotword/toggleOff

    This will deactivate the Wake Word component of the Snips Platform. Consequently, nothing will be triggered when a wake word is pronounced.

    Accepts the following message:

    Hotword Toggle Offhotword-toggle-off
    object

    Examples

  • SUB hermes/hotword/{wakewordId}/detected

    This message will be sent by the Snips Platform when the Wake Word component has detected that a specific wake word has been uttered.

    wakewordId
    required
    string

    Replace with the id of your wake word if multiple wake words are present, or default if there is only one wake word.

    Accepts the following message:

    Wake Word Detectedwake-word-detected
    object

    Examples

  • PUB hermes/asr/toggleOn

    This will activate the ASR component, subsequently enabling to start listening for voice (using the startListening call described below).

    Accepts the following message:

    ASR Toggle Onasr-toggle-on
    object

    Examples

  • PUB hermes/asr/toggleOff

    This will deactivate the ASR component.

    Accepts the following message:

    ASR Toggle Offasr-toggle-off
    object

    Examples

  • PUB hermes/asr/startListening

    This will explicitly tell the ASR component to start listening for voice input.

    Accepts the following message:

    ASR Start Listeningasr-start-listening
    object

    Examples

  • PUB hermes/asr/stopListening

    This will explicitly tell the ASR component to stop listening for voice input.

    Accepts the following message:

    ASR Stop Listeningasr-stop-listening
    object

    Examples

  • SUB hermes/asr/textCaptured

    When the ASR is listening, it transcribes voice to text in real time. This process stops when a longer period of silence is detected, after which the transcription results are posted, as described here.

    Accepts the following message:

    ASR Text Capturedasr-text-captured
    object

    Examples

  • PUB hermes/nlu/query

    In order to extract an intent and slots from a piece of text, send it directly to the NLU component as follows. The NLU component will subsequently publish a message to the hermes/nlu/intentParsed topic, described below.

    Accepts the following message:

    NLU Querynlu-query
    object

    Examples

  • SUB hermes/nlu/intentParsed

    When text has been sent to the NLU, the result of the intent resolution is sent back as follows.

    Accepts the following message:

    NLU Intent Parsednlu-intent-parsed
    object

    Examples

  • SUB hermes/nlu/intentNotRecognized

    When the NLU was unable to parse a chunk of text, it publishes a message telling so.

    Accepts the following message:

    NLU Intent Not Recognizednlu-intent-not-recognized
    object

    Examples

  • SUB hermes/nlu/error

    When an error has occurred in the NLU component, it publishes a message telling so.

    Accepts the following message:

    NLU Errornlu-error
    object

    Examples

  • PUB hermes/tts/say

    Sending text to be spoken by the TTS component (low-level API)

    Accepts the following message:

    TTS Saytts-say
    object

    Examples

  • SUB hermes/tts/sayFinished

    When TTS has finished speaking some text, it will publish a message as follows (low-level API)

    Accepts the following message:

    TTS Say Finishedtts-say-finished
    object

    Examples

  • PUB hermes/audioServer/{siteId}/playBytes/{requestId}

    You may send a WAV sound to be played on a specific site as follows.

    siteId
    required
    string

    The site on which to play the sound

    requestId
    required
    string

    An id to be passed back on hermes/audioServer/{siteId}/playFinished

    Accepts the following message:

    Play Audio Bytesaudio-play
    Payload
    any

    The WAV file to play.

    Examples

  • SUB hermes/audioServer/{siteId}/playFinished

    When the audio service has finished playing a sound, it publishes a message as follows.

    siteId
    required
    string

    The site on which the sound was played

    Accepts the following message:

    Audio Play Finishedaudio-play-finished
    object

    Examples

  • PUB hermes/audioServer/{siteId}/playBytesStreaming/{requestId}/{chunkNumber}/{isLastChunk}

    You can also stream the sound you want to play instead of sending it all on one go. This is for example used by the TTS service to start playing the generated voice before the end of its generation.

    siteId
    required
    string

    The site on which to play the sound

    requestId
    required
    string

    The id to be passed back to hermes/audioServer/{siteId}/streamFinished

    chunkNumber
    required
    number

    Number of the send chunk, starting at 0

    isLastChunk
    required
    number

    0, except for last chunk, where it is 1

    Accepts the following message:

    Audio Stream Chunkaudio-stream-chunk
    Payload
    any

    The chunk, encoded as WAV

    Examples

  • PUB hermes/audioServer/{siteId}/streamFinished

    When the audio service has finished streaming a sound, it publishes a message as follows.

    siteId
    required
    string

    The site on which the stream was played

    Accepts the following message:

    Audio Stream Finishedaudio-stream-finished
    object

    Examples

  • PUB hermes/audioServer/{siteId}/audioFrame

    Every time the platform captures an audio frame, it publishes a message as follows.

    siteId
    required
    string

    The site on which the sound frame was captured

    Accepts the following message:

    Audio Frameaudio-frame
    Payload
    any

    The WAV of the frame.

    Examples

  • SUB hermes/intent/{intentName}

    This is the main message the handler code should subscribe to. It is sent by the Dialogue Manager when an intent has been detected.

    Note that it is the handler's responsibility to inform the Dialogue Manager of what it should do with the current session by sending either a Continue Session or an End Session with the current sessionId.

    intentName
    required
    string

    The name of the detected intent

    Accepts the following message:

    Intent Detectedintent-detected
    object

    Examples

  • PUB hermes/dialogueManager/startSession

    You can send this message to programmatically initiate a new session. The Dialogue Manager will start the session by asking the TTS to say the text (if any) and wait for the answer of the end user.

    Accepts the following message:

    Start Sessionstart-session
    object

    Examples

  • SUB hermes/dialogueManager/sessionQueued

    This message is sent by the Dialogue Manager when it receives a Start Session message and the corresponding site is busy. Only Start Session messages with a notification initialisation or an action initialisation with the canBeEnqueued flag set to true can be enqueued. When the site is free again, this session will be started.

    Accepts the following message:

    Session Queuedsession-queued
    object

    Examples

  • SUB hermes/dialogueManager/sessionStarted

    This message is sent by the Dialogue Manager when a new session is started, either following a wakeword or programmatically.

    Accepts the following message:

    Session Startedsession-started
    object

    Examples

  • PUB hermes/dialogueManager/continueSession

    You should send this after receiving received an Intent when you want to continue the session for example to ask additional information to the end user.

    Be sure to use the same sessionId as the one in the Intent message.

    Accepts the following message:

    Continue Sessioncontinue-session
    object

    Examples

  • PUB hermes/dialogueManager/endSession

    You should send this after receiving received an Intent when you want to end the session. Be sure to use the same sessionId as the one in the Intent message.

    Accepts the following message:

    End Sessionend-session
    object

    Examples

  • SUB hermes/dialogueManager/sessionEnded

    This message is sent by the Dialogue Manager when a session is ended.

    Accepts the following message:

    Session Endedsession-ended
    object

    Examples

  • SUB hermes/dialogueManager/intentNotRecognized

    This message is sent by the dialogue manager when it failed to recognize and intent AND you requested the dialogue manager to notify you of such events using the sendIntentNotRecognized flag in the last Start Session or Continue Session

    Accepts the following message:

    Intent Not Recognizedintent-not-recognized
    object

    Examples

  • PUB hermes/dialogueManager/configure

    You can send this message to programmatically configure the scope of intents that are enabled at a given time. By default, all intents are enabled by default unless specified otherwise in the console. Refers to the dedicated Console tutorial for further details. The behaviour implemented by the intentFilter attributes for the start session and continue session locally overwrites the set of enabled/disabled intents only for the next user turn.

    Accepts the following message:

    Configureconfigure
    object

    Examples

Messages

  • #1Hotword Toggle Onhotword-toggle-on
    object
  • #2Hotword Toggle Offhotword-toggle-off
    object
  • #3Wake Word Detectedwake-word-detected
    object
  • #4ASR Toggle Onasr-toggle-on
    object
  • #5ASR Toggle Offasr-toggle-off
    object
  • #6ASR Start Listeningasr-start-listening
    object
  • #7ASR Stop Listeningasr-stop-listening
    object
  • #8ASR Text Capturedasr-text-captured
    object
  • #9NLU Querynlu-query
    object
  • #10NLU Intent Parsednlu-intent-parsed
    object
  • #11NLU Intent Not Recognizednlu-intent-not-recognized
    object
  • #12NLU Errornlu-error
    object
  • #13TTS Saytts-say
    object
  • #14TTS Say Finishedtts-say-finished
    object
  • #15Play Audio Bytesaudio-play
    Payload
    any

    The WAV file to play.

  • #16Audio Play Finishedaudio-play-finished
    object
  • #17Audio Stream Chunkaudio-stream-chunk
    Payload
    any

    The chunk, encoded as WAV

  • #18Audio Stream Finishedaudio-stream-finished
    object
  • #19Audio Frameaudio-frame
    Payload
    any

    The WAV of the frame.

  • #20Intent Detectedintent-detected
    object
  • #21Start Sessionstart-session
    object
  • #22Session Queuedsession-queued
    object
  • #23Session Startedsession-started
    object
  • #24Continue Sessioncontinue-session
    object
  • #25End Sessionend-session
    object
  • #26Session Endedsession-ended
    object
  • #27Intent Not Recognizedintent-not-recognized
    object
  • #28Configureconfigure
    object