05409403e9b9b889af025dbd25368a6a3b14335d
Probes the Edge TPU in a subprocess before loading — catches segfaults (libedgetpu ABI mismatch on Debian Trixie/Python 3.13) and falls back to CPU automatically. No more service crashes on Coral incompatibility. When the runtime is eventually fixed, Edge TPU will be used automatically with no config changes needed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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:
- ReSpeaker LEDs flash cyan
- Records until you stop talking
- Sends to EarTail for transcription
- Stores transcription in
/lastendpoint
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 modelEARTAIL_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
Languages
Python
97.7%
Shell
2.3%