Repository avatar
Text to Speech
v0.1.0
active

roshi-speech-mcp

io.github.RIAEvangelist/roshi-speech-mcp

Local fast Kokoro-82M, CUDA Magpie 357M & GPU Qwen3-TTS speech output, chimes, hooks & daemon.

Documentation

Roshi's Speech MCP — Roshi meditating in a warm acoustic voice studio with glowing speaker medallion and soundwaves

Roshi's Speech MCP

100% Local Fast & High-Quality Speech Output, Audio Generation & Trigger Daemon
Antigravity Plugin · Claude Code & Codex Plugin · Open MCP 2.x Server · Standalone CLI · OpenAI-Compatible Local TTS API

Live Documentation Site · Audio Samples (Kokoro, Magpie, Qwen3) · Hooks & Trigger Daemon · PyPI (uvx) · Official MCP Registry · Glama


Why Roshi's Speech MCP?

Give Antigravity, your scripts, watch rules, and automations a 100% local voice — so your system can speak to you when builds finish, when an agent needs your attention, or when a Recorder/Signal event arrives, without cloud TTS APIs, latency spikes, or overlapping chaotic audio.

Just like Roshi's Transcription MCP, you get fast, native CUDA C++, and expressive high-quality local tiers side by side:

ProfileEngineHardwareSpeed / FootprintBest For
instantOS Native (System.Speech SAPI / say / espeak-ng)Any CPU~50 ms · 0 downloadsGuaranteed offline safety fallback
fast (default)Kokoro-82M (kokoro-onnx)CPU or GPU~80–600 ms warm · ~350 MBCrisp, natural everyday updates, attention hooks, 50+ voices & voice blending (af_heart:0.6+am_michael:0.4)
magpieNVIDIA Magpie TTS 357M (NeMo-Speech.cpp + NanoCodec)NVIDIA GPU (CUDA C++) / CPUFast native C++ · ~600 MB GGUFZero-Python native GPU voices (Aria, Jason, John, Leo, Sofia) across 12 languages — shares the exact same nemo-speech runtime as Roshi's Transcription MCP
qualityQwen3-TTS (1.7B / 0.6B CustomVoice)NVIDIA GPU (CUDA)~1–3s warm on RTX GPU · isolated venvExpressive studio-grade speech with natural-language style/emotion instructions (instruct)
designQwen3-TTS (1.7B-VoiceDesign)NVIDIA GPU (CUDA)~1–3s warm on RTX GPUInvent any custom voice from a plain-English description
cloneQwen3-TTS (1.7B-Base / 0.6B-Base)NVIDIA GPU (CUDA)~1–3s warm on RTX GPU3-second zero-shot voice cloning from any local audio clip

Triggered by Anything (One Clean Non-Overlapping Speaker Queue)

Roshi listening hands-free over tea as his computer delivers a glowing local spoken briefing and chime notification

  1. MCP Tools (speak, notify, generate_audio, play_audio, stop_speaking, manage_voice_profiles, manage_settings, manage_trigger_daemon, manage_hooks).
  2. Antigravity Lifecycle Hooks (hooks.json + run_hook.py): Non-blocking spoken alerts when Antigravity asks a question (ask_question), hits an error, pauses at a limit, or finishes a turn. Toggle anytime with manage_hooks(action="enable"|"disable").
  3. Warm Local Trigger Daemon (http://127.0.0.1:8765):
    • Keeps models warm in memory and serializes audio from all callers into one priority queue (with interrupt=True, quiet hours, mute toggle, and cooldown deduplication).
    • POST /speak, POST /notify, POST /chime, POST /play, POST /generate, POST /stop, GET /health.
    • OpenAI-Compatible POST /v1/audio/speech (tts-1 -> Kokoro fast; tts-1-hd -> Qwen3-TTS quality) so Open WebUI, Home Assistant, n8n, or any OpenAI TTS client works 100% locally.
  4. Drop-Folder Inbox Watcher (~/RoshiSpeech/inbox/): Drop any .txt or .json file from a batch script, cron job, or external automation and the daemon speaks it immediately.
  5. Cross-MCP Integration: Plug speech-tool.ps1 notify attention "..." directly into Roshi's Recorder MCP or Roshi's Signal MCP watch rules.

Quick Setup (Windows)

# Install plugin into ~/.gemini/config/plugins/roshi-speech-mcp + download fast Kokoro-82M models + start trigger daemon
.\setup.ps1 -InstallPlugin -StartDaemon

# Also install isolated CUDA GPU venv for high-quality Qwen3-TTS
.\setup.ps1 -InstallPlugin -InstallQuality -PreloadQwenModel 1.7b-custom -StartDaemon

Quick CLI Examples

# Speak immediately (fast Kokoro-82M)
.\speech-tool.ps1 speak "Hey Roshi, the deployment succeeded." --chime done

# Native CUDA C++ NVIDIA Magpie 357M (NeMo-Speech.cpp)
.\speech-tool.ps1 speak "Morning briefing ready via NVIDIA Magpie." --profile magpie --voice Aria --speed 1.05

# Voice blending (Kokoro-82M)
.\speech-tool.ps1 speak "Blending two Kokoro voices." --voice "af_heart:0.6+am_michael:0.4"

# Attention notification
.\speech-tool.ps1 notify attention "Antigravity needs your input."

# High-quality GPU narration with style instruction
.\speech-tool.ps1 generate "Welcome to your morning briefing." --profile quality --voice Ryan --instruct "Speak warmly and calmly like a studio narrator" --out "$HOME\RoshiSpeech\briefing.wav" --play

# Trigger over localhost HTTP from any script
Invoke-RestMethod -Uri "http://127.0.0.1:8765/notify" -Method Post -ContentType "application/json" -Body '{"event_type":"done","message":"Tests passed!"}'