diff --git a/almond/CHANGELOG.md b/almond/CHANGELOG.md index a23b0a3..cb352af 100644 --- a/almond/CHANGELOG.md +++ b/almond/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 3.0.0 + +- Almond was rebranded to Genie and updated to version 3.0.0. This + is a major release that significantly improves the supported skills + and brings in more robust natural language understanding. +- The wake-word is now "Hey Genie". +- Voice support was overhauled and is now handled by a separate + genie-client package. The client is included in the container for use + with audio directly attached to Home Assistant, and can also be run + separately on a different device. +- As with the previous release, all users are encouraged to upgrade + as soon as possible to maintain compatibility with cloud services. + ## 2.0.1 - Fix url for API requests diff --git a/almond/DOCS.md b/almond/DOCS.md index 20caab3..e04fd19 100644 --- a/almond/DOCS.md +++ b/almond/DOCS.md @@ -1,11 +1,11 @@ -# Home Assistant Add-on: Almond +# Home Assistant Add-on: Genie ## Installation Follow these steps to get the add-on installed on your system: 1. Navigate in your Home Assistant frontend to **Supervisor** -> **Add-on Store**. -2. Find the "Almond" add-on and click it. +2. Find the "Genie" add-on and click it. 3. Click on the "INSTALL" button. ## How to use @@ -30,8 +30,8 @@ You have several options to get them answered: - The [Home Assistant Discord Chat Server][discord]. - The Home Assistant [Community Forum][forum]. - Join the [Reddit subreddit][reddit] in [/r/homeassistant][reddit]. -- The [Almond Discord Chat Server][discordalmond]. -- The Almond [Community Forum][forumalmond]. +- The [Genie Discord Chat Server][discordalmond]. +- The Genie [Community Forum][forumalmond]. In case you've found a bug, please [open an issue on our GitHub][issue]. diff --git a/almond/Dockerfile b/almond/Dockerfile index 69679f7..63d42c3 100644 --- a/almond/Dockerfile +++ b/almond/Dockerfile @@ -4,43 +4,46 @@ FROM ${BUILD_FROM} # Base env settings ENV \ LANG="en_US.utf8" \ + PULSE_SERVER=unix:/run/audio/pulse.sock \ THINGENGINE_HOME="/data/almond-server" \ THINGENGINE_HAS_REVERSE_PROXY=true \ THINGENGINE_HOST_BASED_AUTHENTICATION=insecure \ THINGENGINE_IN_HOME_ASSISTANT_ADDON=true -WORKDIR /opt/almond -ARG ALMOND_VERSION +ARG \ + BUILD_ARCH \ + GENIE_CLIENT_VERSION \ + GENIE_SERVER_VERSION +WORKDIR /usr/src RUN \ set -x \ && apt-get update \ + # Install runtime dependencies && apt-get install -y --no-install-recommends \ - build-essential \ - libcanberra-dev \ - libcanberra0 \ - libpulse-dev \ - libatlas-base-dev \ - libatlas3-base \ - pkg-config \ - ca-certificates \ - git \ + wget \ + curl \ gnupg \ - nginx \ - python-dev \ - software-properties-common \ - unzip \ - sqlite \ - coreutils \ pulseaudio \ pulseaudio-utils \ - gettext \ + libpulse0 \ + libpulse-mainloop-glib0 \ + libasound2 \ + libjson-glib-1.0-0 \ + libevdev2 \ + libsoup2.4-1 \ + libspeexdsp1 \ + libwebrtc-audio-processing1 \ + sound-theme-freedesktop \ + unzip \ + coreutils \ + ca-certificates \ zip \ - wget \ + nginx \ gstreamer1.0-plugins-base-apps \ + gstreamer1.0-plugins-base \ gstreamer1.0-plugins-good \ gstreamer1.0-pulseaudio \ - \ && curl -sS https://deb.nodesource.com/gpgkey/nodesource.gpg.key \ | apt-key add - \ && echo "deb https://deb.nodesource.com/node_12.x buster main" \ @@ -50,39 +53,71 @@ RUN \ && apt-get install -y --no-install-recommends \ nodejs \ \ + # Install genie-client + && apt-get install -y --no-install-recommends \ + build-essential \ + pkg-config \ + ninja-build \ + git \ + meson \ + python-dev \ + gettext \ + libgstreamer1.0-dev \ + libasound2-dev \ + libglib2.0-dev \ + libjson-glib-dev \ + libsoup2.4-dev \ + libevdev-dev \ + libpulse-dev \ + libspeex-dev \ + libspeexdsp-dev \ + libwebrtc-audio-processing-dev \ + && git clone \ + "https://github.com/stanford-oval/genie-client" \ + && cd genie-client \ + && git checkout ${GENIE_CLIENT_VERSION} \ + && git submodule init && git submodule update --recursive \ + && ./scripts/get-assets.sh ${BUILD_ARCH} \ + && meson build \ + && ninja -C build \ + && ninja -C build install \ + \ + # Install genie-server + && mkdir /opt/genie-server \ + && cd /opt/genie-server \ + && apt-get install -y --no-install-recommends \ + && git clone -b ${GENIE_SERVER_VERSION} --depth 1 https://github.com/stanford-oval/genie-server /opt/genie-server \ && npm config set unsafe-perm \ - \ - && git clone -b "${ALMOND_VERSION}" --depth 1 https://github.com/stanford-oval/almond-server . \ && npm ci \ - && npm install --no-package-lock --ignore-scripts snowboy@1.3.1 \ - && cd node_modules/snowboy/ \ - && PYTHON=python2 npx node-pre-gyp clean configure \ - && make -C build/ \ - && rm -fr /root/.cache \ - && rm -fr /root/.npm \ - && mkdir /root/.cache \ - \ && apt-get purge -y --auto-remove \ build-essential \ - libcanberra-dev \ - libpulse-dev \ - libatlas-base-dev \ pkg-config \ git \ - gnupg \ + ninja-build \ + meson \ python-dev \ - software-properties-common \ - \ + libpulse-dev \ + libgstreamer1.0-dev \ + libasound2-dev \ + libglib2.0-dev \ + libjson-glib-dev \ + libsoup2.4-dev \ + libevdev-dev \ + libspeex-dev \ + libspeexdsp-dev \ + libwebrtc-audio-processing-dev \ && rm -rf \ - /opt/almond/.[!.]* \ + /opt/genie-server/.[!.]* \ /root/.cache \ /root/.config \ /tmp/.[!.]* \ /tmp/* \ /usr/local/share/.cache \ /usr/local/share/.config \ - /usr/lib/nginx \ /var/lib/apt/lists/* \ - /var/www + /usr/lib/nginx \ + /var/www \ + /usr/src/* +WORKDIR / COPY rootfs / diff --git a/almond/README.md b/almond/README.md index 729c9ec..cb74f06 100644 --- a/almond/README.md +++ b/almond/README.md @@ -1,22 +1,20 @@ -# Home Assistant Add-on: Almond +# Home Assistant Add-on: Genie The Open-source, Privacy-Preserving Voice Assistant. ![Supports aarch64 Architecture][aarch64-shield] ![Supports amd64 Architecture][amd64-shield] ![Supports armhf Architecture][armhf-shield] ![Supports armv7 Architecture][armv7-shield] ![Supports i386 Architecture][i386-shield] -[Almond] provides a complete solution to turn your Home Assistant +[Genie] provides a complete solution to turn your Home Assistant into a smart speaker. It supports playing music, controlling your IoT, checking the weather, and other simple questions. -To use Almond as a voice assistant, you should connect a microphone and speaker to the -device where Home Assistant is installed. +To use Genie as a voice assistant, you should connect a microphone and speaker to the +device where Home Assistant is installed, or you should provision +a Genie client in a separate smart-speaker device that connects to the +add-on. See the [installation-guide](https://wiki.genie.stanford.edu/getting-started/installation-guide) +for further details. -**Note**: since version 2.0.0 of the add-on, the use of the separate -Ada add-on is not required. Almond includes built-in voice capabilities, -using the wake-word "computer". It is recommended to avoid using Ada -with Almond >= 2.0.0. - -[Almond]: https://almond.stanford.edu/ +[Genie]: https://genie.stanford.edu [aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg [amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg [armhf-shield]: https://img.shields.io/badge/armhf-no-red.svg diff --git a/almond/build.yaml b/almond/build.yaml index 0077f4a..a7b61d5 100644 --- a/almond/build.yaml +++ b/almond/build.yaml @@ -7,4 +7,5 @@ codenotary: signer: notary@home-assistant.io base_image: notary@home-assistant.io args: - ALMOND_VERSION: v2.0.1 + GENIE_SERVER_VERSION: v3.0.1 + GENIE_CLIENT_VERSION: v0.1.0 diff --git a/almond/config.yaml b/almond/config.yaml index 2eb35cf..16a19e3 100644 --- a/almond/config.yaml +++ b/almond/config.yaml @@ -1,7 +1,7 @@ --- -version: 2.0.1 +version: 3.0.0 slug: almond -name: Almond +name: Genie description: The open-source, privacy-preserving voice assistant url: https://github.com/home-assistant/hassio-addons/blob/master/almond arch: diff --git a/almond/icon.png b/almond/icon.png index 9172330..6ed4177 100644 Binary files a/almond/icon.png and b/almond/icon.png differ diff --git a/almond/logo.png b/almond/logo.png index 9172330..6ed4177 100644 Binary files a/almond/logo.png and b/almond/logo.png differ diff --git a/almond/rootfs/etc/almond/default-prefs.db b/almond/rootfs/etc/genie/default-prefs.db similarity index 100% rename from almond/rootfs/etc/almond/default-prefs.db rename to almond/rootfs/etc/genie/default-prefs.db diff --git a/almond/rootfs/etc/services.d/almond/run b/almond/rootfs/etc/services.d/almond/run index 0888d11..4712ec7 100644 --- a/almond/rootfs/etc/services.d/almond/run +++ b/almond/rootfs/etc/services.d/almond/run @@ -1,23 +1,23 @@ #!/usr/bin/with-contenv bashio # ============================================================================== -# Start Almond service +# Start Genie service # ============================================================================== export THINGENGINE_BASE_URL -# Set the Ingress URL as Almond base URL for correct handling +# Set the Ingress URL as Genie base URL for correct handling THINGENGINE_BASE_URL=$(bashio::addon.ingress_entry) mkdir -p /data/almond-server if [ ! -f /data/almond-server/prefs.db ]; then - cp /etc/almond/default-prefs.db /data/almond-server/prefs.db + cp /etc/genie/default-prefs.db /data/almond-server/prefs.db fi # Send out discovery information to Home Assistant ./discovery & -# Register Home Assistant with Almond +# Register Home Assistant with Genie ./register & -# Start Almond -cd /opt/almond || bashio::exit.nok "Failed to change directory to Almond" -exec node main.js +# Start Genie +cd /opt/genie-server || bashio::exit.nok "Failed to change directory to Genie" +exec node dist/main.js