Update snips 2.0 (#280)

This commit is contained in:
Pascal Vizeli
2018-04-14 01:29:14 +02:00
committed by GitHub
parent 319215a3c7
commit b8f88c671a
6 changed files with 6 additions and 45 deletions

View File

@@ -1,5 +1,9 @@
# Changelog
## 2.0
- Use new Supervisor Audio backend
- Update preinstalled assistant for Home-Assistant
## 1.0
- Updated to latest snips version 0.53.17

View File

@@ -4,7 +4,6 @@ FROM $BUILD_FROM
# Copy data
COPY run.sh /
COPY mosquitto.conf /etc/
COPY asoundrc /root/.asoundrc
COPY assistant.zip /assistant-default.zip
RUN chmod a+x /run.sh

View File

@@ -1,17 +0,0 @@
pcm.!default {
type asym
capture.pcm "mic"
playback.pcm "speaker"
}
pcm.mic {
type plug
slave {
pcm "hw:%%MIC%%"
}
}
pcm.speaker {
type plug
slave {
pcm "hw:%%SPEAKER%%"
}
}

Binary file not shown.

View File

@@ -1,6 +1,6 @@
{
"name": "Snips.AI",
"version": "1.0",
"version": "2.0",
"slug": "snips",
"description": "Local voice control platform",
"url": "https://home-assistant.io/addons/snips/",
@@ -20,8 +20,6 @@
"user": "",
"password": ""
},
"mic": "1,0",
"speaker": "0,0",
"assistant": "assistant.zip"
},
"schema": {
@@ -32,8 +30,6 @@
"user": "str",
"password": "str"
},
"mic": "str",
"speaker": "str",
"assistant": "str"
},
"image": "homeassistant/{arch}-addon-snips"

View File

@@ -5,27 +5,6 @@ CONFIG_PATH=/data/options.json
MQTT_BRIDGE=$(jq --raw-output '.mqtt_bridge.active' $CONFIG_PATH)
ASSISTANT=$(jq --raw-output '.assistant' $CONFIG_PATH)
SPEAKER=$(jq --raw-output '.speaker' $CONFIG_PATH)
MIC=$(jq --raw-output '.mic' $CONFIG_PATH)
echo "[INFO] Show audio output device"
aplay -l
echo "[INFO] Show audio input device"
arecord -l
echo "[INFO] Setup audio device"
if [ -f "/share/asoundrc" ]; then
echo "[INFO] Installing /share/asoundrc"
cp -v /share/asoundrc /root/.asoundrc
else
echo "[INFO] Using default asound.conf"
sed -i "s/%%SPEAKER%%/$SPEAKER/g" /root/.asoundrc
sed -i "s/%%MIC%%/$MIC/g" /root/.asoundrc
fi
echo "[DEBUG] Using /root/.asoundrc"
cat /root/.asoundrc
echo "[INFO] Checking for /share/snips.toml"
if [ -f "/share/snips.toml" ]; then