Voice Bridge

io.github.dwarmerdamPublished by GitHub account dwarmerdamv0.1.5Updated Oct 24, 2026

Multi-engine TTS for AI coding assistants. 5 engines, free engine included.

VerifiedSTDIODesktop onlyDeveloper ToolsMedia & Design

Overview

AI-generated overview

Local text-to-speech MCP server that lets an AI assistant speak its responses aloud through one of five TTS engines.

What you can do
Speak text aloud, optionally choosing an engine for that call, with a safety filter that strips code, secrets, paths, URLs and markdown first and truncates long text at a sentence boundary. Switch the default engine among auto, edge-tts, ElevenLabs, Kokoro, macOS say and espeak-ng. Show current mode, active engine and which engines are available. List the voices offered by an engine, defaulting to the current one.
When to use it
Useful when you work with a coding assistant on a desktop with speakers and want responses read out, for example hands-free or accessibility use, or when you want a free neural voice without an API key.
Requirements
Runs as a local process. Python 3.10+ and pip; the npm package is a thin wrapper that auto-installs the Python package and still needs Python and pip on PATH. Audio output and a player: afplay on macOS, mpv or ffplay on Linux, ffplay or mpv on Windows. Optional ElevenLabs key in a local .env file; Kokoro needs a roughly 200MB model download.
Before you install
Audio plays only on the local machine; headless servers, containers, SSH sessions and CI runners lack sound hardware and speak commands fail silently there. ElevenLabs is a paid engine and needs an ELEVENLABS_API_KEY stored in a local .env file. The Claude Code plugin adds a Stop hook that can speak every response automatically, and always-on mode does the same until turned off. Text is sent to edge-tts or ElevenLabs cloud services unless a local engine is chosen.

Installation

In SourceWeft

  1. Open Voice Bridge in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

Voice Bridge

[PyPI] [CI]

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.

bash
pip install ai-voice-bridge[edge]   # Install with free edge-tts enginevoice-bridge test                   # Verify audio outputvoice-bridge on                     # Enable always-on mode (optional)

Features

  • Free by default -- edge-tts uses Microsoft Neural voices, no API key needed
  • 5 engines -- edge-tts, ElevenLabs, Kokoro (local ONNX), macOS say, espeak-ng
  • Text safety filter -- strips code blocks, secrets, file paths, URLs, and markdown before speaking
  • Claude Code plugin -- Stop hook speaks responses automatically, MCP server for tool-based control
  • Voice discovery -- browse, filter by gender/locale, and preview voices interactively

Prerequisites

Voice Bridge is a Python package that plays audio on your local machine. It requires:

RequirementDetails
Python 3.10+python3 --version to check
pipUsually bundled with Python. On some Linux distros: sudo apt install python3-pip
Audio outputSpeakers 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 speak commands will fail silently without an audio player and sound hardware.

Quick Start

Install

bash
# Recommended: edge-tts (free, 400+ voices)pip install ai-voice-bridge[edge]
# Or with all enginespip install ai-voice-bridge[all]
# Or minimal (macOS say / Linux espeak only)pip install ai-voice-bridge

Test

bash
voice-bridge test          # Speak a test phrasevoice-bridge engines       # List available enginesvoice-bridge setup         # Interactive setup wizard

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.

Use

bash
# Pipe text to speechecho "Hello world" | vb-speak
# Choose an engineecho "Hello" | vb-speak --engine edge-ttsecho "Hello" | vb-speak --engine say
# Modesvoice-bridge on            # Always-on: every AI response spokenvoice-bridge off           # Off: use "speak" keyword for single responsesvoice-bridge status        # Show current mode and engine

Claude Code Integration

Option 1: Install as a Plugin (Recommended)

bash
claude plugin marketplace add Tomorrow-You/voice-bridgeclaude plugin install voice-bridge@voice-bridge

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.

Option 2: Manual Hook Setup

Add to your .claude/settings.json:

json
{  "hooks": {    "Stop": [      {        "hooks": [          {            "type": "command",            "command": "bash -c 'VB_HOOK=$(python3 -c \"import voice_bridge; import pathlib; print(pathlib.Path(voice_bridge.__file__).parent / \\\"integrations\\\" / \\\"claude_hook.sh\\\")\" 2>/dev/null) && [ -f \"$VB_HOOK\" ] && bash \"$VB_HOOK\"'",            "timeout": 5          }        ]      }    ]  }}

Then add to your CLAUDE.md:

markdown
## Voice Bridge (TTS)- **NEVER** use `<speak>` tags unless the user's message starts with "speak"- When user starts with "speak", wrap your ENTIRE response in `<speak>...</speak>` tags- Strip the "speak" keyword before processing- Inside tags, write naturally -- no markdown, code blocks, or file paths

Option 2: Always-On Mode

Skip the <speak> tag convention entirely:

bash
voice-bridge on

Now every Claude response is spoken automatically. Toggle off with voice-bridge off.

Hook Details

The Stop hook runs in the background so it doesn't block Claude Code. It:

  • Extracts text from <speak> tags (single-turn mode) or the full response (always-on mode)
  • Truncates to 2,000 characters before speaking
  • Uses a fallback chain: configured engine > espeak > say
  • Logs to ~/.voice-bridge/voice-bridge.log (auto-rotated at 1MB, keeps 2 backups)
  • Runs vb-speak --stream for sentence-by-sentence playback

Engines

EngineCostQualitySetupPlatformDefault voice
edge-ttsFreeHigh (neural)pip install ai-voice-bridge[edge]Allen-US-GuyNeural
ElevenLabsPaidHighestpip install ai-voice-bridge[elevenlabs] + API keyAllGeorge (JBFqnCBsd6RMkjVDRZzb), model eleven_flash_v2_5
KokoroFreeGoodpip install ai-voice-bridge[kokoro] + model downloadAll (English only)bm_lewis
sayFreeBasicBuilt-inmacOSSamantha
espeakFreeBasicapt install espeak-ngLinuxen

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.

Discovering Voices

bash
voice-bridge voices              # List voices for current enginevoice-bridge voices edge-tts     # List voices for a specific engine
# Filter by gender and/or localevoice-bridge voices edge-tts --gender Female --locale en-US
# Preview a specific voicevoice-bridge voices edge-tts --preview en-US-AriaNeural
# Interactively audition voices (next/select/quit after each)voice-bridge voices edge-tts --gender Female --locale en-US --preview
# Random sample of 3 voicesvoice-bridge voices edge-tts --sample 3 --preview

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).

Switching Engines

bash
voice-bridge engine edge-tts     # Free neural voicesvoice-bridge engine elevenlabs   # Premium cloudvoice-bridge engine kokoro       # Local offlinevoice-bridge engine say          # macOS built-invoice-bridge engine espeak       # Linux built-invoice-bridge engine auto         # Best available (default)

ElevenLabs Setup

bash
pip install ai-voice-bridge[elevenlabs]voice-bridge setup  # Prompts for your ElevenLabs API key# Or manually: create ~/.voice-bridge/.env with ELEVENLABS_API_KEY=your-keyvoice-bridge engine elevenlabsvoice-bridge test

Kokoro Setup (Offline)

bash
pip install ai-voice-bridge[kokoro]# Download model files (~200MB) from:# https://github.com/thewh1teagle/kokoro-onnx/releases/tag/model-files-v1.0# Place in: ~/.voice-bridge/models/ (or $VOICE_BRIDGE_HOME/models/)voice-bridge engine kokorovoice-bridge test

Configuration

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.

FilePurpose
.envAPI keys (ElevenLabs)
.stateRuntime state (mode, engine, speed, voice)
models/Kokoro ONNX model files
voice-bridge.logHook execution logs (auto-rotated at 1MB, 2 backups)

State Variables

The .state file is a shell-sourceable key-value file. All values are optional — defaults apply if unset.

VariableDefaultDescription
VOICE_BRIDGE_MODEoffMode: off (single-turn) or always (always-on)
VOICE_BRIDGE_ENGINEautoEngine name or auto
VOICE_BRIDGE_EDGE_VOICEen-US-GuyNeuraledge-tts voice
VOICE_BRIDGE_EDGE_RATE+0%edge-tts rate (e.g. +30%, -10%)
VOICE_BRIDGE_ELEVENLABS_SPEED1.0ElevenLabs speed (0.7–1.2)
VOICE_BRIDGE_KOKORO_VOICEbm_lewisKokoro voice name
VOICE_BRIDGE_KOKORO_SPEED1.4Kokoro speed multiplier
VOICE_BRIDGE_SAY_RATE200macOS say words per minute
VOICE_BRIDGE_ESPEAK_RATE175espeak words per minute

Text Safety Filter

Before any text reaches the TTS engine, Voice Bridge strips:

  • Code blocks (fenced ``` and inline `)
  • Secrets: OpenAI/Anthropic keys (sk-...), GitHub tokens (ghp_, gho_), AWS keys (AKIA...), PEM private keys, 64+ char hex strings
  • File paths: Unix (/Users/..., /home/...) and Windows (C:\Users\...)
  • URLs: http:// and https://
  • Markdown: headers, bold/italic markers, list bullets, table rows

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.

CLI Reference

bash
# Controlvoice-bridge on              # Always-on modevoice-bridge off             # Single-turn mode (default)voice-bridge status          # Show mode, engine, configvoice-bridge test            # Test audio outputvoice-bridge engines         # List all engines with install statusvoice-bridge setup           # Interactive setup wizard
# Engine configvoice-bridge engine [name]   # Get/set enginevoice-bridge voice [id]      # Set voice for current enginevoice-bridge voices [engine] # List available voicesvoice-bridge speed [val]     # Set engine speed (see below)
# Voice discoveryvoice-bridge voices edge-tts --gender Female --locale en-US  # Filtervoice-bridge voices edge-tts --preview en-US-AriaNeural      # Preview onevoice-bridge voices edge-tts --gender Female --preview       # Interactivevoice-bridge voices edge-tts --sample 3 --preview            # Random sample
# Pipe to speechecho "text" | vb-speak                    # Default engineecho "text" | vb-speak --engine edge-tts  # Specific engineecho "text" | vb-speak --voice Aria       # Override voice for this callecho "text" | vb-speak --stream           # Stream sentence-by-sentenceecho "text" | vb-speak --dry-run          # Print filtered text only

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.

Speed Control

Each engine accepts a different speed format:

EngineFormatDefaultExample
edge-ttsPercentage string+0%voice-bridge speed +30%
elevenlabsFloat (0.7–1.2)1.0voice-bridge speed 1.1
kokoroPositive float1.4voice-bridge speed 1.8
sayWords per minute200voice-bridge speed 250
espeakWords per minute175voice-bridge speed 220

Speed applies to whichever engine is currently active. Check with voice-bridge speed (no value).

MCP Server

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 your PATH. On startup it checks for audio players and warns if none are found. See Prerequisites for full requirements.

Setup with Claude Desktop

Add to your claude_desktop_config.json:

json
{  "mcpServers": {    "voice-bridge": {      "command": "python3",      "args": ["-m", "voice_bridge.mcp.server"]    }  }}

Or after npm publish, use the npm shim:

json
{  "mcpServers": {    "voice-bridge": {      "command": "npx",      "args": ["ai-voice-bridge"]    }  }}

Setup with Cursor / VS Code

Add the same MCP server config in your editor's MCP settings. The config format is the same as Claude Desktop.

Setup with Claude Code

bash
claude mcp add voice-bridge -- python3 -m voice_bridge.mcp.server

MCP Tools

ToolParametersDescription
speaktext (required), engine (optional)Speak text aloud. Optionally override engine for this call.
set_enginename (required)Switch the default TTS engine (auto, edge-tts, elevenlabs, kokoro, say, espeak)
get_status(none)Show current mode, engine, and available engines
list_voicesengine (optional)List available voices. Defaults to current engine if omitted.

Install with MCP support

bash
pip install ai-voice-bridge[mcp]

This installs the voice-bridge-mcp command as an alternative to python3 -m voice_bridge.mcp.server.

Development

bash
git clone https://github.com/Tomorrow-You/voice-bridge.gitcd voice-bridgepython3 -m venv .venv && source .venv/bin/activatepip install -e ".[all,dev]"pytest

License

MIT. See LICENSE for details.

The edge-tts optional dependency is licensed under GPL-3.0. It is not included in the base install.

Source: README.md at commit 113e0bc

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.5LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts