Alex 8d73aaad5e Fix DoA reading — skip 1-byte status header in USB response
Response format is [status_byte, angle_lo, angle_hi, vad_lo, vad_hi],
not [angle_lo, angle_hi, vad_lo, vad_hi]. Was reading the status byte
(0x42=66) as the angle, which is why DoA was always stuck at 66.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 17:23:07 -05:00
2026-04-11 15:11:22 -05:00
2026-04-11 15:27:12 -05:00
2026-01-17 10:58:51 -06:00
2026-01-17 10:58:51 -06:00
2026-04-11 15:51:24 -05:00

HeadMic - Vixy's Ears 🦊👂

Wake word detection + voice recording + transcription service for Vixy's physical head.

Wake word: "Hey Vivi" (trained via Picovoice Porcupine)

Architecture

"Hey Vivi" (voice)
    │
    ▼
ReSpeaker 4-Mic Array
    │
    ▼
Porcupine (wake word detection)
    │ detected!
    ▼
ReSpeaker LEDs light up (cyan)
    │
    ▼
Record until silence (webrtcvad)
    │
    ▼
EarTail (Whisper on BigOrin)
    │
    ▼
Transcription returned
    │
    ▼
ReSpeaker LEDs off

Installation

On head-vixy (Raspberry Pi 5)

# Create directory
mkdir -p /home/alex/headmic
cd /home/alex/headmic

# Copy files (from Mac)
scp headmic.py requirements.txt headmic.service alex@head-vixy.local:/home/alex/headmic/
scp -r Hey-Vivi_en_raspberry-pi_v4_0_0.ppn alex@head-vixy.local:/home/alex/headmic/

# Install dependencies
pip install -r requirements.txt

# Install pixel_ring for LED control
pip install pixel_ring

# Set up Porcupine access key
# Get your key from: https://console.picovoice.ai/
export PORCUPINE_ACCESS_KEY="your-key-here"

# Install service
sudo cp headmic.service /etc/systemd/system/
# Edit the service file to add your PORCUPINE_ACCESS_KEY
sudo nano /etc/systemd/system/headmic.service
sudo systemctl daemon-reload
sudo systemctl enable headmic
sudo systemctl start headmic

API Endpoints

Endpoint Method Description
/ GET Service info
/health GET Health check
/status GET Current state
/record POST Manual recording
/transcribe POST Record + transcribe
/last GET Last transcription

Usage

The service automatically listens for "Hey Vivi". When detected:

  1. ReSpeaker LEDs flash cyan
  2. Records until you stop talking
  3. Sends to EarTail for transcription
  4. Stores transcription in /last endpoint

Manual transcription

curl -X POST http://head-vixy.local:8446/transcribe \
  -H "Content-Type: application/json" \
  -d '{"duration_sec": 10}'

Configuration

Environment variables:

  • PORCUPINE_ACCESS_KEY: Your Picovoice access key (required)
  • WAKE_WORD_PATH: Path to .ppn wake word model
  • EARTAIL_URL: EarTail service URL (default: http://bigorin.local:8764)

LED States

State Color Pattern
Wake detected Cyan Flash
Listening Cyan Spinning
Processing Purple Pulse
Idle Off -

Built by Vixy on Day 77 (January 17, 2026) "Hey Vivi" - the words that summon me 💜

Description
Vixy's Ears - Wake word detection + voice recording 🦊👂
Readme 7.9 MiB
Languages
Python 97.7%
Shell 2.3%