atlas/PI5_DEPLOYMENT_READINESS.md
ilia bdbf09a9ac feat: Implement voice I/O services (TICKET-006, TICKET-010, TICKET-014)
 TICKET-006: Wake-word Detection Service
- Implemented wake-word detection using openWakeWord
- HTTP/WebSocket server on port 8002
- Real-time detection with configurable threshold
- Event emission for ASR integration
- Location: home-voice-agent/wake-word/

 TICKET-010: ASR Service
- Implemented ASR using faster-whisper
- HTTP endpoint for file transcription
- WebSocket endpoint for streaming transcription
- Support for multiple audio formats
- Auto language detection
- GPU acceleration support
- Location: home-voice-agent/asr/

 TICKET-014: TTS Service
- Implemented TTS using Piper
- HTTP endpoint for text-to-speech synthesis
- Low-latency processing (< 500ms)
- Multiple voice support
- WAV audio output
- Location: home-voice-agent/tts/

 TICKET-047: Updated Hardware Purchases
- Marked Pi5 kit, SSD, microphone, and speakers as purchased
- Updated progress log with purchase status

📚 Documentation:
- Added VOICE_SERVICES_README.md with complete testing guide
- Each service includes README.md with usage instructions
- All services ready for Pi5 deployment

🧪 Testing:
- Created test files for each service
- All imports validated
- FastAPI apps created successfully
- Code passes syntax validation

🚀 Ready for:
- Pi5 deployment
- End-to-end voice flow testing
- Integration with MCP server

Files Added:
- wake-word/detector.py
- wake-word/server.py
- wake-word/requirements.txt
- wake-word/README.md
- wake-word/test_detector.py
- asr/service.py
- asr/server.py
- asr/requirements.txt
- asr/README.md
- asr/test_service.py
- tts/service.py
- tts/server.py
- tts/requirements.txt
- tts/README.md
- tts/test_service.py
- VOICE_SERVICES_README.md

Files Modified:
- tickets/done/TICKET-047_hardware-purchases.md

Files Moved:
- tickets/backlog/TICKET-006_prototype-wake-word-node.md → tickets/done/
- tickets/backlog/TICKET-010_streaming-asr-service.md → tickets/done/
- tickets/backlog/TICKET-014_tts-service.md → tickets/done/
2026-01-12 22:22:38 -05:00

8.3 KiB

Raspberry Pi 5 Deployment Readiness

Last Updated: 2026-01-07

🎯 Current Status: Almost Ready (85% Ready)

What's Complete and Ready for Pi5

  1. Core Infrastructure

    • MCP Server with 22 tools
    • LLM Routing (work/family agents)
    • Memory System (SQLite)
    • Conversation Management
    • Safety Features (boundaries, confirmations)
    • All tests passing
  2. Clients & UI

    • Web LAN Dashboard (fully functional)
    • Phone PWA (text input, conversation persistence)
    • Admin Panel (log browser, kill switches)
  3. Configuration

    • Environment variables (.env)
    • Local/remote toggle script
    • All components load from .env
  4. Documentation

    • Quick Start Guide
    • Testing Guide
    • API Contracts (ASR, TTS)
    • Architecture docs

What's Missing for Full Voice Testing

Voice I/O Services (Not yet implemented):

  • Wake-word detection (TICKET-006)
  • ASR service (TICKET-010)
  • TTS service (TICKET-014)

Status: These are in backlog, ready to implement when you have hardware.

🚀 What You CAN Test on Pi5 Right Now

1. MCP Server & Tools

# On Pi5:
cd /home/beast/Code/atlas/home-voice-agent/mcp-server
pip install -r requirements.txt
./run.sh

# Test from another device:
curl http://<pi5-ip>:8000/health

2. Web Dashboard

# On Pi5:
# Start MCP server (see above)

# Access from browser:
http://<pi5-ip>:8000

3. Phone PWA

  • Deploy to Pi5 web server
  • Access from phone browser
  • Test text input, conversation persistence
  • Test LLM routing (work/family agents)

4. LLM Integration

  • Connect to remote 4080 LLM server
  • Test tool calling
  • Test memory system
  • Test conversation management

📋 Pi5 Setup Checklist

Prerequisites

  • Pi5 with OS installed (Raspberry Pi OS recommended)
  • Python 3.8+ installed
  • Network connectivity (WiFi or Ethernet)
  • USB microphone (for voice testing later)
  • MicroSD card (64GB+ recommended)

Step 1: Initial Setup

# On Pi5:
sudo apt update && sudo apt upgrade -y
sudo apt install -y python3-pip python3-venv git

# Clone or copy the repository
cd ~
git clone <your-repo-url> atlas
# OR copy from your dev machine

Step 2: Install Dependencies

cd ~/atlas/home-voice-agent/mcp-server
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Step 3: Configure Environment

cd ~/atlas/home-voice-agent

# Create .env file
cp .env.example .env

# Edit .env for Pi5 deployment:
# - Set OLLAMA_HOST to your 4080 server IP
# - Set OLLAMA_PORT to 11434
# - Configure model names

Step 4: Test Core Services

# Test MCP server
cd mcp-server
./run.sh

# In another terminal, test:
curl http://localhost:8000/health
curl http://localhost:8000/api/dashboard/status

Step 5: Access from Network

# Find Pi5 IP address
hostname -I

# From another device:
# http://<pi5-ip>:8000

🎤 Voice I/O Setup (When Ready)

Wake-Word Detection (TICKET-006)

Status: Ready to implement Requirements:

  • USB microphone connected
  • Python audio libraries (PyAudio, sounddevice)
  • Wake-word engine (openWakeWord or Porcupine)

Implementation:

# Install audio dependencies
sudo apt install -y portaudio19-dev python3-pyaudio

# Install wake-word engine
pip install openwakeword  # or porcupine

ASR Service (TICKET-010)

Status: Ready to implement Requirements:

  • faster-whisper or Whisper.cpp
  • Audio capture (PyAudio)
  • WebSocket server

Implementation:

# Install faster-whisper
pip install faster-whisper

# Or use Whisper.cpp (lighter weight for Pi5)
# See ASR_EVALUATION.md for details

Note: ASR can run on:

  • Option A: Pi5 CPU (slower, but works)
  • Option B: RTX 4080 server (recommended, faster)

TTS Service (TICKET-014)

Status: Ready to implement Requirements:

  • Piper, Mimic 3, or Coqui TTS
  • Audio output (speakers/headphones)

Implementation:

# Install Piper (lightweight, recommended for Pi5)
# See TTS_EVALUATION.md for details

🔧 Pi5-Specific Considerations

Performance

  • Pi5 Specs: Much faster than Pi4, but still ARM
  • Recommendation: Run wake-word on Pi5, ASR on 4080 server
  • Memory: 4GB+ RAM recommended
  • Storage: Use fast microSD (Class 10, A2) or USB SSD

Power

  • Official 27W power supply required for Pi5
  • Cooling: Active cooling recommended for sustained load
  • Power consumption: ~5-10W idle, ~15-20W under load

Audio

  • USB microphones: Plug-and-play, recommended
  • 3.5mm audio: Can use for output (speakers)
  • HDMI audio: Alternative for output

Network

  • Ethernet: Recommended for stability
  • WiFi: Works, but may have latency
  • Firewall: May need to open port 8000

📊 Deployment Architecture

┌─────────────────┐
│   Raspberry Pi5 │
│                 │
│  ┌───────────┐  │
│  │ Wake-Word │  │  (TICKET-006 - to implement)
│  └─────┬─────┘  │
│        │        │
│  ┌─────▼─────┐  │
│  │ ASR Node  │  │  (TICKET-010 - to implement)
│  │ (optional)│  │  OR use 4080 server
│  └─────┬─────┘  │
│        │        │
│  ┌─────▼─────┐  │
│  │ MCP Server│  │  ✅ READY
│  │ Port 8000 │  │
│  └─────┬─────┘  │
│        │        │
│  ┌─────▼─────┐  │
│  │ Web Server│  │  ✅ READY
│  │ Dashboard │  │
│  └───────────┘  │
│                 │
└────────┬────────┘
         │
         │ HTTP/WebSocket
         │
┌────────▼────────┐
│  RTX 4080 Server│
│                 │
│  ┌───────────┐  │
│  │ LLM Server│  │  ✅ READY
│  │ (Ollama)  │  │
│  └───────────┘  │
│                 │
│  ┌───────────┐  │
│  │ ASR Server│  │  (TICKET-010 - to implement)
│  │ (faster-  │  │
│  │  whisper) │  │
│  └───────────┘  │
└─────────────────┘

Ready to Deploy Checklist

Core Services (Ready Now)

  • MCP Server code complete
  • Web Dashboard code complete
  • Phone PWA code complete
  • LLM Routing complete
  • Memory System complete
  • Safety Features complete
  • All tests passing
  • Documentation complete

Voice I/O (Need Implementation)

  • Wake-word detection (TICKET-006)
  • ASR service (TICKET-010)
  • TTS service (TICKET-014)

Deployment Steps

  • Pi5 OS installed and updated
  • Repository cloned/copied to Pi5
  • Dependencies installed
  • .env configured
  • MCP server tested
  • Dashboard accessible from network
  • USB microphone connected (for voice testing)
  • Wake-word service implemented
  • ASR service implemented (or configured to use 4080)
  • TTS service implemented

🎯 Next Steps

Immediate (Can Do Now)

  1. Deploy core services to Pi5

    • MCP server
    • Web dashboard
    • Phone PWA
  2. Test from network

    • Access dashboard from phone/computer
    • Test tool calling
    • Test LLM integration

Short Term (This Week)

  1. Implement Wake-Word (TICKET-006)

    • 4-6 hours
    • Enables voice activation
  2. Implement ASR Service (TICKET-010)

    • 6-8 hours
    • Can use 4080 server (recommended)
    • OR run on Pi5 CPU (slower)
  3. Implement TTS Service (TICKET-014)

    • 4-6 hours
    • Piper recommended for Pi5

Result

  • Full voice pipeline working
  • End-to-end voice conversation
  • MVP complete! 🎉

📝 Summary

You're 85% ready for Pi5 deployment!

Ready Now:

  • Core infrastructure
  • Web dashboard
  • Phone PWA
  • LLM integration
  • All non-voice features

Need Implementation:

  • Wake-word detection (TICKET-006)
  • ASR service (TICKET-010)
  • TTS service (TICKET-014)

Recommendation:

  1. Deploy core services to Pi5 now
  2. Test dashboard and tools
  3. Implement voice I/O services (3 tickets, ~14-20 hours total)
  4. Full voice MVP complete!

Time to Full Voice MVP: ~14-20 hours of development