Reference

Supported Languages

The table below lists which components and compatible with Rhasspy’s supported languages.

Category Name Offline? en de es fr it nl ru el hi zh vi pt sv ca
Wake Word pocketsphinx        
  porcupine                          
  snowboy requires account
  precise
Speech to Text pocketsphinx    
  kaldi                
Intent Recognition fsticuffs
  fuzzywuzzy
  adapt
  flair              
  rasaNLU needs extra software
Text to Speech espeak
  flite                        
  picotts                  
  marytts                  
  wavenet        

• - yes, but requires training/customization

HTTP API

Rhasspy’s HTTP endpoints are documented below. You can also visit /api/ in your Rhasspy server (note the final slash) to try out each endpoint.

Application authors may want to use the rhasspy-client, which provides a high-level interface to a remote Rhasspy server.

Endpoints

Websocket API

MQTT API

Rhasspy implements part of the Hermes protocol. Various services of Rhasspy can be configured to pass along MQTT messages or to react to MQTT messages following the Hermes protocol.

Command Line

Rhasspy provides a powerful command-line interface called rhasspy-cli.

For rhasspy-cli --profile <PROFILE_NAME> <COMMAND> <ARGUMENTS>, <COMMAND> can be:

Profile Operations

Print the complete JSON for the English profile with:

rhasspy-cli --profile en info

You can combine this with other commands, such as jq to get at specific pieces:

rhasspy-cli info --profile en | jq .wake.pocketsphinx.keyphrase

Output (JSON):

"okay rhasspy"

Training

Retrain your the English profile with:

rhasspy-cli --profile en train

Add --debug before train for more information.

Speech to Text/Intent

Convert a WAV file to text from stdin:

rhasspy-cli --profile en wav2text < what-time-is-it.wav

Output (text):

what time is it

Convert multiple WAV files:

rhasspy-cli --profile en wav2text what-time-is-it.wav turn-on-the-living-room-lamp.wav

Output (JSON)

{
    "what-time-is-it.wav": "what time is it",
    "turn-on-the-living-room-lamp.wav": "turn on the living room lamp"
}

Convert multiple WAV file(s) to intents and handle them:

rhasspy-cli --profile en wav2intent --handle what-time-is-it.wav turn-on-the-living-room-lamp.wav

Output (JSON):

{
    "what_time_is_it.wav": {
        "text": "what time is it",
        "intent": {
            "name": "GetTime",
            "confidence": 1.0
        },
        "entities": []
    },
    "turn_on_living_room_lamp.wav": {
        "text": "turn on the living room lamp",
        "intent": {
            "name": "ChangeLightState",
            "confidence": 1.0
        },
        "entities": [
            {
                "entity": "state",
                "value": "on"
            },
            {
                "entity": "name",
                "value": "living room lamp"
            }
        ]
    }
}

Text to Intent

Handle a command as if it was spoken:

rhasspy-cli --profile en text2intent --handle "turn off the living room lamp"

Output (JSON):

{
    "turn off the living room lamp": {
        "text": "turn off the living room lamp",
        "intent": {
            "name": "ChangeLightState",
            "confidence": 1.0
        },
        "entities": [
            {
                "entity": "state",
                "value": "off"
            },
            {
                "entity": "name",
                "value": "living room lamp"
            }
        ]
    }
}

Record Your Voice

Save a voice command to a WAV:

rhasspy-cli --profile en mic2wav > my-voice-command.wav

You can listen to it with:

aplay my-voice-command.wav

Test Your Wake Word

Start Rhasspy and wait for wake word:

rhasspy-cli --profile en sleep

Should exit and print the wake word when its spoken.

Text to Speech

Have Rhasspy speak one or more sentences:

rhasspy-cli --profile en text2speech "We ride at dawn!"

Use a different text to speech system and voice:

rhasspy-cli --profile en \
    --set 'text_to_speech.system' 'flite' \
    --set 'text_to_speech.flite.voice' 'slt' \
    text2speech "We ride at dawn!"

Pronounce Words

Speak words Rhasspy doesn’t know!

rhasspy-cli --profile en word2wav raxacoricofallapatorius | aplay

Text to Speech to Text to Intent

Use the miracle of Unix pipes to have Rhasspy interpret voice commands from itself:

rhasspy-cli --profile en \
    --set 'text_to_speech.system' 'picotts' \
    text2wav "turn on the living room lamp" | \
      rhasspy-cli --profile en wav2text | \
        rhasspy-cli --profile en text2intent

Output (JSON):

{
    "turn on the living room lamp": {
        "text": "turn on the living room lamp",
        "intent": {
            "name": "ChangeLightState",
            "confidence": 1.0
        },
        "entities": [
            {
                "entity": "state",
                "value": "on"
            },
            {
                "entity": "name",
                "value": "living room lamp"
            }
        ],
        "speech_confidence": 1,
        "slots": {
            "state": "on",
            "name": "living room lamp"
        }
    }
}

Profile Settings

All available profile sections and settings are listed below: