mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
Documentation for Snips components (#2892)
* Documentation for Snips components * Fix version * Fix typos * Update video link
This commit is contained in:
parent
53021cf61f
commit
a6c9e8df83
93
source/_components/snips.markdown
Normal file
93
source/_components/snips.markdown
Normal file
@ -0,0 +1,93 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Snips"
|
||||
description: "Instructions how to integrate Snips within Home Assistant."
|
||||
date: 2017-06-22 12:00
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: snips.png
|
||||
ha_category: Voice
|
||||
ha_release: 0.48
|
||||
---
|
||||
|
||||
The [Snips Voice Platform](https://www.snips.ai) allows users to add powerful voice assistants to their Raspberry Pi devices without compromising on Privacy. It runs 100% on-device, and does not require an Internet connection. It features Hotword Detection, Automatic Speech Recognition (ASR), Natural Language Understanding (NLU) and Dialog Management.
|
||||
|
||||

|
||||
|
||||
Snips takes voice or text as input, and produces *intents* as output, which are explicit representations of an intention behind an utterance, and which can subsequently be used by Home Assistant to perform appropriate actions.
|
||||
|
||||

|
||||
|
||||
|
||||
## {% linkable_title The Snips Voice Platform %}
|
||||
|
||||
### Installation
|
||||
|
||||
The Snips Voice Platform is installed on Raspberry Pi with the following command:
|
||||
|
||||
```sh
|
||||
(pi) $ curl https://install.snips.ai -sSf | sh
|
||||
```
|
||||
|
||||
### Creating an assistant
|
||||
|
||||
<div class='videoWrapper'>
|
||||
<iframe src="https://player.vimeo.com/video/223255884" width="700" height="380" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
||||
</div>
|
||||
|
||||
Snips assistants are created via the [Snips Console](https://console.snips.ai). Once trained, the assistant should be downloaded and copied to the Raspberry Pi:
|
||||
|
||||
```sh
|
||||
$ scp assistantproj_XXX.zip pi@pi_hostname:/home/pi/assistant.zip
|
||||
```
|
||||
|
||||
and installed locally via the `snips-install-assistant` helper script:
|
||||
|
||||
```sh
|
||||
(pi) $ sudo snips-install-assistant assistant.zip
|
||||
```
|
||||
|
||||
### Running Snips
|
||||
|
||||
Make sure that a microphone is plugged to the Raspberry Pi. If you are having trouble setting up audio, we have written a guide on [Raspberry Pi Audio Configuration](https://github.com/snipsco/snips-platform-documentation/wiki/1.-Setup-the-Snips-Voice-Platform-on-your-Raspberry-Pi#configuring-the-audio).
|
||||
|
||||
Start the Snips Voice Platform using the `snips` command:
|
||||
|
||||
```sh
|
||||
(pi) $ snips
|
||||
```
|
||||
|
||||
Snips is now ready to take voice commands from the microphone. To trigger the listening, simply say
|
||||
|
||||
> Hey Snips
|
||||
|
||||
followed by a command, e.g.
|
||||
|
||||
> Set the lights to green in the living room
|
||||
|
||||
We should see the transcribed phrase in the logs, as well as a properly parsed intent. The intent is published on MQTT, on the `hermes/nlu/intentParsed` topic. The Snips Home Assistant component subscribes to this topic, and handles the intent according to the rules defined in `configuration.yaml`, as explained below.
|
||||
|
||||
## Home Assistant configuration
|
||||
|
||||
By default, the Snips MQTT broker runs on port 9898. We should tell Home Assistant to use this as a broker, rather than its own, by adding the following section to `configuration.yaml`:
|
||||
|
||||
```yaml
|
||||
mqtt:
|
||||
broker: 127.0.0.1
|
||||
port: 9898
|
||||
```
|
||||
|
||||
In Home Assistant, we trigger actions based on intents produced by Snips. This is done in `configuration.yaml`. For instance, the following block handles `ActivateLightColors` intents (included in the Snips IoT intent bundle) to change light colors:
|
||||
|
||||
```yaml
|
||||
snips:
|
||||
intents:
|
||||
ActivateLightColor:
|
||||
action:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.{% raw %}{{ objectLocation | replace(" ","_") }}{% endraw %}
|
||||
color_name: {% raw %}{{ objectColor }}{% endraw %}
|
||||
```
|
BIN
source/images/screenshots/snips_modules.png
Normal file
BIN
source/images/screenshots/snips_modules.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 39 KiB |
BIN
source/images/screenshots/snips_nlu.png
Normal file
BIN
source/images/screenshots/snips_nlu.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
BIN
source/images/supported_brands/snips.png
Normal file
BIN
source/images/supported_brands/snips.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.5 KiB |
Loading…
x
Reference in New Issue
Block a user