Chatterbox TTS

by digitarald

Not rated
GitHub

About

Generates text-to-speech audio with automatic playback using the Chatterbox TTS model.

Details

Author
digitarald
Categories
Communication, Other, Productivity

Setup

Install Chatterbox TTS in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/digitarald/chatterbox-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

Generates text-to-speech audio with automatic playback using the Chatterbox TTS model.

A simplified Model Context Protocol (MCP) server that provides text-to-speech generation with automatic playback using the Chatterbox TTS model. The server loads the model automatically on first use and provides real-time progress notifications to keep users informed throughout the process.

This MCP server exposes Chatterbox TTS functionality through a single, streamlined tool that generates speech from text and plays it automatically. The server handles model loading, progress reporting, temporary file management, and audio playback seamlessly.

Thespeak_texttool provides complete text-to-speech functionality:

- text(required): The text to convert to speech
- exaggeration(optional): Controls expressiveness (0.0-1.0, default 0.5)
- cfg_weight(optional): Controls classifier-free guidance (0.0-1.0, default 0.5)

- Automatic model loading with progress notifications
- Generates speech using temporary files (auto-cleanup)
- Plays audio automatically on macOS usingafplay
- Real-time progress updates during all phases:

- Model initialization and loading
- Speech generation
- Audio playback

Get information about the TTS model status and device capabilities:

- Model loading status (loaded/not loaded)
- Device information (MPS/CUDA/CPU)
- Hardware acceleration availability

The server provides detailed progress notifications throughout the speech generation process:

- "Loading Chatterbox TTS model..."
- "Initializing PyTorch device..."
- "Loading model weights..."
- "Model loaded successfully!"

- "Starting speech generation..."
- "Speech generated, saving to temporary file..."

- "Playing audio..."
- "Audio playback completed!"

- Device selection (MPS/CUDA/CPU)
- Voice prompt usage when applicable
- Success/error messages

Install Chatterbox TTS:Follow the Chatterbox TTS installation instructions to ensure thechatterbox.ttsmodule is available.

By default, the server stores audio files in~/.chatterbox/audio. You can configure a custom location using:

python chatterbox_mcp_server.py --audio-dir /path/to/custom/audio/directory
export CHATTERBOX_AUDIO_DIR="/path/to/custom/audio/directory" python chatterbox_mcp_server.py

- Command line--audio-dirargument (highest priority)
- CHATTERBOX_AUDIO_DIRenvironment variable
- Default:~/.chatterbox/audio(lowest priority)

By default, audio files are automatically cleaned up after 1 hour. You can configure a custom TTL:

python chatterbox_mcp_server.py --audio-ttl-hours 24 # Keep files for 24 hours
export CHATTERBOX_AUDIO_TTL_HOURS=24 python chatterbox_mcp_server.py

- Command line--audio-ttl-hoursargument (highest priority)
- CHATTERBOX_AUDIO_TTL_HOURSenvironment variable
- Default: 1 hour (lowest priority)

By default, the TTS model is loaded on first use to minimize startup time. You can pre-load it at startup:

python chatterbox_mcp_server.py --auto-load-model

This will load the model during server startup, which takes a few seconds but ensures the first TTS request is faster.

- Audio files are stored persistently with configurable automatic cleanup
- Files are accessible viachatterbox://audio/{resource_id}resources
- Directory is created automatically if it doesn't exist
- Supports relative paths (will be expanded) and~home directory notation

Add to your Claude Desktop MCP configuration:

{ "mcpServers": { "chatterbox-tts": { "command": "python", "args": ["/path/to/chatterbox_mcp_server.py"], "env": {} } } }
{ "mcpServers": { "chatterbox-tts": { "command": "python", "args": [ "/path/to/chatterbox_mcp_server.py", "--audio-dir", "/custom/audio/path", "--auto-load-model", "--audio-ttl-hours", "24" ], "env": { "CHATTERBOX_AUDIO_DIR": "/custom/audio/path", "CHATTERBOX_AUDIO_TTL_HOURS": "24" } } } }
Please use the speak_text tool to say "Hello, welcome to the Chatterbox TTS demonstration!"
Use speak_text to generate enthusiastic speech for "This is amazing!" with high expressiveness

- Load the model if needed (with progress updates)
- Generate the speech
- Play the audio
- Clean up temporary files
- Provide status updates throughout

- Apple Silicon (M1/M2/M3/M4):Uses MPS acceleration when available
- NVIDIA GPUs:Uses CUDA when available
- CPU fallback:Works on any system

- Uses temporary files for audio storage
- Automatic cleanup after playback
- WAV format output
- High-quality audio generation

- Model loads once on first use
- Shared across all subsequent requests
- Thread-safe loading with progress tracking
- Automatic device detection and optimization

chatterbox-mcp/ ├── chatterbox_mcp_server.py # MCP server implementation └── README.md # This documentation

- Simplified Interface:Singlespeak_texttool instead of multiple tools
- Automatic Playback:No need to manually play generated files
- Progress Notifications:Real-time updates on model loading and generation
- Persistent Audio Storage:Audio files are stored with configurable automatic cleanup
- Better Error Handling:Comprehensive error reporting and recovery
- Streamlined Workflow:One command generates and plays speech

- First-time loading downloads model weights
- Progress notifications show current status
- Subsequent uses are much faster

- afplaycommand is macOS-specific
- Ensure system audio is working
- Check volume settings

- Model requires significant GPU/CPU memory
- Monitor system resources during loading
- Consider closing other applications

- Server automatically selects best available device
- Check model info resource for current device
- MPS (Apple Silicon) > CUDA (NVIDIA) > CPU

This MCP server implementation follows the same license as the underlying Chatterbox TTS model.

A server for text-to-speech (TTS) using the VoiceVox engine.

A server for text-to-speech generation using the AivisSpeech engine.

A Node.js MCP server for the Japanese text-to-speech software Bouyomi-chan.

Text-to-speech generation with conversation history features using the ElevenLabs API.

Voice MCP server: voice-cloning TTS/STT with speak, talk, voice inbox and feeds - remote MCP with OAuth at mcp.koe.live

A server that provides text-to-speech capabilities using the Kokoro TTS engine.

Model Context Protocol (MCP) server for Kokoro text-to-speech with female voice. 100% local, no Python required. Supports SSE and stdio transports.

A Text-to-Speech server that integrates with an external VOICEVOX engine.

An MCP server integrating WhatsApp messaging and ElevenLabs AI voice capabilities into VS Code.

A text-to-speech server for VOICEROID2 via the voiceroid_daemon.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.