Skip to main content

A text-to-speech MCP server powered by Kokoro — gives Claude Code a voice

Project description

Soliloquy

Tests PyPI version Python License: MIT PyPI downloads

A text-to-speech MCP server powered by Kokoro — gives Claude Code a voice.

One command to install. No config, no API keys, no setup.

Requirements

  • macOS or Windows
  • Python 3.10+
Platform Audio Backend
macOS afplay (built-in)
Windows winsound (built-in Python module)

Note: Installation downloads ~2GB of dependencies (PyTorch, model weights). First run also downloads the Kokoro-82M model from HuggingFace.

Quick Start

No install needed (requires uv):

# Install uv if you don't have it:
# macOS:   brew install uv
# Windows: powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

claude mcp add soliloquy -s user -- uvx soliloquy-tts

Or with pip:

pip install soliloquy-tts
claude mcp add soliloquy -s user -- soliloquy

Restart Claude Code after registering. Claude can now speak.

Scope: -s user registers Soliloquy globally so it's available in every project. Use -s local (or omit the flag) to register it for the current project only.

How It Works

Soliloquy uses a hybrid architecture to share a single model across multiple Claude Code sessions:

  • First session loads the Kokoro model and starts a local backend server
  • Additional sessions detect the running backend and connect as lightweight proxies (near-instant startup, no extra memory)
  • If the backend exits, the next session automatically takes over

This is completely transparent — no configuration needed.

Why Soliloquy?

Cloud TTS (ElevenLabs, OpenAI, etc.) Soliloquy
Privacy Text sent to cloud Nothing leaves your machine
Cost $0.18–15/1M chars Free forever
Offline No Yes
Usage Limits Quotas / rate limits Unlimited
Latency 200–500ms (network) ~50–100ms (local)
AI Integration Developer calls API from code AI agent decides when to speak
Setup API keys + billing One command, no config

Tools

speak

Synthesize and play text aloud.

Parameter Default Description
text (required) Text to speak
voice af_heart Voice ID (see below)
speed 1.0 Speed multiplier (0.5 - 2.0)
lang en-us Language code

read_aloud

Read a file aloud directly — Claude just passes the file path, no need to process the content first. Supports plain text and markdown.

Parameter Default Description
path (required) Path to the file to read
voice af_heart Voice ID (see below)
speed 1.0 Speed multiplier (0.5 - 2.0)
lang en-us Language code

list_voices

Returns all available voices with language and gender metadata.

Voices

28 voices across American and British English:

Voice Accent Gender
af_heart American Female
af_alloy American Female
af_aoede American Female
af_bella American Female
af_jessica American Female
af_kore American Female
af_nicole American Female
af_nova American Female
af_river American Female
af_sarah American Female
af_sky American Female
am_adam American Male
am_echo American Male
am_eric American Male
am_fenrir American Male
am_liam American Male
am_michael American Male
am_onyx American Male
am_puck American Male
am_santa American Male
bf_alice British Female
bf_emma British Female
bf_isabella British Female
bf_lily British Female
bm_daniel British Male
bm_fable British Male
bm_george British Male
bm_lewis British Male

Languages

en-us (default), en-gb, ja, zh, es, fr, hi, it, pt-br

Uninstall / Update

To unregister from Claude Code:

claude mcp remove soliloquy -s user

If using uvx, clear the cache to force a fresh download on next run:

uv cache clean soliloquy-tts

If using pip:

pip uninstall soliloquy-tts

Development

git clone https://github.com/bstovall/soliloquy.git
cd soliloquy
python3.11 -m venv .venv
source .venv/bin/activate
pip install -e .

Run the benchmark:

python scripts/benchmark_tts.py

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

soliloquy_tts-0.4.0.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

soliloquy_tts-0.4.0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file soliloquy_tts-0.4.0.tar.gz.

File metadata

  • Download URL: soliloquy_tts-0.4.0.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for soliloquy_tts-0.4.0.tar.gz
Algorithm Hash digest
SHA256 9091f85b454da357b2d43df89865b66af9a89df63aaa980cbef40a8292ca975f
MD5 e6c8287eb2b9bec75e40e96b8cfeb12f
BLAKE2b-256 a7fd06de356d99d3e6ca38f677864167959161b2a33514870b5aecce3ccf8c65

See more details on using hashes here.

File details

Details for the file soliloquy_tts-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: soliloquy_tts-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for soliloquy_tts-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d99da335a4f5c7705caec193c545122011e383728d7d3741544d97910dc78fc
MD5 9e0a3b1b6c057911ad8747276796d563
BLAKE2b-256 1c68dafde7ccf113da19c61d383cd70ea77d9cb19270dfdbf844a1ca42de0cff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page