The setup script checks your hardware, installs dependencies, walks you through cloning a voice from YouTube, and starts the server.
git clone https://github.com/adrianwedd/afterwords.git
cd afterwords
bash setup.shclick to copy
If Claude Code is installed, setup wires a Stop hook so every response is spoken aloud. Without it, you get a standalone TTS API at localhost:7860.
Each says “You are absolutely right. Your Claude Code session could sound like me.” — generated locally on an 8 GB M1.
Add your own:
bash clone-voice.sh "https://youtube.com/watch?v=..." myvoice 30click to copy
/voice handles input. This project handles output. Together: voice conversations.
The server uses Qwen3-TTS (0.6B, 8-bit) on MLX. Zero-shot voice cloning — no training. A 15-second reference + transcript = cloned voice.
The server runs on localhost:7860. No authentication. Use it from curl, scripts, other editors, web apps — anything that speaks HTTP.
Server status, loaded voices, and readiness.
curl localhost:7860/health | jq .click to copy
{
"status": "ok",
"model": "mlx-community/Qwen3-TTS-12Hz-0.6B-Base-8bit",
"backend": "mlx",
"model_loaded": true,
"ready": true,
"voices": ["audrey", "aurora", "avasarala", "bardem", ...],
"default_voice": "galadriel"
}
Generate speech from text. Returns 16-bit PCM WAV audio.
# Synthesize and play
curl "localhost:7860/synthesize?text=Hello+world&voice=snape" -o out.wav
afplay out.wav
# Pipe directly to speaker (macOS)
curl -s "localhost:7860/synthesize?text=Testing" | afplay -click to copy
Response includes timing headers: X-Synthesis-Time, X-Duration, X-Sample-Rate.
Clone a new voice from a YouTube clip. The server auto-discovers new voices on restart.
# Interactive
bash clone-voice.sh
# Non-interactive (URL, name, start-second)
bash clone-voice.sh "https://youtube.com/watch?v=..." mycustomvoice 30
# Fully automated (skip transcript confirmation)
bash clone-voice.sh "https://youtube.com/watch?v=..." mycustomvoice 30 --yesclick to copy
Each voice is a 700 KB WAV + JSON profile in voices/. Adding voices costs zero extra memory.
Drop a .afterwords file in any project root. The hook reads it before each synthesis — no server restart.
echo "galadriel" > ~/work/frontend/.afterwords
echo "snape" > ~/work/backend/.afterwords
echo "loki" > ~/fun/side-project/.afterwordsclick to copy
The setup script installs everything else. Claude Code is optional — use --server-only for the API without hooks.
Qwen3-TTS (Alibaba, Apache 2.0) · mlx-audio · MLX (Apple) · Claude Code (Anthropic)
Originally built for SPARK, a robot with an inner life. Full tutorial: Voice Cloning with Qwen3-TTS.