feat: VoiceCoach v2.1 - GPU local, Ollama LLM, settings panel, token server separation

- pipeline.py: switched LLM from OpenClaw/Claude to local Ollama, added settings loading, sentence aggregator, async SpeechBrain, tuned VAD
- main.py: simplified (no more token server thread, just pipeline)
- token_server.py: NEW - standalone token + settings API server
- docker-compose.yml: all services on GPU machine, added token-server service, CUDA speaches, Ollama LLM
- web-client/index.html: added settings panel with sliders
- web-client/app.js: settings management, localStorage persistence, push to server
- web-client/style.css: settings panel styles
- web-client/nginx.conf: proxy to token-server instead of pipecat-agent
- patch_livekit.py: updated with proper indentation-safe patching
This commit is contained in:
2026-04-04 12:27:06 -05:00
parent f62772663d
commit d901208032
12 changed files with 923 additions and 229 deletions
+70 -33
View File
@@ -1,6 +1,6 @@
services:
# LiveKit WebRTC Server (unchanged)
# LiveKit WebRTC Server
livekit-server:
image: livekit/livekit-server:latest
container_name: voicecoach-livekit
@@ -27,24 +27,27 @@ services:
max-size: "50m"
max-file: "3"
# Speaches: self-hosted Whisper STT + Kokoro TTS (v2 - replaces Piper + in-process Whisper)
# Speaches: GPU-accelerated Whisper STT + Kokoro TTS
speaches:
image: ghcr.io/speaches-ai/speaches:latest-cpu
container_name: voicecoach-speaches
image: ghcr.io/speaches-ai/speaches:latest-cuda
container_name: voicecoach-speaches-gpu
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
- WHISPER__INFERENCE_DEVICE=cuda
- WHISPER__COMPUTE_TYPE=float16
- WHISPER__TTL=-1
volumes:
- /mnt/docker-data/configs/voicecoach/speaches-models:/root/.cache
- speaches-models:/home/ubuntu/.cache
networks:
- voicecoach
mem_limit: 3G
memswap_limit: 3G
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
mem_limit: 4G
labels:
- "com.centurylinklabs.watchtower.enable=false"
healthcheck:
@@ -52,29 +55,28 @@ services:
interval: 30s
timeout: 10s
retries: 3
start_period: 120s
start_period: 180s
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"
# SpeechBrain Emotion Analysis (unchanged, internal only)
# SpeechBrain Emotion Analysis
speechbrain-service:
image: voicecoach-speechbrain:latest
build:
context: ./speechbrain-service
image: voicecoach-speechbrain:latest
container_name: voicecoach-speechbrain
restart: unless-stopped
volumes:
- /mnt/docker-data/configs/voicecoach/speechbrain-models:/app/models
- /mnt/docker-data/configs/voicecoach/clips:/data/clips
- speechbrain-models:/app/models
- voicecoach-clips:/data/clips
environment:
- MODEL_DIR=/app/models
networks:
- voicecoach
mem_limit: 3G
memswap_limit: 3G
labels:
- "com.centurylinklabs.watchtower.enable=false"
logging:
@@ -83,7 +85,7 @@ services:
max-size: "50m"
max-file: "3"
# OpenClaw VoiceCoach Agent (v2 - LLM gateway with memory/skills)
# OpenClaw VoiceCoach Agent (LLM gateway -> Claude)
voicecoach-openclaw:
image: margaret-openclaw:latest
container_name: voicecoach-openclaw
@@ -97,12 +99,11 @@ services:
- OPENCLAW_STATE_DIR=/home/glyptic/.voicecoach
- OPENCLAW_CONFIG_PATH=/home/glyptic/.voicecoach/openclaw.json
volumes:
- /mnt/infrastructure/voicecoach:/home/glyptic/.voicecoach
- ./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: 2G
memswap_limit: 2G
labels:
- "com.centurylinklabs.watchtower.enable=false"
logging:
@@ -111,11 +112,11 @@ services:
max-size: "50m"
max-file: "3"
# Pipecat Voice Pipeline Agent (v2 - uses Speaches + OpenClaw gateway)
# Pipecat Voice Pipeline Agent
pipecat-agent:
image: voicecoach-pipecat:latest
build:
context: ./pipecat-agent
image: voicecoach-pipecat:latest
container_name: voicecoach-pipecat
restart: unless-stopped
env_file:
@@ -125,22 +126,22 @@ services:
- 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
- LLM_BASE_URL=http://host.docker.internal:11434/v1
- LLM_MODEL=llama3.1:8b
- WHISPER_MODEL=deepdml/faster-whisper-large-v3-turbo-ct2
- KOKORO_VOICE=af_nova
- CLIPS_DIR=/data/clips/pending
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- /mnt/docker-data/configs/voicecoach/clips:/data/clips
- voicecoach-clips:/data/clips
depends_on:
- livekit-server
- speaches
- speechbrain-service
- voicecoach-openclaw
networks:
- voicecoach
mem_limit: 1G
memswap_limit: 1G
labels:
- "com.centurylinklabs.watchtower.enable=false"
logging:
@@ -149,17 +150,47 @@ services:
max-size: "50m"
max-file: "3"
# Web Client (unchanged)
# Token Server + Settings API (separate from pipeline so it never goes down)
token-server:
image: voicecoach-pipecat:latest
container_name: voicecoach-token-server
restart: unless-stopped
env_file:
- .env
environment:
- LIVEKIT_PUBLIC_URL=wss://voice.hobbs.farm
- SETTINGS_PATH=/data/settings.json
command: ["python", "token_server.py"]
volumes:
- voicecoach-settings:/data
networks:
- voicecoach
mem_limit: 256M
healthcheck:
test: ["CMD", "python", "-c", "import httpx; httpx.get('http://localhost:8080/health').raise_for_status()"]
interval: 15s
timeout: 5s
retries: 3
start_period: 10s
labels:
- "com.centurylinklabs.watchtower.enable=false"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Web Client
voicecoach-web:
image: voicecoach-web:latest
build:
context: ./web-client
image: voicecoach-web:latest
container_name: voicecoach-web
restart: unless-stopped
ports:
- "8085:80"
depends_on:
- pipecat-agent
- token-server
networks:
- voicecoach
mem_limit: 128M
@@ -174,3 +205,9 @@ services:
networks:
voicecoach:
driver: bridge
volumes:
speaches-models:
speechbrain-models:
voicecoach-clips:
voicecoach-settings: