diff --git a/assist_microphone/CHANGELOG.md b/assist_microphone/CHANGELOG.md deleted file mode 100644 index 927a0a586..000000000 --- a/assist_microphone/CHANGELOG.md +++ /dev/null @@ -1,15 +0,0 @@ -# Changelog - -## 1.3.0 - -- Update to wyoming-satellite 1.3.0 to get support for timers -- Added configuration options for setting timer sound, repetitions and delay - -## 1.2.0 - -- Update to wyoming-satellite 1.2.0 - -## 1.0.0 - -- Initial release - diff --git a/assist_microphone/DOCS.md b/assist_microphone/DOCS.md deleted file mode 100644 index 5c78fcaf5..000000000 --- a/assist_microphone/DOCS.md +++ /dev/null @@ -1,79 +0,0 @@ -# Assist Microphone - -Use [Assist](https://www.home-assistant.io/voice_control/) voice assistant with a USB microphone. For example, a USB webcam. - -## How to use - -After this app (formerly known as add-on) is installed and running, it will be automatically discovered -by the Wyoming integration in Home Assistant. To finish the setup, -click the following my button: - -[![Open your Home Assistant instance and start setting up a new integration.](https://my.home-assistant.io/badges/config_flow_start.svg)](https://my.home-assistant.io/redirect/config_flow_start/?domain=wyoming) - -Alternatively, you can install the Wyoming integration manually, see the -[Wyoming integration documentation](https://www.home-assistant.io/integrations/wyoming/) -for more information. - -## Configuration - -### Option: `awake_wav` - -Path to WAV file to play when wake word is detected (empty to disable, default is `/usr/src/sounds/awake.wav`). - -### Option: `done_wav` - -Path to WAV file to play when voice command is finished (empty to disable, default is `/usr/src/sounds/done.wav`). - -### Option: `timer_finished_wav` - -Path to WAV file to play when timer is finished (empty to disable, default is `/usr/src/sounds/timer_finished.wav`). - -### Option: `timer_repeat_count` - -Number of times to repeat `timer_finished_wav` (default is 3). - -### Option: `timer_repeat_delay` - -Delay before repeating `timer_finished_wav`, in seconds (default is 0.75). - -### Option: `noise_suppression` - -Noise suppression level (0 is disabled, 4 is max). Disabled by default. - -### Option: `auto_gain` - -Automatic volume boost for microphone (0 is disabled, 31 dbfs is max). Disabled by default. - -### Option: `mic_volume_multiplier` - -Multiply microphone volume by fixed value (1.0 = no change, 2.0 = twice as loud). 1.0 is the default. - -### Option: `sound_enabled` - -Enables or disables output audio. - -### Option: `sound_volume_multiplier` - -Multiply sound output volume by fixed value (1.0 = no change, 2.0 = twice as loud). 1.0 is the default. - -### Option: `debug_logging` - -Enable debug logging. - -## Support - -Got questions? - -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] - -In case you've found an bug, please [open an issue on our GitHub][issue]. - -[discord]: https://discord.gg/c5DvZ4e -[forum]: https://community.home-assistant.io -[issue]: https://github.com/home-assistant/addons/issues -[reddit]: https://reddit.com/r/homeassistant -[repository]: https://github.com/hassio-addons/repository diff --git a/assist_microphone/Dockerfile b/assist_microphone/Dockerfile deleted file mode 100644 index 9c6dab263..000000000 --- a/assist_microphone/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -ARG BUILD_FROM -FROM ${BUILD_FROM} - -# Set shell -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - -WORKDIR /usr/src -ARG WYOMING_SATELLITE_VERSION -ENV PIP_BREAK_SYSTEM_PACKAGES=1 - -RUN \ - apt-get update \ - && apt-get install -y --no-install-recommends \ - netcat-traditional \ - libasound2-plugins \ - alsa-utils \ - python3 \ - python3-pip \ - \ - && pip3 install --no-cache-dir -U \ - setuptools \ - wheel \ - && pip3 install --no-cache-dir \ - "wyoming-satellite[webrtc] @ https://github.com/rhasspy/wyoming-satellite/archive/refs/tags/v${WYOMING_SATELLITE_VERSION}.tar.gz" \ - \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -COPY sounds/ ./sounds/ - -WORKDIR / -COPY rootfs / - -HEALTHCHECK --start-period=10m \ - CMD echo '{ "type": "describe" }' \ - | nc -w 1 localhost 10700 \ - | grep -q "assist" \ - || exit 1 diff --git a/assist_microphone/config.yaml b/assist_microphone/config.yaml deleted file mode 100644 index 62dabbbd7..000000000 --- a/assist_microphone/config.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -version: 1.3.0 -slug: assist_microphone -name: Assist Microphone -description: Use Assist with local microphone -url: https://github.com/home-assistant/addons/blob/master/assist_microphone -hassio_api: true -arch: - - amd64 - - aarch64 -init: false -discovery: - - wyoming -map: - - share:ro -options: - awake_wav: "/usr/src/sounds/awake.wav" - done_wav: "/usr/src/sounds/done.wav" - timer_finished_wav: "/usr/src/sounds/timer_finished.wav" - timer_repeat_count: 3 - timer_repeat_delay: 0.75 - sound_enabled: true - noise_suppression: 0 - auto_gain: 0 - mic_volume_multiplier: 1.0 - sound_volume_multiplier: 1.0 - debug_logging: false -schema: - awake_wav: str - done_wav: str - timer_finished_wav: str - timer_repeat_count: int - timer_repeat_delay: float - sound_enabled: bool - noise_suppression: int - auto_gain: int - mic_volume_multiplier: float - sound_volume_multiplier: float - debug_logging: bool -audio: true -homeassistant: 2023.12.1 -image: homeassistant/{arch}-addon-assist_microphone diff --git a/assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/assist_microphone/run b/assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/assist_microphone/run deleted file mode 100755 index 01aaedb7b..000000000 --- a/assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/assist_microphone/run +++ /dev/null @@ -1,29 +0,0 @@ -#!/command/with-contenv bashio -# vim: ft=bash -# shellcheck shell=bash -# ============================================================================== -# Start service -# ============================================================================== -extra_args=() -if bashio::config.true 'debug_logging'; then - extra_args+=('--debug') -fi - -if bashio::config.true 'sound_enabled'; then - extra_args+=('--snd-command' 'aplay -r 16000 -c 1 -f S16_LE -t raw') -fi - -exec python3 -m wyoming_satellite \ - --name 'assist microphone' \ - --uri 'tcp://0.0.0.0:10700' \ - --mic-command 'arecord -r 16000 -c 1 -f S16_LE -t raw' \ - --snd-command-rate 16000 \ - --awake-wav "$(bashio::config 'awake_wav')" \ - --done-wav "$(bashio::config 'done_wav')" \ - --timer-finished-wav "$(bashio::config 'timer_finished_wav')" \ - --timer-finished-wav-repeat "$(bashio::config 'timer_repeat_count')" "$(bashio::config 'timer_repeat_delay')" \ - --mic-volume-multiplier "$(bashio::config 'mic_volume_multiplier')" \ - --snd-volume-multiplier "$(bashio::config 'sound_volume_multiplier')" \ - --mic-auto-gain "$(bashio::config 'auto_gain')" \ - --mic-noise-suppression "$(bashio::config 'noise_suppression')" \ - --no-zeroconf "${extra_args[@]}" diff --git a/assist_microphone/translations/en.yaml b/assist_microphone/translations/en.yaml deleted file mode 100644 index 411674d78..000000000 --- a/assist_microphone/translations/en.yaml +++ /dev/null @@ -1,50 +0,0 @@ ---- -configuration: - awake_wav: - name: Awake WAV - description: >- - Path to WAV file to play when wake word is detected (empty to disable). - done_wav: - name: Done WAV - description: >- - Path to WAV file to play when voice command is finished (empty to - disable). - timer_finished_wav: - name: Timer Finished WAV - description: >- - Path to WAV file to play when timer is finished (empty to disable, - default is /usr/src/sounds/timer_finished.wav). - timer_repeat_count: - name: Timer Finished WAV Repetition Count - description: >- - Number of times to repeat timer_finished_wav (default is 3). - timer_repeat_delay: - name: Timer Repetition Delay - description: >- - Delay before repeating timer_finished_wav, in seconds (default is 0.75). - noise_suppression: - name: Noise suppression - description: >- - Noise suppression level (0 is disabled, 4 is max). - auto_gain: - name: Auto gain - description: >- - Automatic volume boost for microphone (0 is disabled, 31 is max). - mic_volume_multiplier: - name: Microphone volume multiplier - description: >- - Multiply microphone volume by fixed value (1.0 = no change, 2.0 = twice as - loud). - sound_enabled: - name: Sound enabled - description: >- - Enables or disables output audio. - sound_volume_multiplier: - name: Sound volume multiplier - description: >- - Multiply sound output volume by fixed value (1.0 = no change, 2.0 = twice - as loud). 1.0 is the default. - debug_logging: - name: Debug logging - description: >- - Enable debug logging. diff --git a/assist_satellite/CHANGELOG.md b/assist_satellite/CHANGELOG.md new file mode 100644 index 000000000..999ac3e08 --- /dev/null +++ b/assist_satellite/CHANGELOG.md @@ -0,0 +1,38 @@ +# Changelog + +## 2.0.0 + +### Migrate from wyoming satellite to [linux voice assistant](https://github.com/OHF-Voice/linux-voice-assistant) + +- App renamed from "Assist Microphone" to "Assist Satellite" +- Replaced Wyoming satellite protocol with the ESPHome satellite protocol + (linux-voice-assistant) +- Home Assistant now discovers the satellite via the ESPHome integration + using built-in mDNS/zeroconf — no separate discovery step required +- Wake word detection now runs locally on-device using micro-wake-word and + openWakeWord models +- Added support for selecting wake word model, audio devices, refractory + period, and thinking sound via add-on configuration +- Added stop word for annoucements and timers +- Preferences (active wake word, volume) are persisted across restarts in + `/share/assist_satellite/preferences.json` +- Custom wake word models downloaded from Home Assistant are stored in + `/share/assist_satellite/local` +- Satellite name, mute switch, and thinking sound toggle are now exposed as + entities in Home Assistant on the ESPHome device page +- Added new media player entity in Home Assistant on the ESPHome device + with volume control (for both satellite and media player) + +## 1.3.0 + +- Update to wyoming-satellite 1.3.0 to get support for timers +- Added configuration options for setting timer sound, repetitions and delay + +## 1.2.0 + +- Update to wyoming-satellite 1.2.0 + +## 1.0.0 + +- Initial release + diff --git a/assist_satellite/DOCS.md b/assist_satellite/DOCS.md new file mode 100644 index 000000000..b23277d08 --- /dev/null +++ b/assist_satellite/DOCS.md @@ -0,0 +1,83 @@ +# Assist Satellite + +Use [Assist](https://www.home-assistant.io/voice_control/) voice assistant with +a local USB microphone for STT commands and a speaker for audio playback. This app uses the [ESPHome](https://esphome.io/) satellite protocol based on [Linux Voice Assistant](https://github.com/OHF-Voice/linux-voice-assistant) and is automatically discovered by Home Assistant via the ESPHome integration. + +> [!NOTE] +> **Running Home Assistant OS in a virtual machine?** +> The microphone and speaker must be passed through from the host to the VM +> before this app can use them. How to do this depends on your hypervisor — +> consult its documentation for USB or audio device passthrough. + +## How to use + +After this app is installed and running it will be automatically discovered by +the ESPHome integration in Home Assistant. To finish the setup, click the +following button: + +[![Open your Home Assistant instance and start setting up a new integration.](https://my.home-assistant.io/badges/config_flow_start.svg)](https://my.home-assistant.io/redirect/config_flow_start/?domain=esphome) + +Once connected, the satellite exposes the following controls on its Home +Assistant device page: + +- **Media Player** — volume control and media playback +- **Mute switch** — disable/enable wake word detection at runtime +- **Thinking Sound switch** — toggle the processing sound that plays while the assistant thinks + +## Configuration + +### Option: `name` + +Friendly name shown in Home Assistant. Leave empty to auto-generate from MAC address. + +### Option: `port` + +TCP port the ESPHome satellite server listens on (default: `6053`). Only change +this if you run multiple satellites on the same host. + +### Option: `audio_input_device` + +Soundcard name or index for microphone input. Leave empty to use the system +default. Enable `debug_logging` to list available devices in the log. + +### Option: `audio_output_device` + +mpv audio device name for sound output. Leave empty to use the system default. +Enable `debug_logging` to list available devices in the log. + +### Option: `wake_word` + +ID of the wake word model (default: `okay_nabu`). Can also be changed at +runtime from Home Assistant voice assistant settings. + +### Option: `refractory_seconds` + +Minimum seconds between wake word activations to prevent double-triggers +(default: `2.0`). + +### Option: `thinking_sound` + +Play a short sound while the assistant processes a request (default: `false`). +Can be toggled at runtime from the Home Assistant device page. + +### Option: `debug_logging` + +Enable verbose debug logging. + +## Support + +Got questions? + +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] + +In case you've found an bug, please [open an issue on our GitHub][issue]. + +[discord]: https://www.home-assistant.io/join-chat +[forum]: https://community.home-assistant.io +[issue]: https://github.com/home-assistant/addons/issues +[reddit]: https://reddit.com/r/homeassistant +[repository]: https://github.com/hassio-addons/repository diff --git a/assist_satellite/Dockerfile b/assist_satellite/Dockerfile new file mode 100644 index 000000000..c02762ff8 --- /dev/null +++ b/assist_satellite/Dockerfile @@ -0,0 +1,58 @@ +ARG BUILD_FROM +FROM ${BUILD_FROM} + +# Set shell +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +WORKDIR /usr/src +ARG LINUX_VOICE_ASSISTANT_VERSION +ENV PIP_BREAK_SYSTEM_PACKAGES=1 + +# Install system dependencies +# Mirrors the packages from the upstream linux-voice-assistant Dockerfile: +# - avahi-utils: For zeroconf/mDNS discovery by Home Assistant +# - pulseaudio-utils: Required by soundcard library for audio I/O +# - alsa-utils: ALSA tools for audio device management +# - pipewire-*: Required for PipeWire support (modern Linux audio stack) +# - build-essential: Required to compile pymicro-features C extension +# - libmpv-dev: Required by python-mpv for audio playback +# - libasound2-plugins: Required by python-mpv for audio playback +# - ca-certificates: For encrypted connections to Home Assistant +# - procps: For pgrep in healthcheck +RUN \ + apt-get update \ + && apt-get install -y --no-install-recommends \ + python3 \ + python3-pip \ + avahi-utils \ + pulseaudio-utils \ + alsa-utils \ + pipewire-bin \ + pipewire-alsa \ + pipewire-pulse \ + build-essential \ + libmpv-dev \ + libasound2-plugins \ + ca-certificates \ + procps \ + \ + && pip3 install --no-cache-dir -U \ + setuptools \ + wheel \ + && pip3 install --no-cache-dir \ + "linux-voice-assistant @ https://github.com/OHF-Voice/linux-voice-assistant/archive/refs/tags/v${LINUX_VOICE_ASSISTANT_VERSION}.tar.gz" \ + \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +# Copy default sounds +COPY sounds/ ./sounds/ + +# Copy wake word models +COPY wakewords/ ./wakewords/ + +WORKDIR / +COPY rootfs / + +HEALTHCHECK --start-period=10m \ + CMD pgrep -f linux_voice_assistant || exit 1 \ No newline at end of file diff --git a/assist_microphone/README.md b/assist_satellite/README.md similarity index 52% rename from assist_microphone/README.md rename to assist_satellite/README.md index df7739c5b..cf1e2db1b 100644 --- a/assist_microphone/README.md +++ b/assist_satellite/README.md @@ -1,8 +1,10 @@ -# Home Assistant App: Assist Microphone +# Home Assistant App: Assist Satellite ![Supports aarch64 Architecture][aarch64-shield] ![Supports amd64 Architecture][amd64-shield] -Home Assistant app (formerly known as add-on) that uses a local USB microphone to control [Assist](https://www.home-assistant.io/voice_control/). +Home Assistant app (formerly known as add-on) that turns the machine running home assistant into a [voice satellite](https://www.home-assistant.io/voice_control/) with [media player](https://www.home-assistant.io/integrations/media_player/) using a connected microphone and speaker. + +Depends on [Linux Voice Assistant](https://github.com/OHF-Voice/linux-voice-assistant) runtime via [ESPHome](https://esphome.io/) protocol. Part of the [Year of Voice](https://www.home-assistant.io/blog/2022/12/20/year-of-voice/). diff --git a/assist_microphone/build.yaml b/assist_satellite/build.yaml similarity index 78% rename from assist_microphone/build.yaml rename to assist_satellite/build.yaml index 1ab09e7b2..0fd3ee901 100644 --- a/assist_microphone/build.yaml +++ b/assist_satellite/build.yaml @@ -3,4 +3,4 @@ build_from: amd64: ghcr.io/home-assistant/amd64-base-debian:bookworm aarch64: ghcr.io/home-assistant/aarch64-base-debian:bookworm args: - WYOMING_SATELLITE_VERSION: 1.3.0 + LINUX_VOICE_ASSISTANT_VERSION: 1.1.9 diff --git a/assist_satellite/config.yaml b/assist_satellite/config.yaml new file mode 100644 index 000000000..beaf241e5 --- /dev/null +++ b/assist_satellite/config.yaml @@ -0,0 +1,36 @@ +--- +version: 2.0.0 +slug: assist_satellite +name: Assist Satellite +description: Turn HA host into a voice assistant with a connected microphone and speaker +url: https://github.com/home-assistant/addons/blob/master/assist_satellite +hassio_api: false +arch: + - amd64 + - aarch64 +init: false +discovery: + - esphome +map: + - share:rw +options: + name: "" + port: 6053 + audio_input_device: "" + audio_output_device: "" + wake_word: "okay_nabu" + refractory_seconds: 2.0 + thinking_sound: false + debug_logging: false +schema: + name: str + port: int + audio_input_device: str + audio_output_device: str + wake_word: str + refractory_seconds: float + thinking_sound: bool + debug_logging: bool +audio: true +homeassistant: 2026.3.0 +image: homeassistant/{arch}-addon-assist_satellite \ No newline at end of file diff --git a/assist_satellite/icon.png b/assist_satellite/icon.png new file mode 100644 index 000000000..929ab3091 Binary files /dev/null and b/assist_satellite/icon.png differ diff --git a/assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/assist_microphone/dependencies.d/base b/assist_satellite/rootfs/etc/s6-overlay/s6-rc.d/assist_satellite/dependencies.d/base similarity index 100% rename from assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/assist_microphone/dependencies.d/base rename to assist_satellite/rootfs/etc/s6-overlay/s6-rc.d/assist_satellite/dependencies.d/base diff --git a/assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/assist_microphone/finish b/assist_satellite/rootfs/etc/s6-overlay/s6-rc.d/assist_satellite/finish old mode 100755 new mode 100644 similarity index 100% rename from assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/assist_microphone/finish rename to assist_satellite/rootfs/etc/s6-overlay/s6-rc.d/assist_satellite/finish diff --git a/assist_satellite/rootfs/etc/s6-overlay/s6-rc.d/assist_satellite/run b/assist_satellite/rootfs/etc/s6-overlay/s6-rc.d/assist_satellite/run new file mode 100644 index 000000000..5e2400ec2 --- /dev/null +++ b/assist_satellite/rootfs/etc/s6-overlay/s6-rc.d/assist_satellite/run @@ -0,0 +1,52 @@ +#!/command/with-contenv bashio +# vim: ft=bash +# shellcheck shell=bash +# ============================================================================== +# Start the Assist Satellite service (linux-voice-assistant) +# ============================================================================== +declare -a extra_args=() + +# Debug logging +if bashio::config.true 'debug_logging'; then + extra_args+=('--debug') +fi + +# Thinking sound (processing sound played while assistant thinks) +if bashio::config.true 'thinking_sound'; then + extra_args+=('--enable-thinking-sound') +fi + +# Optional friendly name (auto-generated from MAC if empty) +declare name +name="$(bashio::config 'name')" +if [[ -n "${name}" ]]; then + extra_args+=('--name' "${name}") +fi + +# Optional audio input device +declare audio_input_device +audio_input_device="$(bashio::config 'audio_input_device')" +if [[ -n "${audio_input_device}" ]]; then + extra_args+=('--audio-input-device' "${audio_input_device}") +fi + +# Optional audio output device +declare audio_output_device +audio_output_device="$(bashio::config 'audio_output_device')" +if [[ -n "${audio_output_device}" ]]; then + extra_args+=('--audio-output-device' "${audio_output_device}") +fi + +exec python3 -m linux_voice_assistant \ + --port "$(bashio::config 'port')" \ + --wake-model "$(bashio::config 'wake_word')" \ + --refractory-seconds "$(bashio::config 'refractory_seconds')" \ + --wake-word-dir /usr/src/wakewords \ + --wakeup-sound /usr/src/sounds/wake_word_triggered.flac \ + --timer-finished-sound /usr/src/sounds/timer_finished.flac \ + --processing-sound /usr/src/sounds/processing.wav \ + --mute-sound /usr/src/sounds/mute_switch_on.flac \ + --unmute-sound /usr/src/sounds/mute_switch_off.flac \ + --preferences-file /share/assist_satellite/preferences.json \ + --download-dir /share/assist_satellite/local \ + "${extra_args[@]}" \ No newline at end of file diff --git a/assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/assist_microphone/type b/assist_satellite/rootfs/etc/s6-overlay/s6-rc.d/assist_satellite/type similarity index 100% rename from assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/assist_microphone/type rename to assist_satellite/rootfs/etc/s6-overlay/s6-rc.d/assist_satellite/type diff --git a/assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/discovery/dependencies.d/assist_microphone b/assist_satellite/rootfs/etc/s6-overlay/s6-rc.d/discovery/dependencies.d/assist_satellite similarity index 100% rename from assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/discovery/dependencies.d/assist_microphone rename to assist_satellite/rootfs/etc/s6-overlay/s6-rc.d/discovery/dependencies.d/assist_satellite diff --git a/assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/discovery/run b/assist_satellite/rootfs/etc/s6-overlay/s6-rc.d/discovery/run old mode 100755 new mode 100644 similarity index 80% rename from assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/discovery/run rename to assist_satellite/rootfs/etc/s6-overlay/s6-rc.d/discovery/run index fa40eecd9..dbe107526 --- a/assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/discovery/run +++ b/assist_satellite/rootfs/etc/s6-overlay/s6-rc.d/discovery/run @@ -10,15 +10,15 @@ declare config bash -c \ "until echo '{ \"type\": \"describe\" }' - > /dev/tcp/localhost/10700; do sleep 0.5; + > /dev/tcp/localhost/6053; do sleep 0.5; done" > /dev/null 2>&1 || true; config=$(\ bashio::var.json \ - uri "tcp://$(hostname):10700" \ + uri "tcp://$(hostname):6053" \ ) -if bashio::discovery "wyoming" "${config}" > /dev/null; then +if bashio::discovery "esphome" "${config}" > /dev/null; then bashio::log.info "Successfully sent discovery information to Home Assistant." else bashio::log.error "Discovery message to Home Assistant failed!" diff --git a/assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/discovery/type b/assist_satellite/rootfs/etc/s6-overlay/s6-rc.d/discovery/type similarity index 100% rename from assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/discovery/type rename to assist_satellite/rootfs/etc/s6-overlay/s6-rc.d/discovery/type diff --git a/assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/discovery/up b/assist_satellite/rootfs/etc/s6-overlay/s6-rc.d/discovery/up old mode 100755 new mode 100644 similarity index 100% rename from assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/discovery/up rename to assist_satellite/rootfs/etc/s6-overlay/s6-rc.d/discovery/up diff --git a/assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/assist_microphone b/assist_satellite/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/assist_satellite similarity index 100% rename from assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/assist_microphone rename to assist_satellite/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/assist_satellite diff --git a/assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/discovery b/assist_satellite/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/discovery similarity index 100% rename from assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/discovery rename to assist_satellite/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/discovery diff --git a/assist_satellite/sounds/LICENSE.md b/assist_satellite/sounds/LICENSE.md new file mode 100644 index 000000000..4872f4ff5 --- /dev/null +++ b/assist_satellite/sounds/LICENSE.md @@ -0,0 +1 @@ +[Home Assistant Voice Preview Edition Sounds](https://github.com/esphome/home-assistant-voice-pe/tree/dev/sounds) © 2024 by [Clayton Charles Tapp](https://www.cctaudio.com/) is licensed under [Creative Commons Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/?ref=chooser-v1) diff --git a/assist_satellite/sounds/mute_switch_off.flac b/assist_satellite/sounds/mute_switch_off.flac new file mode 100644 index 000000000..8ca4c6869 Binary files /dev/null and b/assist_satellite/sounds/mute_switch_off.flac differ diff --git a/assist_satellite/sounds/mute_switch_on.flac b/assist_satellite/sounds/mute_switch_on.flac new file mode 100644 index 000000000..de317739e Binary files /dev/null and b/assist_satellite/sounds/mute_switch_on.flac differ diff --git a/assist_microphone/sounds/done.wav b/assist_satellite/sounds/processing.wav similarity index 100% rename from assist_microphone/sounds/done.wav rename to assist_satellite/sounds/processing.wav diff --git a/assist_satellite/sounds/timer_finished.flac b/assist_satellite/sounds/timer_finished.flac new file mode 100644 index 000000000..29686077a Binary files /dev/null and b/assist_satellite/sounds/timer_finished.flac differ diff --git a/assist_microphone/sounds/timer_finished.wav b/assist_satellite/sounds/timer_finished_old.wav similarity index 100% rename from assist_microphone/sounds/timer_finished.wav rename to assist_satellite/sounds/timer_finished_old.wav diff --git a/assist_satellite/sounds/wake_word_triggered.flac b/assist_satellite/sounds/wake_word_triggered.flac new file mode 100644 index 000000000..414e80890 Binary files /dev/null and b/assist_satellite/sounds/wake_word_triggered.flac differ diff --git a/assist_microphone/sounds/awake.wav b/assist_satellite/sounds/wake_word_triggered_old.wav similarity index 100% rename from assist_microphone/sounds/awake.wav rename to assist_satellite/sounds/wake_word_triggered_old.wav diff --git a/assist_satellite/translations/en.yaml b/assist_satellite/translations/en.yaml new file mode 100644 index 000000000..3212d0dc8 --- /dev/null +++ b/assist_satellite/translations/en.yaml @@ -0,0 +1,42 @@ +--- +configuration: + name: + name: Name + description: >- + Friendly name for this satellite shown in Home Assistant. Leave empty to + auto-generate a name based on the device MAC address. + port: + name: Port + description: >- + TCP port the ESPHome satellite server listens on (default: 6053). + audio_input_device: + name: Audio input device + description: >- + Soundcard name or index for the microphone input. Leave empty to use the + system default microphone. Run with debug logging to list available + devices. + audio_output_device: + name: Audio output device + description: >- + mpv audio device name for sound output. Leave empty to use the system + default output. Run with debug logging to list available devices. + wake_word: + name: Wake word + description: >- + ID of the wake word model to activate the assistant (default: + okay_nabu). The available wake words are determined by the models + bundled with the image or downloaded from Home Assistant. + refractory_seconds: + name: Refractory period + description: >- + Minimum seconds between wake word activations to prevent accidental + double-triggers (default: 2.0). + thinking_sound: + name: Thinking sound + description: >- + Play a short processing sound while the assistant is thinking. Can also + be toggled at runtime from the Home Assistant device page. + debug_logging: + name: Debug logging + description: >- + Enable verbose debug logging. \ No newline at end of file diff --git a/assist_satellite/wakewords/alexa.json b/assist_satellite/wakewords/alexa.json new file mode 100644 index 000000000..dff427a98 --- /dev/null +++ b/assist_satellite/wakewords/alexa.json @@ -0,0 +1,16 @@ +{ + "type": "micro", + "wake_word": "Alexa", + "author": "Kevin Ahrendt", + "website": "https://www.kevinahrendt.com/", + "model": "alexa.tflite", + "trained_languages": ["en"], + "version": 2, + "micro": { + "probability_cutoff": 0.9, + "sliding_window_size": 5, + "feature_step_size": 10, + "tensor_arena_size": 22348, + "minimum_esphome_version": "2024.7.0" + } +} diff --git a/assist_satellite/wakewords/alexa.tflite b/assist_satellite/wakewords/alexa.tflite new file mode 100644 index 000000000..b9a87dd4d Binary files /dev/null and b/assist_satellite/wakewords/alexa.tflite differ diff --git a/assist_satellite/wakewords/choo_choo_homie.json b/assist_satellite/wakewords/choo_choo_homie.json new file mode 100644 index 000000000..070fd581f --- /dev/null +++ b/assist_satellite/wakewords/choo_choo_homie.json @@ -0,0 +1,18 @@ +{ + "type": "micro", + "wake_word": "Choo Choo Homie", + "author": "Michael Hansen", + "website": "https://www.home-assistant.io", + "model": "choo_choo_homie.tflite", + "trained_languages": [ + "en" + ], + "version": 2, + "micro": { + "probability_cutoff": 0.97, + "feature_step_size": 10, + "sliding_window_size": 5, + "tensor_arena_size": 30000, + "minimum_esphome_version": "2024.7.0" + } +} \ No newline at end of file diff --git a/assist_satellite/wakewords/choo_choo_homie.tflite b/assist_satellite/wakewords/choo_choo_homie.tflite new file mode 100644 index 000000000..d03f2a43a Binary files /dev/null and b/assist_satellite/wakewords/choo_choo_homie.tflite differ diff --git a/assist_satellite/wakewords/hey_home_assistant.json b/assist_satellite/wakewords/hey_home_assistant.json new file mode 100644 index 000000000..b49f8afcc --- /dev/null +++ b/assist_satellite/wakewords/hey_home_assistant.json @@ -0,0 +1,16 @@ +{ + "type": "micro", + "wake_word": "Hey Home Assistant", + "author": "Michael Hansen", + "website": "https://www.home-assistant.io", + "model": "hey_home_assistant.tflite", + "trained_languages": ["en"], + "version": 2, + "micro": { + "probability_cutoff": 0.97, + "feature_step_size": 10, + "sliding_window_size": 5, + "tensor_arena_size": 30000, + "minimum_esphome_version": "2024.7.0" + } +} diff --git a/assist_satellite/wakewords/hey_home_assistant.tflite b/assist_satellite/wakewords/hey_home_assistant.tflite new file mode 100644 index 000000000..c6dc40aa5 Binary files /dev/null and b/assist_satellite/wakewords/hey_home_assistant.tflite differ diff --git a/assist_satellite/wakewords/hey_jarvis.json b/assist_satellite/wakewords/hey_jarvis.json new file mode 100644 index 000000000..e6733fe13 --- /dev/null +++ b/assist_satellite/wakewords/hey_jarvis.json @@ -0,0 +1,16 @@ +{ + "type": "micro", + "wake_word": "Hey Jarvis", + "author": "Kevin Ahrendt", + "website": "https://www.kevinahrendt.com/", + "model": "hey_jarvis.tflite", + "trained_languages": ["en"], + "version": 2, + "micro": { + "probability_cutoff": 0.97, + "feature_step_size": 10, + "sliding_window_size": 5, + "tensor_arena_size": 22860, + "minimum_esphome_version": "2024.7.0" + } +} diff --git a/assist_satellite/wakewords/hey_jarvis.tflite b/assist_satellite/wakewords/hey_jarvis.tflite new file mode 100644 index 000000000..007530243 Binary files /dev/null and b/assist_satellite/wakewords/hey_jarvis.tflite differ diff --git a/assist_satellite/wakewords/hey_luna.json b/assist_satellite/wakewords/hey_luna.json new file mode 100644 index 000000000..a293cbc6e --- /dev/null +++ b/assist_satellite/wakewords/hey_luna.json @@ -0,0 +1,16 @@ +{ + "type": "micro", + "wake_word": "hey_luna", + "author": "adamlonsdale", + "website": "https://github.com/adamlonsdale", + "model": "hey_luna.tflite", + "version": 2, + "trained_languages": ["en"], + "micro": { + "probability_cutoff": 0.63, + "sliding_window_size": 5, + "feature_step_size": 10, + "tensor_arena_size": 22860, + "minimum_esphome_version": "2024.7.0" + } + } diff --git a/assist_satellite/wakewords/hey_luna.tflite b/assist_satellite/wakewords/hey_luna.tflite new file mode 100644 index 000000000..fcc01ed21 Binary files /dev/null and b/assist_satellite/wakewords/hey_luna.tflite differ diff --git a/assist_satellite/wakewords/hey_mycroft.json b/assist_satellite/wakewords/hey_mycroft.json new file mode 100644 index 000000000..995c1889c --- /dev/null +++ b/assist_satellite/wakewords/hey_mycroft.json @@ -0,0 +1,16 @@ +{ + "type": "micro", + "wake_word": "Hey Mycroft", + "author": "Kevin Ahrendt", + "website": "https://www.kevinahrendt.com/", + "model": "hey_mycroft.tflite", + "trained_languages": ["en"], + "version": 2, + "micro": { + "probability_cutoff": 0.95, + "sliding_window_size": 5, + "feature_step_size": 10, + "tensor_arena_size": 23628, + "minimum_esphome_version": "2024.7.0" + } +} diff --git a/assist_satellite/wakewords/hey_mycroft.tflite b/assist_satellite/wakewords/hey_mycroft.tflite new file mode 100644 index 000000000..0ab2f7537 Binary files /dev/null and b/assist_satellite/wakewords/hey_mycroft.tflite differ diff --git a/assist_satellite/wakewords/okay_computer.json b/assist_satellite/wakewords/okay_computer.json new file mode 100644 index 000000000..4b738ea4a --- /dev/null +++ b/assist_satellite/wakewords/okay_computer.json @@ -0,0 +1,18 @@ +{ + "type": "micro", + "wake_word": "Okay Computer", + "author": "Michael Hansen", + "website": "https://www.home-assistant.io", + "model": "okay_computer.tflite", + "trained_languages": [ + "en" + ], + "version": 2, + "micro": { + "probability_cutoff": 0.97, + "feature_step_size": 10, + "sliding_window_size": 5, + "tensor_arena_size": 30000, + "minimum_esphome_version": "2024.7.0" + } +} diff --git a/assist_satellite/wakewords/okay_computer.tflite b/assist_satellite/wakewords/okay_computer.tflite new file mode 100644 index 000000000..939a3035c Binary files /dev/null and b/assist_satellite/wakewords/okay_computer.tflite differ diff --git a/assist_satellite/wakewords/okay_nabu.json b/assist_satellite/wakewords/okay_nabu.json new file mode 100644 index 000000000..6fd7b8037 --- /dev/null +++ b/assist_satellite/wakewords/okay_nabu.json @@ -0,0 +1,16 @@ +{ + "type": "micro", + "wake_word": "Okay Nabu", + "author": "Kevin Ahrendt", + "website": "https://www.kevinahrendt.com/", + "model": "okay_nabu.tflite", + "trained_languages": ["en","nl","fr","de","it","es","sv"], + "version": 2, + "micro": { + "probability_cutoff": 0.85, + "feature_step_size": 10, + "sliding_window_size": 5, + "tensor_arena_size": 37000, + "minimum_esphome_version": "2024.7.0" + } +} diff --git a/assist_satellite/wakewords/okay_nabu.tflite b/assist_satellite/wakewords/okay_nabu.tflite new file mode 100644 index 000000000..00379f1df Binary files /dev/null and b/assist_satellite/wakewords/okay_nabu.tflite differ diff --git a/assist_satellite/wakewords/openWakeWord/alexa_v0.1.json b/assist_satellite/wakewords/openWakeWord/alexa_v0.1.json new file mode 100644 index 000000000..c7a4d2e27 --- /dev/null +++ b/assist_satellite/wakewords/openWakeWord/alexa_v0.1.json @@ -0,0 +1,5 @@ +{ + "type": "openWakeWord", + "wake_word": "Alexa", + "model": "alexa_v0.1.tflite" +} diff --git a/assist_satellite/wakewords/openWakeWord/alexa_v0.1.tflite b/assist_satellite/wakewords/openWakeWord/alexa_v0.1.tflite new file mode 100644 index 000000000..de9ff4393 Binary files /dev/null and b/assist_satellite/wakewords/openWakeWord/alexa_v0.1.tflite differ diff --git a/assist_satellite/wakewords/openWakeWord/hey_jarvis_v0.1.json b/assist_satellite/wakewords/openWakeWord/hey_jarvis_v0.1.json new file mode 100644 index 000000000..b7d632ed1 --- /dev/null +++ b/assist_satellite/wakewords/openWakeWord/hey_jarvis_v0.1.json @@ -0,0 +1,5 @@ +{ + "type": "openWakeWord", + "wake_word": "Hey Jarvis", + "model": "hey_jarvis_v0.1.tflite" +} diff --git a/assist_satellite/wakewords/openWakeWord/hey_jarvis_v0.1.tflite b/assist_satellite/wakewords/openWakeWord/hey_jarvis_v0.1.tflite new file mode 100644 index 000000000..aafb0432a Binary files /dev/null and b/assist_satellite/wakewords/openWakeWord/hey_jarvis_v0.1.tflite differ diff --git a/assist_satellite/wakewords/openWakeWord/hey_mycroft_v0.1.json b/assist_satellite/wakewords/openWakeWord/hey_mycroft_v0.1.json new file mode 100644 index 000000000..abd5118b9 --- /dev/null +++ b/assist_satellite/wakewords/openWakeWord/hey_mycroft_v0.1.json @@ -0,0 +1,5 @@ +{ + "type": "openWakeWord", + "wake_word": "Hey Mycroft", + "model": "hey_mycroft_v0.1.tflite" +} diff --git a/assist_satellite/wakewords/openWakeWord/hey_mycroft_v0.1.tflite b/assist_satellite/wakewords/openWakeWord/hey_mycroft_v0.1.tflite new file mode 100644 index 000000000..d8a644ae8 Binary files /dev/null and b/assist_satellite/wakewords/openWakeWord/hey_mycroft_v0.1.tflite differ diff --git a/assist_satellite/wakewords/openWakeWord/hey_rhasspy_v0.1.json b/assist_satellite/wakewords/openWakeWord/hey_rhasspy_v0.1.json new file mode 100644 index 000000000..1ecc454cd --- /dev/null +++ b/assist_satellite/wakewords/openWakeWord/hey_rhasspy_v0.1.json @@ -0,0 +1,5 @@ +{ + "type": "openWakeWord", + "wake_word": "Hey Rhasspy", + "model": "hey_rhasspy_v0.1.tflite" +} diff --git a/assist_satellite/wakewords/openWakeWord/hey_rhasspy_v0.1.tflite b/assist_satellite/wakewords/openWakeWord/hey_rhasspy_v0.1.tflite new file mode 100644 index 000000000..3f8d3effd Binary files /dev/null and b/assist_satellite/wakewords/openWakeWord/hey_rhasspy_v0.1.tflite differ diff --git a/assist_satellite/wakewords/openWakeWord/ok_nabu_v0.1.json b/assist_satellite/wakewords/openWakeWord/ok_nabu_v0.1.json new file mode 100644 index 000000000..3fae45e36 --- /dev/null +++ b/assist_satellite/wakewords/openWakeWord/ok_nabu_v0.1.json @@ -0,0 +1,5 @@ +{ + "type": "openWakeWord", + "wake_word": "Okay Nabu", + "model": "ok_nabu_v0.1.tflite" +} diff --git a/assist_satellite/wakewords/openWakeWord/ok_nabu_v0.1.tflite b/assist_satellite/wakewords/openWakeWord/ok_nabu_v0.1.tflite new file mode 100644 index 000000000..ea36458e5 Binary files /dev/null and b/assist_satellite/wakewords/openWakeWord/ok_nabu_v0.1.tflite differ diff --git a/assist_satellite/wakewords/stop.json b/assist_satellite/wakewords/stop.json new file mode 100644 index 000000000..d6b5a7086 --- /dev/null +++ b/assist_satellite/wakewords/stop.json @@ -0,0 +1,16 @@ +{ + "type": "micro", + "wake_word": "Stop", + "author": "Kevin Ahrendt", + "website": "https://www.kevinahrendt.com/", + "model": "stop.tflite", + "trained_languages": ["en"], + "version": 2, + "micro": { + "probability_cutoff": 0.5, + "feature_step_size": 10, + "sliding_window_size": 5, + "tensor_arena_size": 21000, + "minimum_esphome_version": "2024.7.0" + } +} diff --git a/assist_satellite/wakewords/stop.tflite b/assist_satellite/wakewords/stop.tflite new file mode 100644 index 000000000..1cc08adfa Binary files /dev/null and b/assist_satellite/wakewords/stop.tflite differ