Add WebSocket broadcast to stt-server.py
Every connection receives the full event stream (vad_start, vad_end, transcript, error) from the moment it connects — no subscription handshake required. The asyncio WebSocket server runs in a daemon thread alongside the VAD loop and transcription thread. Events still go to stdout unchanged. Port is configurable via STT_PORT env var (default: 11501). Add websockets to both setup scripts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,7 @@ fi
|
||||
|
||||
echo "==> installing torch and faster-whisper"
|
||||
"${VENV}/bin/pip" install --upgrade pip --quiet
|
||||
"${VENV}/bin/pip" install torch faster-whisper silero-vad
|
||||
"${VENV}/bin/pip" install torch faster-whisper silero-vad websockets
|
||||
|
||||
echo ""
|
||||
echo "==> done. Venv ready at ${VENV}"
|
||||
|
||||
Reference in New Issue
Block a user