diff --git a/snips/CHANGELOG.md b/snips/CHANGELOG.md index 173b8ba..ced938c 100644 --- a/snips/CHANGELOG.md +++ b/snips/CHANGELOG.md @@ -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 diff --git a/snips/Dockerfile b/snips/Dockerfile index 3c73f26..116aba2 100644 --- a/snips/Dockerfile +++ b/snips/Dockerfile @@ -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 diff --git a/snips/asoundrc b/snips/asoundrc deleted file mode 100644 index 21e0a3f..0000000 --- a/snips/asoundrc +++ /dev/null @@ -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%%" - } -} diff --git a/snips/assistant.zip b/snips/assistant.zip index 90f013d..a1ceb27 100644 Binary files a/snips/assistant.zip and b/snips/assistant.zip differ diff --git a/snips/config.json b/snips/config.json index 623b58c..ef5e72a 100644 --- a/snips/config.json +++ b/snips/config.json @@ -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" diff --git a/snips/run.sh b/snips/run.sh index d5e8d7c..cae7365 100644 --- a/snips/run.sh +++ b/snips/run.sh @@ -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 @@ -74,7 +53,7 @@ echo "[INFO] Checking for updated $ASSISTANT in /share" if [ -f "/share/$ASSISTANT" ]; then echo "[INFO] Install/Update snips assistant" unzip -o -u "/share/$ASSISTANT" -d /usr/share/snips -# otherwise use the default +# otherwise use the default elif [ -f "/assistant-default.zip" ]; then echo "[INFO] Using default snips assistant" unzip -o -u "/assistant-default.zip" -d /usr/share/snips