Who has got snips working on Hassio?

Dumb question…is it possible to install your repo without hassio?

You can clone it with git and then build the docker images :slight_smile:
That is what hass io does for you, but you can do it manually.

This is my last final missing feature

If you have HA installed with apt just use the apt install from Snips. Will be much easier than using the docker container.

Never mind I got it working

@Romkabouter did you have to do anything to get mqtt messages going across? I have snips detecting intents but they don’t seem to be making it into hassio

I posted an updated snips version here if anyone wants to poke at it

Did you use custom intents?
I have a Pi3 with hassio and my snips addon and I have HA running on my NAS
The NAS and the Pi3 both have the MQTT addon, the NAS has NodeRed addon.

I have done this, because the audioserver part publishes the messages to MQTT and I did not want to have the impact on the network bandwidth.
My setup works as follows:

  • Pi3 has Snips from my repository, which uses the local MQTT to publish to.
  • The NodeRed add on on the NAS has a flow, which listens to the topic hermes/intent/Romkabouter:Covers on the Pi3 and publishes the message like a relay to the NAS, on the same topic.

The configuration on the NAS is (without the Romkabouter: part!):

snips:
intent_script:
  Covers:
    action:
      - service_template: cover.{{ actionType | lower }}_cover
        data_template:
          entity_id: cover.rolluik_{% if whichCover == "back" %}achter{% elif whichCover == "front" %}voor{% elif whichCover == "right" %}zijkant_voor{% elif whichCover == "left" %}zijkant_achter{% endif %}

I am dutch and gave the covers Dutch names, so I needed to create if else statements for the slot types.
The config on the Pi3 is:

snips:
intent_script:
  Covers:
    speech:
      type: plain
      text: 'Allright, {{ actionType }}ing the {{ whichCover }} cover.'

The result is the Pi3 handling the intent and the talking back, but relaying the intent to the NAS, which actually does the work and closes or opens the wanted cover.

After that I have split up the Snips services and created an add-on per service. I also created a Snowboy Hotword add on, which I have now listening to a custom hotword :slight_smile:

The intents it calls are builtin to hass in the conversation and shopping_list components. HassTurnOn, HassTurnOff (turns on or off an entity which is matched via some fuzzy text matching), HassShoppingListAddItem and HassShoppingListListItems.

The new official hassio addon only publishes/bridges the intents and a few other topics (hotword and such). All audio is only published to it’s internal broker.

The new addon also will look for a custom snips.toml and will copy that in if it finds it. Which if you update and use the new version you could change the asr to use google if you wanted, and set up a custom_tts (I use amazon polly) which means you could set this all up in Dutch if you wanted!

And you may know this, but snips now supports speech responses for intents as long as you have your mqtt broker properly bridged to send the hermes/dialogueManager/# topics back. That’s how the new addon supports tts responses to those intents.

1 Like

I am working on extending those intents to other components https://github.com/home-assistant/home-assistant/issues/12087 with the idea being that for more basic needs you could just use the hass bundle on the snips console and control things like covers which wouldn’t work directly since you have to map them but I am thinking about building a mapping function in as well. Let me know if you have any suggestions for improvements.

1 Like

ok cool, sounds great.
I know I can set it up with Dutch, but I do not want to use cloud services in any way for voice functions.

That is why I am now working on an add-on ASR using Kaldi, but I have limited time :slight_smile:

Yeah, official dutch support is probably far off. You can definitely configure the out. For tts you can use something like espeak, flite or festival which all support other languages.

Hi there,
just to encourage people to use snips with hassio: it’s working like a charme for me! As I am from germany I did my own installer and can switch lights in the house (I#m just a beginner and gradually including things in hassio and snips). With a little help from tschmidty I’m even able to call different services with regard to a deviceLocation slot.
Snips and hass are great!

I have managed to get snips with home assistant up and running, but unfortunately so far my experience hasn’t been as good, and so e.g. a physical light switch is still much more reliable and pleasant to use. Although I am still excited to see it improve and hope to see if I can contribute further training examples.

Most of the struggles at the moment seem to be with the ASR (automatic speech recognition) in that snips doesn’t transcribe the spoken language well into text for me. I initially used the “custom language” model optimized for the training examples of the intents of the assistant. But that seems to have had way to many “unknown word” in the transcribed text. I am now using the “generic english” language model. It seems to perform a lot better than the custom one but still makes a fairly large number of errors, which then makes it impossible to extract the intent. Furthermore, the the generic ASR uses a lot more memory and takes up about 60% of the available 1GB of memory on the Raspberry Pi, which can cause issues if a lot of other things are running on the same Raspberry Pi.

I haven’t actually listened to the raw audio of what the microphone picks up to see if the text is clearly understandable to a human, so it is possible that the “fault” lies with the microphone (Sony Eye PS3)

I do not want to go without physical switches, I want both :slight_smile:
ASR is doing well for me, I do not use the generic because it is way to big.

Here a video of the Matrix Voice, Snips & Home Assistant working together.

Install was a clean Rasbian Stretch, the Kernel Modules from Matrix Voice and Snips.
The pi is brigded to my NAS, where HA is running.
I created a service myself which listens to the hotword toggle topic to control the leds.

So I jumped in and installed the Snips Add-On in HASS.IO. It’s all running on the same RPi3 with a USB Mic and audio out on the 3.5mm.
I’m not sure what I’m doing wrong, but I can’t seem to get Snips to recognize the wake word. I haven’t trained anything, so I’m just using the default assistant.
Part of my confusion is the Hass.io Snips.ai add-on UI is different than what is mentioned in the documentation.
There is an “Audio” section that seems to auto detect the devices.
There is also a “Network” section, but I’m not sure what that is for.
I have Mosquitto MQTT add-on setup, and configured as the broker in the config yaml.
The Snips logs look ok, best I can tell. But I never see the wake word triggered.

Any suggestions?

@tschmidty How to install your custom version?
I tried with adding https://github.com/tschmidty69/hassio-snips to the custom repo section in hassio but this don’t seem to work?

That should work and show a snips repo at the bottom of the list. But at this point mine is synched with the official addon. If you need help with it try the Snips discord, there is a home assistant channel there I try to help on.

Does this mean the the offical Snips Add-On in Hassio (v. 3.0) works with newest snips version? I got it working with a second raspberry with snips installed but not with “all-inclusive” (Snips + Hassio on same raspberry).

Yeah, it should work fine. Did you install the mosquitto add on also?

Yes. With this config:

Mosquitto Add-On:
{
“plain”: true,
“ssl”: false,
“anonymous”: false,
“logins”: [
{
“username”: “xxxxxxx”,
“password”: “xxxxxxx”
}
],
“customize”: {
“active”: false,
“folder”: “mosquitto”
},
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”
}

Snips Add-On:

{
“mqtt_bridge”: {
“active”: true,
“host”: “core-mosquitto”,
“port”: 1883,
“user”: “xxxxxx”,
“password”: “xxxxxx”
},
“assistant”: “assistant.zip”,
“language”: “en”,
“custom_tts”: {
“active”: false,
“platform”: “amazon_polly”
}
}

Hassio Config / Configuration.yaml:

snips:

mqtt:
broker: core-mosquitto
username: !secret mosq_user
password: !secret mosq_password