The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Voice Bridge listing page.
Multi-engine text-to-speech for AI coding assistants. Speaks responses aloud from Claude Code, Cursor, or VS Code via a Claude Code plugin, MCP server, or CLI pipe.
Voice Bridge is a Python package that plays audio on your local machine. It requires:
| Requirement | Details |
|---|---|
| Python 3.10+ | python3 --version to check |
| pip | Usually bundled with Python. On some Linux distros: sudo apt install python3-pip |
| Audio output | Speakers or headphones — audio plays locally, not over a network |
| Audio player (Linux/Windows) | macOS: built-in (afplay). Linux: mpv (preferred) or ffplay. Windows: ffplay (preferred) or mpv |
Audio player fallback order: macOS uses afplay (always available). Linux tries mpv then ffplay. Windows tries ffplay then mpv.
Not supported: headless servers, Docker containers, SSH sessions, and CI runners typically lack audio output. Voice Bridge will install and run the MCP server, but
speakcommands will fail silently without an audio player and sound hardware.
The setup wizard walks you through: detecting installed engines, testing audio output, optionally entering an ElevenLabs API key (if the SDK is installed), writing default state, and showing Claude Code integration options.
This installs the plugin with a Stop hook (auto-speaks responses), the /speak skill, and the MCP server. Auto-installs ai-voice-bridge[edge,mcp] on first session.
Add to your .claude/settings.json:
Then add to your CLAUDE.md:
Skip the <speak> tag convention entirely:
Now every Claude response is spoken automatically. Toggle off with voice-bridge off.
The Stop hook runs in the background so it doesn't block Claude Code. It:
<speak> tags (single-turn mode) or the full response (always-on mode)~/.voice-bridge/voice-bridge.log (auto-rotated at 1MB, keeps 2 backups)vb-speak --stream for sentence-by-sentence playback| Engine | Cost | Quality | Setup | Platform | Default voice |
|---|---|---|---|---|---|
| edge-tts | Free | High (neural) | pip install ai-voice-bridge[edge] | All | en-US-GuyNeural |
| ElevenLabs | Paid | Highest | pip install ai-voice-bridge[elevenlabs] + API key | All | George (JBFqnCBsd6RMkjVDRZzb), model eleven_flash_v2_5 |
| Kokoro | Free | Good | pip install ai-voice-bridge[kokoro] + model download | All (English only) | bm_lewis |
| say | Free | Basic | Built-in | macOS | Samantha |
| espeak | Free | Basic | apt install espeak-ng | Linux | en |
When engine is set to auto (default), Voice Bridge picks the first available in this order: edge-tts > say > espeak > kokoro > elevenlabs. ElevenLabs is only considered "available" if the SDK is installed AND a valid API key is configured -- it will never be auto-selected without credentials.
Filtering options: --gender (Male/Female) works with edge-tts and kokoro. --locale (e.g. en-US, en-GB) works with edge-tts and say. --sample N picks N random voices. All combine with --preview for interactive audition.
ElevenLabs preview uses free pre-recorded samples when available (no API credits consumed).
Voice Bridge stores configuration in ~/.voice-bridge/ (macOS), ~/.local/share/voice-bridge/ (Linux, respects XDG_DATA_HOME), or %APPDATA%\voice-bridge\ (Windows).
Override with the VOICE_BRIDGE_HOME environment variable.
| File | Purpose |
|---|---|
.env | API keys (ElevenLabs) |
.state | Runtime state (mode, engine, speed, voice) |
models/ | Kokoro ONNX model files |
voice-bridge.log | Hook execution logs (auto-rotated at 1MB, 2 backups) |
The .state file is a shell-sourceable key-value file. All values are optional — defaults apply if unset.
| Variable | Default | Description |
|---|---|---|
VOICE_BRIDGE_MODE | off | Mode: off (single-turn) or always (always-on) |
VOICE_BRIDGE_ENGINE | auto | Engine name or auto |
VOICE_BRIDGE_EDGE_VOICE | en-US-GuyNeural | edge-tts voice |
VOICE_BRIDGE_EDGE_RATE | +0% | edge-tts rate (e.g. +30%, -10%) |
VOICE_BRIDGE_ELEVENLABS_SPEED | 1.0 | ElevenLabs speed (0.7–1.2) |
VOICE_BRIDGE_KOKORO_VOICE | bm_lewis | Kokoro voice name |
VOICE_BRIDGE_KOKORO_SPEED | 1.4 | Kokoro speed multiplier |
VOICE_BRIDGE_SAY_RATE | 200 | macOS say words per minute |
VOICE_BRIDGE_ESPEAK_RATE | 175 | espeak words per minute |
Before any text reaches the TTS engine, Voice Bridge strips:
``` and inline `)sk-...), GitHub tokens (ghp_, gho_), AWS keys (AKIA...), PEM private keys, 64+ char hex strings/Users/..., /home/...) and Windows (C:\Users\...)http:// and https://Text is truncated to 4,000 characters at the nearest sentence boundary (. ). The Claude hook applies a separate 2,000 character limit before passing text to vb-speak.
Streaming mode (--stream): reads stdin, splits text at sentence boundaries (. , ! , ? ), and speaks each sentence as it completes. For edge-tts, sentences are queued so the next one generates while the current one plays.
Each engine accepts a different speed format:
| Engine | Format | Default | Example |
|---|---|---|---|
| edge-tts | Percentage string | +0% | voice-bridge speed +30% |
| elevenlabs | Float (0.7–1.2) | 1.0 | voice-bridge speed 1.1 |
| kokoro | Positive float | 1.4 | voice-bridge speed 1.8 |
| say | Words per minute | 200 | voice-bridge speed 250 |
| espeak | Words per minute | 175 | voice-bridge speed 220 |
Speed applies to whichever engine is currently active. Check with voice-bridge speed (no value).
Voice Bridge includes an MCP (Model Context Protocol) server so any MCP-compatible tool can speak text aloud.
npm shim (
npx ai-voice-bridge): The npm package is a thin wrapper that auto-installs the Python package. It requires Python 3.10+ and pip on yourPATH. On startup it checks for audio players and warns if none are found. See Prerequisites for full requirements.
Add to your claude_desktop_config.json:
Or after npm publish, use the npm shim:
Add the same MCP server config in your editor's MCP settings. The config format is the same as Claude Desktop.
| Tool | Parameters | Description |
|---|---|---|
speak | text (required), engine (optional) | Speak text aloud. Optionally override engine for this call. |
set_engine | name (required) | Switch the default TTS engine (auto, edge-tts, elevenlabs, kokoro, say, espeak) |
get_status | (none) | Show current mode, engine, and available engines |
list_voices | engine (optional) | List available voices. Defaults to current engine if omitted. |
This installs the voice-bridge-mcp command as an alternative to python3 -m voice_bridge.mcp.server.
MIT. See LICENSE for details.
The edge-tts optional dependency is licensed under GPL-3.0. It is not included in the base install.