forked from org1/hermes-voice-gateway
Stack: rudolf-T worker, x86_64, 14.5 GiB RAM. Replaces hermes-agent STT/TTS providers with direct faster-whisper + piper (hermes-agent's TTS providers only target file-based voice-bubble delivery, not streaming PCM for browser WebSocket). Bridge: browser <-> voice-gateway <-> hermes-proxy <-> Hermes. * gateway/server.py: aiohttp app with /ws, /healthz, / static * gateway/pipeline.py: STT (faster-whisper base), LLM (POST /v1/chat/completions streaming), TTS (piper ru_RU-denis-medium) * gateway/static/: browser mic capture + WS playback with VAD-based flush on silence * Dockerfile on nousresearch/hermes-agent:v2026.8.3 * compose.yaml with placement node.hostname==rudolf-T Wire protocol documented in server.py header and README. Half-duplex by design; barge-in and server-VAD deferred until proven needed.
64 lines
1.7 KiB
YAML
64 lines
1.7 KiB
YAML
name: hermes-voice-gateway
|
|
|
|
services:
|
|
voice-gateway:
|
|
image: registry.rudolf.keenetic.link/hermes-voice-gateway:${version}
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
hostname: voice-gateway
|
|
user: "0:0"
|
|
networks:
|
|
- hermes_proxy
|
|
ports:
|
|
- target: 8765
|
|
published: 8765
|
|
protocol: tcp
|
|
mode: host
|
|
volumes:
|
|
- voice_gateway_models:/opt/piper-voices:ro
|
|
environment:
|
|
VOICE_GATEWAY_HOST: "0.0.0.0"
|
|
VOICE_GATEWAY_PORT: "8765"
|
|
HERMES_PROXY_URL: "http://hermes-proxy:8645"
|
|
HERMES_PROXY_TOKEN: "${HERMES_PROXY_TOKEN:-}"
|
|
SAMPLE_RATE_IN: "16000"
|
|
SAMPLE_RATE_OUT: "22050"
|
|
LLM_MODEL: "MiniMax-M3"
|
|
PIPER_VOICE_PATH: "/opt/piper-voices/ru_RU-denis-medium.onnx"
|
|
MAX_SESSION_SECONDS: "300"
|
|
MAX_SILENCE_MS: "1500"
|
|
HTTP_PROXY: "http://squid:3128"
|
|
HTTPS_PROXY: "http://squid:3128"
|
|
NO_PROXY: "localhost,127.0.0.1,.local,squid,hermes-gateway,hermes-agent,hermes-proxy,brencher-state-proxy,docker_socket_proxy,10.0.0.0/8"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "python -c \"import urllib.request,sys; urllib.request.urlopen('http://127.0.0.1:8765/healthz', timeout=3).read()\" || exit 1"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 30s
|
|
deploy:
|
|
mode: replicated
|
|
replicas: 1
|
|
placement:
|
|
constraints:
|
|
- node.hostname == rudolf-T
|
|
resources:
|
|
limits:
|
|
memory: 4G
|
|
pids: 1024
|
|
reservations:
|
|
memory: 1G
|
|
restart_policy:
|
|
condition: on-failure
|
|
delay: 10s
|
|
max_attempts: 3
|
|
|
|
networks:
|
|
hermes_proxy:
|
|
external: true
|
|
|
|
volumes:
|
|
voice_gateway_models:
|
|
driver: local
|