Link Search Menu Expand Document
Table of contents
  1. Rhasspy intent implementation
    1. Intent creation
    2. Slots
      1. Slot creation

Rhasspy intent implementation

Rhasspy categorizes voice commands by intent, these commands may contain slots (list of alternatives) or named entities, such as the color or name of a light. All voice commands are stored in an ini file whose “sections” are intents and “values” are sentence templates. Check out Rhasspy’s docs page for more information on intent structure. Your voice assistant will only listen to sentences stored inside the sentence ini file.

Intent creation

With Rhasspy running, access Rhasspy’s web interface sentences page at ip-address:12101/sentences.

  1. Add your intent
    [TestIntent] 
    this is a test 
    
  2. Press Save Sentences
  3. Press View and Confirm Guesses to confirm pronunciation for unknown words.

Speaking out the hot word followed by a sentence stored inside the sentence ini file, the voice assistant will recognize your intent.

Slots

Large alternatives can become unwieldy quickly.For example, say you have a list of lamps:

lamps = ("kitchen lamp" | "bedroom lamp" | "bathroom lamp" | ...)

Rather than keeping this list in your sentence file, you may put each lamp name on a separate line in a file named slots/lamps (no file extension) and reference it as $lamps. Rhasspy automatically loads all files in the slots directory of your profile and makes them available as slots lists.

For the example above, the file slots/lamps should contain:

kitchen lamp
bedroom lamp
bathroom lamp

Slot creation

With Rhasspy running, access Rhasspy’s web interface sentences page at ip-address:12101/slots.

  1. Press New Slot
  2. Enter Slot name & press New Slot
  3. Enter slots into the slot area
  4. Press Save Slot

For slot deletion clear the slot are & press Save Slot followed by a page refresh.

Continue with light control skill implementation