feat: VoiceCoach v2 - OpenClaw gateway + Speaches STT/TTS

- pipeline.py: completely rewritten to use Speaches STT/TTS and OpenClaw LLM
- main.py: v2 with OPENCLAW_TOKEN support
- requirements.txt: slimmed (removed anthropic, faster-whisper direct deps)
- Dockerfile: slimmer build (no model pre-download)
- whisper_stt.py, piper_tts.py: removed (replaced by Speaches API)
- docker-compose.yml: v2 with speaches + openclaw services, piper-tts removed
- openclaw-agent/system_prompt.md: new directory with agent system prompt
This commit is contained in:
2026-04-01 08:04:59 -05:00
parent 68c3731c65
commit f62772663d
9 changed files with 371 additions and 273 deletions
+66 -18
View File
@@ -1,6 +1,6 @@
services:
# LiveKit WebRTC Server
# LiveKit WebRTC Server (unchanged)
livekit-server:
image: livekit/livekit-server:latest
container_name: voicecoach-livekit
@@ -27,7 +27,39 @@ services:
max-size: "50m"
max-file: "3"
# SpeechBrain Emotion Analysis (internal only)
# Speaches: self-hosted Whisper STT + Kokoro TTS (v2 - replaces Piper + in-process Whisper)
speaches:
image: ghcr.io/speaches-ai/speaches:latest-cpu
container_name: voicecoach-speaches
restart: unless-stopped
environment:
- WHISPER__MODEL=Systran/faster-whisper-large-v3-turbo
- WHISPER__INFERENCE_DEVICE=cpu
- WHISPER__COMPUTE_TYPE=int8
- TTS__MODEL=kokoro
- TTS__DEFAULT_VOICE=af_nova
- TTS__LANGUAGE=en-us
volumes:
- /mnt/docker-data/configs/voicecoach/speaches-models:/root/.cache
networks:
- voicecoach
mem_limit: 3G
memswap_limit: 3G
labels:
- "com.centurylinklabs.watchtower.enable=false"
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 120s
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"
# SpeechBrain Emotion Analysis (unchanged, internal only)
speechbrain-service:
build:
context: ./speechbrain-service
@@ -36,6 +68,7 @@ services:
restart: unless-stopped
volumes:
- /mnt/docker-data/configs/voicecoach/speechbrain-models:/app/models
- /mnt/docker-data/configs/voicecoach/clips:/data/clips
environment:
- MODEL_DIR=/app/models
networks:
@@ -50,18 +83,26 @@ services:
max-size: "50m"
max-file: "3"
# Piper TTS (internal only)
piper-tts:
build:
context: ./piper-service
image: voicecoach-piper:latest
container_name: voicecoach-piper
# OpenClaw VoiceCoach Agent (v2 - LLM gateway with memory/skills)
voicecoach-openclaw:
image: margaret-openclaw:latest
container_name: voicecoach-openclaw
restart: unless-stopped
user: "0:0"
environment:
- PIPER_MODEL=/app/models/en_US-lessac-medium.onnx
- NODE_ENV=production
- HOME=/home/glyptic
- USER=glyptic
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
- OPENCLAW_STATE_DIR=/home/glyptic/.voicecoach
- OPENCLAW_CONFIG_PATH=/home/glyptic/.voicecoach/openclaw.json
volumes:
- /mnt/infrastructure/voicecoach:/home/glyptic/.voicecoach
command: ["sh", "-c", "mkdir -p /home/glyptic && node --max-old-space-size=1500 /usr/local/lib/node_modules/openclaw/dist/index.js gateway --allow-unconfigured"]
networks:
- voicecoach
mem_limit: 512M
mem_limit: 2G
memswap_limit: 2G
labels:
- "com.centurylinklabs.watchtower.enable=false"
logging:
@@ -70,7 +111,7 @@ services:
max-size: "50m"
max-file: "3"
# Pipecat Voice Pipeline Agent
# Pipecat Voice Pipeline Agent (v2 - uses Speaches + OpenClaw gateway)
pipecat-agent:
build:
context: ./pipecat-agent
@@ -81,18 +122,25 @@ services:
- .env
environment:
- LIVEKIT_URL=ws://livekit-server:7880
- SPEECHBRAIN_SERVICE_URL=http://speechbrain-service:8001
- PIPER_SERVICE_URL=http://piper-tts:8003
- WHISPER_MODEL=medium
- LIVEKIT_PUBLIC_URL=wss://voice.hobbs.farm
- SPEACHES_URL=http://speaches:8000
- SPEECHBRAIN_URL=http://speechbrain-service:8001
- OPENCLAW_URL=http://voicecoach-openclaw:3100
- OPENCLAW_AGENT_ID=voicecoach
- WHISPER_MODEL=Systran/faster-whisper-large-v3-turbo
- KOKORO_VOICE=af_nova
- CLIPS_DIR=/data/clips/pending
volumes:
- /mnt/docker-data/configs/voicecoach/clips:/data/clips
depends_on:
- livekit-server
- speaches
- speechbrain-service
- piper-tts
- voicecoach-openclaw
networks:
- voicecoach
mem_limit: 3G
memswap_limit: 3G
mem_limit: 1G
memswap_limit: 1G
labels:
- "com.centurylinklabs.watchtower.enable=false"
logging:
@@ -101,7 +149,7 @@ services:
max-size: "50m"
max-file: "3"
# Web Client (phone interface)
# Web Client (unchanged)
voicecoach-web:
build:
context: ./web-client