title: Reachy Mini Home Assistant Voice Assistant
emoji: π€
colorFrom: blue
colorTo: purple
sdk: static
pinned: false
Reachy Mini Home Assistant Voice Assistant
A voice assistant application that runs on Reachy Mini robot and integrates with Home Assistant via the ESPHome protocol.
Note: This application runs directly on the Reachy Mini robot (Raspberry Pi 4), not on Hugging Face Spaces. The Hugging Face Space is used for code hosting and documentation only.
Features
- π€ Offline Wake Word Detection: Uses microWakeWord or openWakeWord for local wake word detection
- π ESPHome Integration: Seamlessly integrates with Home Assistant through ESPHome protocol
- π€ Motion Control: Full control over Reachy Mini's head movements and antenna animations
- β‘ Low Latency: Optimized for real-time voice interaction
- π Expressive: Speech-reactive motions and gestures
Architecture
This project is based on OHF-Voice/linux-voice-assistant and adapted for Reachy Mini robot.
Key Design:
- STT (Speech-to-Text) and TTS (Text-to-Speech) are handled by Home Assistant
- Audio streams are transmitted via ESPHome protocol
- Wake word detection is processed locally on the robot
- Motion control enhances the voice interaction experience
Installation
Prerequisites
- Python 3.8 or higher
- Reachy Mini robot
- Home Assistant with ESPHome integration
Quick Installation (Recommended)
# Clone the repository
git clone https://github.com/yourusername/reachy_mini_ha_voice.git
cd reachy_mini_ha_voice
# Run the automated installation script
# For Linux/Mac:
./install.sh
# For Windows:
powershell -ExecutionPolicy Bypass -File install.ps1
The automated installation script will:
- β Check Python version
- β Create virtual environment
- β Install all dependencies
- β Download wake word models and sound effects
- β Create configuration file
- β Check Reachy Mini SDK installation
- β Check audio devices
Manual Installation
# Clone the repository
git clone https://github.com/yourusername/reachy_mini_ha_voice.git
cd reachy_mini_ha_voice
# Create virtual environment
python -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -e .
# Download wake word models and sound effects
# For Linux/Mac:
./download_models.sh
# For Windows:
powershell -ExecutionPolicy Bypass -File download_models.ps1
# Copy environment template
cp .env.example .env
# Configure your settings
# Edit .env file with your preferences
Usage
Basic Usage
# Start the voice assistant
python -m reachy_mini_ha_voice
# With custom configuration
python -m reachy_mini_ha_voice \
--name "My Reachy Mini" \
--audio-input-device "Microphone Name" \
--audio-output-device "Speaker Name" \
--wake-model okay_nabu
List Audio Devices
# List available input devices
python -m reachy_mini_ha_voice --list-input-devices
# List available output devices
python -m reachy_mini_ha_voice --list-output-devices
Web UI
# Start with Gradio web interface
python -m reachy_mini_ha_voice --gradio
Wireless Version
# For wireless Reachy Mini
python -m reachy_mini_ha_voice --wireless
Configuration
Environment Variables
Create a .env file (copy from .env.example):
# Audio Configuration
AUDIO_INPUT_DEVICE=
AUDIO_OUTPUT_DEVICE=
AUDIO_SAMPLE_RATE=16000
AUDIO_CHANNELS=1
AUDIO_BLOCK_SIZE=1024
# Voice Configuration
WAKE_WORD=okay_nabu
WAKE_WORD_DIR=wakewords
# Motion Configuration
MOTION_ENABLED=true
SPEECH_REACTIVE=true
# ESPHome Configuration
ESPHOME_HOST=0.0.0.0
ESPHOME_PORT=6053
ESPHOME_NAME=Reachy Mini
# Robot Configuration
ROBOT_HOST=localhost
ROBOT_WIRELESS=false
# Logging
LOG_LEVEL=INFO
Configuration File
You can also use a config.json file:
{
"audio": {
"input_device": null,
"output_device": null,
"sample_rate": 16000,
"channels": 1,
"block_size": 1024
},
"voice": {
"wake_word": "okay_nabu",
"wake_word_dirs": ["wakewords"]
},
"motion": {
"enabled": true,
"speech_reactive": true
},
"esphome": {
"host": "0.0.0.0",
"port": 6053,
"name": "Reachy Mini"
},
"robot": {
"host": "localhost",
"wireless": false
}
}
Home Assistant Integration
Step 1: Add ESPHome Integration
- Go to Home Assistant β Settings β Devices & Services
- Click "Add Integration"
- Search for "ESPHome"
- Click "Set up another instance of ESPHome"
- Enter your Reachy Mini's IP address and port (default: 6053)
- Click "Submit"
Step 2: Configure Voice Assistant
Home Assistant should automatically detect the voice assistant. You can then:
- Set up voice commands
- Create automations
- Configure STT/TTS services
Step 3: Test
- Say the wake word (default: "Okay Nabu")
- Speak your command
- Reachy Mini should respond with motion and voice
Project Structure
reachy_mini_ha_voice/
βββ src/
β βββ reachy_mini_ha_voice/
β βββ __init__.py
β βββ main.py # Entry point
β βββ app.py # Main application
β βββ state.py # State management
β βββ audio/ # Audio processing
β β βββ adapter.py # Audio device adapter
β β βββ processor.py # Audio processor
β βββ voice/ # Voice processing
β β βββ detector.py # Wake word detection
β β βββ stt.py # STT (backup)
β β βββ tts.py # TTS (backup)
β βββ motion/ # Motion control
β β βββ controller.py # Motion controller
β β βββ queue.py # Motion queue
β βββ esphome/ # ESPHome protocol
β β βββ protocol.py # Protocol definitions
β β βββ server.py # ESPHome server
β βββ config/ # Configuration
β βββ manager.py # Config manager
βββ profiles/ # Personality profiles
β βββ default/
βββ wakewords/ # Wake word models
βββ pyproject.toml # Project config
βββ PROJECT_PLAN.md # Project plan
βββ ARCHITECTURE.md # Architecture docs
βββ REQUIREMENTS.md # Requirements
βββ README.md # This file
Development
Running Tests
# Install development dependencies
pip install -e .[dev]
# Run tests
pytest
# Run with coverage
pytest --cov=reachy_mini_ha_voice
Code Style
# Format code
ruff format .
# Lint code
ruff check .
Documentation
- Project Plan - Detailed project plan
- Architecture - System architecture and design
- Requirements - Functional and technical requirements
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
Acknowledgments
- OHF-Voice/linux-voice-assistant - Original project
- Pollen Robotics - Reachy Mini robot
- Hugging Face - Platform and tools
Support
For issues and questions:
- Open an issue on GitHub
- Join the Discord community
- Check the documentation
Made with β€οΈ for Reachy Mini and Home Assistant community