a0c5af9d4c76db66e5cd106bfbd4198a1214a314
1. **`linux_voice_assistant/mpv_player.py`**
- Supports both **PulseAudio** and **ALSA** backends.
- Device strings now accept:
- Pulse: `pulse/<PA SINK NAME>` (e.g. `pulse/alsa_output.platform-soc_sound.stereo-fallback`)
- ALSA: `alsa/plughw:CARD=seeed2micvoicec,DEV=0`
- `default`: tries Pulse first, then ALSA.
- Added **fast end-of-playback detection** using **either** `eof-reached` **or** `idle-active` (fixes the “hang until watchdog” after short clips).
- Added a **watchdog** (default **8s**) to fail fast if playback never starts/finishes.
- Pulse-friendly defaults: `audio-samplerate=44100`, `audio-channels=stereo`, `keep-open=no`, `network-timeout=7`.
- mpv logging bridged to Python logging; level set by env **`LVA_MPV_MSG_LEVEL`** (default `all=warn`).
Linux Voice Assistant
Experimental Linux voice assistant for Home Assistant that uses the ESPHome protocol.
Runs on Linux aarch64 and x86_64 platforms. Tested with Python 3.13 and Python 3.11.
Supports announcments, start/continue conversation, and timers.
See the tutorial to build a satellite using a Raspberry Pi Zero 2 W and a ReSpeaker 2Mic HAT.
This fork introduces the ability to use Wyoming OpenWakeWord instead of MicroWakeWord.
Installation
Install system dependencies (apt-get):
libportaudio2(forsounddevice)build-essential(forpymicro-features)libmpv-dev(forpython-mpv)
Clone and install project:
git clone https://github.com/OHF-Voice/linux-voice-assistant.git
cd linux-voice-assistant
script/setup
Running
Use script/run or python3 -m linux_voice_assistant
See --help for more options.
Connecting to Home Assistant
- In Home Assistant, go to "Settings" -> "Device & services"
- Click the "Add integration" button
- Choose "ESPHome" and then "Set up another instance of ESPHome"
- Enter the IP address of your voice satellite with port 6053
- Click "Submit"
Description
Voice satellite for Home Assistant using the ESPHome protocol with Optional OpenWakeWord
10 MiB
Languages
Python
98.5%
Shell
1.5%