OHF-Voice/linux-voice-assistant

Voice satellite for Home Assistant using the ESPHome protocol

Python

660

303 commits

updated Oct 1, 2026

See the code

README

Linux-Voice-Assistant

CI GitHub Package Version GitHub License GitHub last commit GitHub Container Registry

An experimental voice satellite software for Home Assistant remote voice control and interaction.

This project enables you to build a Linux-based voice assistant designed to use Assist for Home Assistant. It allows you to create your own smart speaker that runs on any x64 or ARM64 hardware capable of handling local audio processing (using PulseAudio).

Unlike simpler voice satellites that run on microcontrollers with very limited compute power, this setup can perform local wake word detection (OWW/MWW) and process some data on-device.

Because it runs on a full Linux system and offers access significantly more local computing resources for additional features and other integrations on the same satellite, this approach also provides greater flexibility for customization (such as for example experiment with using PipeWire).

A project from the Open Home Foundation

Features

Requirements

  • Microphone: Device must support 16kHz mono audio
  • CPU: 1Ghz
  • Memory: min. 512MB
  • Storage: The OS and software is around 4GB
  • OS: linux/amd64 or linux/aarch64

A more extensive list for possible compatible hardware can be found in the PiCompose documentation but basically any microphone that works with PipeWire (multimedia framework for Linux) can in theory be used for voice input with the prebuild image from there, you should however preferably use a far-field microphone-array solution if want better result.

Two solutions recommended for setups today is:

  • use a Raspberry Pi Zero 2W (Single Board Computer with built-in WiFi) in combination with the Satellite1 Hat Board
  • use at least a Raspberry Pi 3 with the Respeaker Lite. The Respeaker Lite currently has a problem with the Zero 2W.

Those mic-boards have microphone-array designed for far-field voice capture with the added benefit of using an onboard XMOS DSP microcontroller with custom firmware which does advanced audio pre-processing for microphone cleanup that result in very good voice recognition capabilities (as it runs algorithms for Noise Suppression, Acoustic Echo Cancellation, Interference Cancellation, and Automatic Gain Control).

Alternatively if on a lower budget then suggest could use other microphone-array boards like for example the reSpeaker 2-Mics Pi HAT V2.0 (which uses a much more basic audio codec chip).

Usage

Installation

Assist Satellite app for Home Assistant OS

For HA OS, we provide a finished Assist Satellite app (formerly add-on), which uses the Linux Voice Assistant runtime to turn your HA host into a voice satellite.

[!NOTE] For now you first have to add the OHF-Voice apps repo manually to the App Store repository inside Home Assistant before you can install it.

Later you will be able to install it directly from the official add-on repository (but it is not yet published publicly there):

Add repository to your Home Assistant instance.

Once installed, the satellite is automatically discovered by Home Assistant via the ESPHome integration.

Raspberry Pi prebuilt image

For Raspberry Pi users, we provide a prebuild image that can be flashed to a SD card. See PiCompose.

Docker / bare metal

For all other users, we have different installation methods available (Docker, systemd), each with its own dedicated instructions. See Linux-Voice-Assistant - Installation.

Parameter overview

πŸ’‘ Note: There is an environment variable for each parameter if you use docker or systemd based setup.

usage: __main__.py [-h] [--name NAME] [--audio-input-device AUDIO_INPUT_DEVICE] [--list-input-devices] [--audio-input-block-size AUDIO_INPUT_BLOCK_SIZE] [--audio-output-device AUDIO_OUTPUT_DEVICE] [--music-output-device MUSIC_OUTPUT_DEVICE] [--list-output-devices] [--wake-word-dir WAKE_WORD_DIR]  [--mic-auto-gain] [--mic-noise-suppression]
                   [--wake-model WAKE_MODEL] [--stop-model STOP_MODEL] [--download-dir DOWNLOAD_DIR] [--refractory-seconds REFRACTORY_SECONDS] [--wakeup-sound WAKEUP_SOUND] [--timer-finished-sound TIMER_FINISHED_SOUND] [--processing-sound PROCESSING_SOUND]
                   [--mute-sound MUTE_SOUND] [--unmute-sound UNMUTE_SOUND] [--preferences-file PREFERENCES_FILE] [--host HOST] [--network-interface NETWORK_INTERFACE] [--port PORT] [--enable-thinking-sound] [--listen-during-wake-sound] [--debug]
ParameterDescriptionDefault
--nameName of the voice assistant device (required)Autogenerated (lva-MAC-ADDRESS)
--audio-input-deviceSoundcard name for input deviceAutodetected
--audio-input-block-sizeAudio input block size in samples1024
--audio-output-devicempv name for output deviceAutodetected
--music-output-devicempv name for the music/media output device--audio-output-device
--mic-volumeControl microphone volume100
--mic-auto-gainAdd WebRTC Gain to Mic0
--mic-noise-suppressionAdd WebRTC Noise Suppression to Mic0
--audio-input-channelsNumber of microphone audio channels to stream2
--wake-word-dirDirectory with wake word models (.tflite) and configs (.json)wakewords/
--wake-modelID of active wake word modelokay_nabu
--stop-modelID of stop modelstop
--download-dirDirectory to download custom wake word models, etc.local/
--refractory-secondsSeconds before wake word can be activated again2.0
--continue-conversation-delayDelay before mic opens for continued conversation0.5
--timer-max-ring-secondsSeconds after which the timer stops ringing900.0
--wakeup-soundSound file played when wake word is detectedsounds/wake_word_triggered.flac
--start-listening-soundSound file played when button is pressed to start listeningsounds/start_listening_button.flac
--timer-finished-soundSound file played when timer finishessounds/timer_finished.flac
--processing-soundSound played while assistant is processingsounds/processing.wav
--mute-soundSound played when muting the assistantsounds/mute_switch_on.flac
--unmute-soundSound played when unmuting the assistantsounds/mute_switch_off.flac
--preferences-filePath to preferences JSON filepreferences.json
--hostIP-Address for ESPHome server, use 0.0.0.0 for allAutodetected
--network-interfaceNetwork interface for ESPHome serverAutodetected
--portPort for ESPHome server6053
--enable-thinking-soundEnable thinking sound on startupFalse
--listen-during-wake-soundStart listening while the wake sound is still playingFalse
--peripheral-hostBind address for the peripheral WebSocket API0.0.0.0
--peripheral-portPort for the peripheral WebSocket API6055
--peripheral-volume-stepVolume change per button press, 0.0–1.0%(default)s
--disable-peripheral-apiDisable the peripheral WebSocket API entirelyFalse
--debugPrint DEBUG messages to consoleFalse
--colored-debugPrint colored DEBUG messages to consoleFalse
--output-onlyEnable output only modeFalse

πŸ’‘ Note: There are detailed explanations on the controlled entities from device page in the configuration file.

Build Information

Image builds can be tracked in this repository's Actions tab, and utilize artifact attestation to certify provenance.

The Docker images are built using GitHub Actions, which provides:

  • Automated builds for different architectures
  • Artifact attestation for build provenance verification
  • Regular updates and maintenance

The documentation for the build process can be found in the GitHub Actions Workflows file.

Development

System Requirements

System packages (Linux):

  • libmpv-dev (sudo apt install libmpv-dev)
  • PulseAudio/PipeWire (sudo apt install pulseaudio pipewire)
  • ALSA utils (sudo apt install alsa-utils)

Python:

  • Python 3.11+ must be installed on your system (python3 --version should show 3.11+)
  • On Ubuntu/Debian: sudo apt install python3.11 python3.11-venv python3.11-dev

VS Code Setup

VS Code development uses a local Python virtual environment (.venv/):

  1. Open workspace in VS Code
  2. Accept Workspace Trust (bottom-left status bar)
  3. Install recommended extensions when prompted:
    • ms-python.python - Python language support
    • ms-python.vscode-pylance - Python language server
    • kilo.kilocode - Kilo AI assistant
  4. Terminal β†’ New Terminal (or Ctrl+`) - Opens integrated terminal (uses .venv when available)
  5. Run ./script/setup --dev to create .venv and install dev dependencies
  6. VS Code automatically detects .venv/bin/python as the Python interpreter

Available VS Code Tasks:

  • Ctrl+Shift+B - Run Setup or Linter
  • Ctrl+Shift+T - Run Tests
  • Ctrl+Shift+P β†’ "Tasks: Run Task" - Show all tasks (Setup, Linter, Tests, Run App)

Code Quality Checks

The project uses the following tools to ensure code quality:

  • Black: Code formatting (88 characters per line, PEP 8 compliant)
  • isort: Import sorting compatible with Black
  • flake8: Style and syntax checks
  • pylint: Code quality checks
  • mypy: Static type analysis

Setup

To use the development tools (linting, testing, etc.), you need to install the required dependencies:

./script/setup --dev
source .venv/bin/activate

Linting Commands

Run all linting checks

./script/lint...

Individual linting commands (with auto-fix support)

ScriptDescriptionAuto-fix Available?
./script/lint_blackChecks Python code formatting with BlackYes, use--auto flag
./script/lint_flake8Runs style and syntax checks with flake8No
./script/lint_isortChecks import sorting with isortYes, use--auto flag
./script/lint_mypyRuns static type analysis with mypyNo
./script/lint_pylintRuns code quality checks with pylintYes, use--auto flag

Examples

Run a specific lint check:

./script/lint_black

Auto-fix formatting issues (Black + isort):

./script/lint_black --auto
./script/lint_isort --auto

Testing

Run the test suite:

./script/tests

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

esphome-api
home-assistant
linux-app
voice-assistant
voice-satellite

OHF-Voice/linux-voice-assistant

Voice satellite for Home Assistant using the ESPHome protocol

Python

660

303 commits

updated Oct 1, 2026

See the code

README

Linux-Voice-Assistant

CI GitHub Package Version GitHub License GitHub last commit GitHub Container Registry

An experimental voice satellite software for Home Assistant remote voice control and interaction.

This project enables you to build a Linux-based voice assistant designed to use Assist for Home Assistant. It allows you to create your own smart speaker that runs on any x64 or ARM64 hardware capable of handling local audio processing (using PulseAudio).

Unlike simpler voice satellites that run on microcontrollers with very limited compute power, this setup can perform local wake word detection (OWW/MWW) and process some data on-device.

Because it runs on a full Linux system and offers access significantly more local computing resources for additional features and other integrations on the same satellite, this approach also provides greater flexibility for customization (such as for example experiment with using PipeWire).

A project from the Open Home Foundation

Features

Requirements

  • Microphone: Device must support 16kHz mono audio
  • CPU: 1Ghz
  • Memory: min. 512MB
  • Storage: The OS and software is around 4GB
  • OS: linux/amd64 or linux/aarch64

A more extensive list for possible compatible hardware can be found in the PiCompose documentation but basically any microphone that works with PipeWire (multimedia framework for Linux) can in theory be used for voice input with the prebuild image from there, you should however preferably use a far-field microphone-array solution if want better result.

Two solutions recommended for setups today is:

  • use a Raspberry Pi Zero 2W (Single Board Computer with built-in WiFi) in combination with the Satellite1 Hat Board
  • use at least a Raspberry Pi 3 with the Respeaker Lite. The Respeaker Lite currently has a problem with the Zero 2W.

Those mic-boards have microphone-array designed for far-field voice capture with the added benefit of using an onboard XMOS DSP microcontroller with custom firmware which does advanced audio pre-processing for microphone cleanup that result in very good voice recognition capabilities (as it runs algorithms for Noise Suppression, Acoustic Echo Cancellation, Interference Cancellation, and Automatic Gain Control).

Alternatively if on a lower budget then suggest could use other microphone-array boards like for example the reSpeaker 2-Mics Pi HAT V2.0 (which uses a much more basic audio codec chip).

Usage

Installation

Assist Satellite app for Home Assistant OS

For HA OS, we provide a finished Assist Satellite app (formerly add-on), which uses the Linux Voice Assistant runtime to turn your HA host into a voice satellite.

[!NOTE] For now you first have to add the OHF-Voice apps repo manually to the App Store repository inside Home Assistant before you can install it.

Later you will be able to install it directly from the official add-on repository (but it is not yet published publicly there):

Add repository to your Home Assistant instance.

Once installed, the satellite is automatically discovered by Home Assistant via the ESPHome integration.

Raspberry Pi prebuilt image

For Raspberry Pi users, we provide a prebuild image that can be flashed to a SD card. See PiCompose.

Docker / bare metal

For all other users, we have different installation methods available (Docker, systemd), each with its own dedicated instructions. See Linux-Voice-Assistant - Installation.

Parameter overview

πŸ’‘ Note: There is an environment variable for each parameter if you use docker or systemd based setup.

usage: __main__.py [-h] [--name NAME] [--audio-input-device AUDIO_INPUT_DEVICE] [--list-input-devices] [--audio-input-block-size AUDIO_INPUT_BLOCK_SIZE] [--audio-output-device AUDIO_OUTPUT_DEVICE] [--music-output-device MUSIC_OUTPUT_DEVICE] [--list-output-devices] [--wake-word-dir WAKE_WORD_DIR]  [--mic-auto-gain] [--mic-noise-suppression]
                   [--wake-model WAKE_MODEL] [--stop-model STOP_MODEL] [--download-dir DOWNLOAD_DIR] [--refractory-seconds REFRACTORY_SECONDS] [--wakeup-sound WAKEUP_SOUND] [--timer-finished-sound TIMER_FINISHED_SOUND] [--processing-sound PROCESSING_SOUND]
                   [--mute-sound MUTE_SOUND] [--unmute-sound UNMUTE_SOUND] [--preferences-file PREFERENCES_FILE] [--host HOST] [--network-interface NETWORK_INTERFACE] [--port PORT] [--enable-thinking-sound] [--listen-during-wake-sound] [--debug]
ParameterDescriptionDefault
--nameName of the voice assistant device (required)Autogenerated (lva-MAC-ADDRESS)
--audio-input-deviceSoundcard name for input deviceAutodetected
--audio-input-block-sizeAudio input block size in samples1024
--audio-output-devicempv name for output deviceAutodetected
--music-output-devicempv name for the music/media output device--audio-output-device
--mic-volumeControl microphone volume100
--mic-auto-gainAdd WebRTC Gain to Mic0
--mic-noise-suppressionAdd WebRTC Noise Suppression to Mic0
--audio-input-channelsNumber of microphone audio channels to stream2
--wake-word-dirDirectory with wake word models (.tflite) and configs (.json)wakewords/
--wake-modelID of active wake word modelokay_nabu
--stop-modelID of stop modelstop
--download-dirDirectory to download custom wake word models, etc.local/
--refractory-secondsSeconds before wake word can be activated again2.0
--continue-conversation-delayDelay before mic opens for continued conversation0.5
--timer-max-ring-secondsSeconds after which the timer stops ringing900.0
--wakeup-soundSound file played when wake word is detectedsounds/wake_word_triggered.flac
--start-listening-soundSound file played when button is pressed to start listeningsounds/start_listening_button.flac
--timer-finished-soundSound file played when timer finishessounds/timer_finished.flac
--processing-soundSound played while assistant is processingsounds/processing.wav
--mute-soundSound played when muting the assistantsounds/mute_switch_on.flac
--unmute-soundSound played when unmuting the assistantsounds/mute_switch_off.flac
--preferences-filePath to preferences JSON filepreferences.json
--hostIP-Address for ESPHome server, use 0.0.0.0 for allAutodetected
--network-interfaceNetwork interface for ESPHome serverAutodetected
--portPort for ESPHome server6053
--enable-thinking-soundEnable thinking sound on startupFalse
--listen-during-wake-soundStart listening while the wake sound is still playingFalse
--peripheral-hostBind address for the peripheral WebSocket API0.0.0.0
--peripheral-portPort for the peripheral WebSocket API6055
--peripheral-volume-stepVolume change per button press, 0.0–1.0%(default)s
--disable-peripheral-apiDisable the peripheral WebSocket API entirelyFalse
--debugPrint DEBUG messages to consoleFalse
--colored-debugPrint colored DEBUG messages to consoleFalse
--output-onlyEnable output only modeFalse

πŸ’‘ Note: There are detailed explanations on the controlled entities from device page in the configuration file.

Build Information

Image builds can be tracked in this repository's Actions tab, and utilize artifact attestation to certify provenance.

The Docker images are built using GitHub Actions, which provides:

  • Automated builds for different architectures
  • Artifact attestation for build provenance verification
  • Regular updates and maintenance

The documentation for the build process can be found in the GitHub Actions Workflows file.

Development

System Requirements

System packages (Linux):

  • libmpv-dev (sudo apt install libmpv-dev)
  • PulseAudio/PipeWire (sudo apt install pulseaudio pipewire)
  • ALSA utils (sudo apt install alsa-utils)

Python:

  • Python 3.11+ must be installed on your system (python3 --version should show 3.11+)
  • On Ubuntu/Debian: sudo apt install python3.11 python3.11-venv python3.11-dev

VS Code Setup

VS Code development uses a local Python virtual environment (.venv/):

  1. Open workspace in VS Code
  2. Accept Workspace Trust (bottom-left status bar)
  3. Install recommended extensions when prompted:
    • ms-python.python - Python language support
    • ms-python.vscode-pylance - Python language server
    • kilo.kilocode - Kilo AI assistant
  4. Terminal β†’ New Terminal (or Ctrl+`) - Opens integrated terminal (uses .venv when available)
  5. Run ./script/setup --dev to create .venv and install dev dependencies
  6. VS Code automatically detects .venv/bin/python as the Python interpreter

Available VS Code Tasks:

  • Ctrl+Shift+B - Run Setup or Linter
  • Ctrl+Shift+T - Run Tests
  • Ctrl+Shift+P β†’ "Tasks: Run Task" - Show all tasks (Setup, Linter, Tests, Run App)

Code Quality Checks

The project uses the following tools to ensure code quality:

  • Black: Code formatting (88 characters per line, PEP 8 compliant)
  • isort: Import sorting compatible with Black
  • flake8: Style and syntax checks
  • pylint: Code quality checks
  • mypy: Static type analysis

Setup

To use the development tools (linting, testing, etc.), you need to install the required dependencies:

./script/setup --dev
source .venv/bin/activate

Linting Commands

Run all linting checks

./script/lint...

Individual linting commands (with auto-fix support)

ScriptDescriptionAuto-fix Available?
./script/lint_blackChecks Python code formatting with BlackYes, use--auto flag
./script/lint_flake8Runs style and syntax checks with flake8No
./script/lint_isortChecks import sorting with isortYes, use--auto flag
./script/lint_mypyRuns static type analysis with mypyNo
./script/lint_pylintRuns code quality checks with pylintYes, use--auto flag

Examples

Run a specific lint check:

./script/lint_black

Auto-fix formatting issues (Black + isort):

./script/lint_black --auto
./script/lint_isort --auto

Testing

Run the test suite:

./script/tests

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

esphome-api
home-assistant
linux-app
voice-assistant
voice-satellite

Significant stargazers

Joe Block

1,337 followers Β· starred Sep 2025

Matthieu Coudron

246 followers Β· starred Aug 2026

Sven Greb

278 followers Β· starred May 2026

Ludovic BOUÉ

58 followers Β· starred Sep 2026