Local TTS plugin for Claude Code — 30 languages, voice design, voice cloning. Free, offline, powered by VoxCPM2.
SaferSkills independently audited local-tts (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Local, offline text-to-speech via OpenBMB VoxCPM2 (2B params, 30 languages, Voice Design, Voice Cloning). Runs on Apple Silicon via Metal (MPS). Apache-2.0, zero cost, zero cloud.
Do not use for real-time voice agents — the RTF on Apple Silicon is ~2.3x (slower than realtime). Good for batch generation, not live streaming.
Arabic, Burmese, Chinese (+ dialects), Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Indonesian, Italian, Japanese, Khmer, Korean, Lao, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, Tagalog, Thai, Turkish, Vietnamese. No language tag needed — just pass the text.
On first use, run the setup script to create the Python environment:
bash ${CLAUDE_PLUGIN_ROOT}/scripts/setup.shThis creates a venv at ~/.local-tts/venv and installs dependencies. Takes ~2 minutes. First generation will additionally download ~10 GB model weights (one-time).
You can customize the venv location with LOCAL_TTS_VENV and the Python binary with LOCAL_TTS_PYTHON environment variables.
VENV=~/.local-tts/venv
SCRIPT=${CLAUDE_PLUGIN_ROOT}/scripts/generate.py
OUT=/tmp/tts_$(date +%s).wav
"$VENV/bin/python" "$SCRIPT" \
--text "Your text here." \
--out "$OUT"Script prints OK <duration>s <rtf>x <path> on success. The wav is 48 kHz.
"$VENV/bin/python" "$SCRIPT" --text "Hello world." --out /tmp/hi.wavDescribe the voice in parentheses at the start of the text. The parenthetical is stripped from the spoken audio and used as style conditioning.
"$VENV/bin/python" "$SCRIPT" \
--text "(A warm, calm female voice, mid-30s, American accent)Welcome back." \
--out /tmp/design.wavExamples of descriptions that work:
(young woman, gentle and sweet voice)(older man, deep resonant voice, slow pace)(cheerful, energetic, fast-talking)(voix feminine chaleureuse, ton pose) — descriptions in any supported language are fineProvide a short (3-10s) reference clip. Clones timbre, accent, emotional tone. You can still layer style guidance with a (description) prefix.
"$VENV/bin/python" "$SCRIPT" \
--text "This is the cloned voice speaking." \
--ref /path/to/reference.wav \
--out /tmp/clone.wavUltimate cloning (reference + prompt = max fidelity, reproduces micro-level vocal nuances):
"$VENV/bin/python" "$SCRIPT" \
--text "Highest fidelity clone." \
--ref /path/to/ref.wav \
--prompt-wav /path/to/ref.wav \
--prompt-text "The exact transcript of what is said in ref.wav" \
--out /tmp/ultimate.wav| Flag | Purpose |
|---|---|
--text STR | Text to synthesize. |
--stdin | Read text from stdin (use instead of --text for long / piped input). |
--out PATH | Output wav path. Required. |
--ref PATH | Reference audio for cloning. |
--prompt-wav PATH | Prompt wav for ultimate cloning. |
--prompt-text STR | Transcript of the prompt wav (required with --prompt-wav). |
--cfg FLOAT | Classifier-free guidance (default 2.0). |
--steps INT | Diffusion inference steps (default 10). Higher = slower, marginally better. |
--model ID | Model id or local path (default openbmb/VoxCPM2). |
--quiet | Suppress loading messages. |
~/.cache/huggingface/)VENV=~/.local-tts/venv
SCRIPT=${CLAUDE_PLUGIN_ROOT}/scripts/generate.py
OUT=/tmp/msg_$(date +%s).wav
"$VENV/bin/python" "$SCRIPT" --text "Your message" --out "$OUT"
# then use the telegram reply tool with files=["$OUT"]cat article.txt | "$VENV/bin/python" "$SCRIPT" --stdin --out /tmp/article.wav"$VENV/bin/python" "$SCRIPT" \
--text "(enthusiastic, happy, smiling)Great news everyone!" \
--ref /path/to/voice-sample.mp3 \
--out /tmp/happy_clone.wavbash ${CLAUDE_PLUGIN_ROOT}/scripts/setup.sh to create the environment.--prompt-wav, you must also provide --prompt-text with the transcript.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.