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>
20 lines
488 B
Bash
Executable File
20 lines
488 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Creates a venv in ./venv and installs Python deps for Chatterbox
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
VENV="${PYTHON_ENV:-${SCRIPT_DIR}/venv}"
|
|
|
|
if [ ! -d "${VENV}" ]; then
|
|
echo "==> creating venv at ${VENV}"
|
|
python3 -m venv "${VENV}"
|
|
fi
|
|
|
|
echo "==> installing Python dependencies"
|
|
"${VENV}/bin/pip" install --upgrade pip --quiet
|
|
"${VENV}/bin/pip" install chatterbox-tts websockets
|
|
|
|
|
|
echo ""
|
|
echo "==> venv ready at ${VENV}"
|