Replace HTTP API with WebSocket server

Single port (TTS_PORT) handles both the WS upgrade handshake and
connections. Adds job queue, generation worker, playback events
(queued/started/finished/aborted/error), and abort_current/abort_all
commands. Fixes BrokenPipeError when pacat is killed mid-write.
Updates all examples to use WebSocket; adds abort-demo.mjs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-09 21:32:58 +00:00
parent b24414c3f3
commit f4ae96c6b9
7 changed files with 310 additions and 127 deletions

View File

@@ -12,7 +12,7 @@ fi
echo "==> installing Python dependencies"
"${VENV}/bin/pip" install --upgrade pip --quiet
"${VENV}/bin/pip" install chatterbox-tts
"${VENV}/bin/pip" install chatterbox-tts websockets
echo ""