Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generate speech locally from text using VoxCPM2 (2B params, Apache-2.0). 30 languages, voice design (describe a voice), voice cloning (from 3-10s reference). Runs 100% offline on Apple Silicon via Metal (MPS). Zero API calls, zero cost. Use when user asks to "say" or "speak" something, wants a voiceover, wants to clone a voice, or wants to generate audio from text. Trigger phrases: "say this", "read out loud", "clone my voice", "generate voiceover", "text to speech", "TTS".
.claude/skills/jeremylongshore-local-tts/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 23% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 149% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -15% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 13% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 29% | 0% |
Generate speech from text using VoxCPM2 locally. 30 languages, voice design, voice cloning. Runs on Apple Silicon via Metal. Apache-2.0, zero cost.
This skill wraps VoxCPM2 (OpenBMB, Apache-2.0) for local text-to-speech. It supports three modes:
All processing happens on-device. No API keys. No network calls after the initial model download. Output is 48 kHz WAV ready for any use (Telegram voice messages, podcasts, video narration).
The skill expects a Python venv at ~/.local-tts/venv with the voxcpm package installed. If missing, create it:
bashmkdir -p ~/.local-tts python3.12 -m venv ~/.local-tts/venv ~/.local-tts/venv/bin/pip install --upgrade pip voxcpm
First generation downloads ~10 GB of model weights to ~/.cache/huggingface/. Subsequent runs load the cache in ~30s.
bashls ~/.local-tts/venv/bin/python && echo "venv OK" || echo "Run setup first"
If the venv is missing, guide the user through the setup commands above.
Use the generate.py script bundled in this plugin. The entry point:
bashVENV=~/.local-tts/venv SCRIPT=${CLAUDE_PLUGIN_ROOT}/scripts/generate.py OUT=/tmp/tts_$(date +%s).wav
Default voice (auto-detected language):
bash"$VENV/bin/python" "$SCRIPT" --text "Your text here." --out "$OUT"
Voice Design — describe the voice in parentheses at the start. The parenthetical is stripped from the spoken audio.
bash"$VENV/bin/python" "$SCRIPT" \ --text "(warm female voice, mid-30s, American accent)Welcome back." \ --out "$OUT"
Description examples that work:
(young woman, gentle and sweet voice)(older man, deep resonant voice, slow pace)(cheerful, energetic, fast-talking)(voix féminine chaleureuse, ton posé) — descriptions in any supported languageVoice Cloning — provide a reference clip (3-10s). Clones timbre, accent, emotional tone.
bash"$VENV/bin/python" "$SCRIPT" \ --text "This is the cloned voice speaking." \ --ref /path/to/reference.wav \ --out "$OUT"
Ultimate Cloning — reference + prompt for maximum fidelity (reproduces micro-level vocal nuances):
bash"$VENV/bin/python" "$SCRIPT" \ --text "Highest fidelity clone." \ --ref /path/to/ref.wav \ --prompt-wav /path/to/ref.wav \ --out "$OUT"
Long text via stdin (for articles, scripts):
bashcat /path/to/article.txt | "$VENV/bin/python" "$SCRIPT" --stdin --out "$OUT"
bashfile "$OUT" # Should show: "RIFF ... WAVE audio, Microsoft PCM, 16 bit, mono 48000 Hz" ls -lh "$OUT" # Check size is reasonable
The script prints OK <duration>s <rtf>x <path> on success.
--out path specified (typically /tmp/tts_*.wav)| Flag | Purpose | |------|---------| | --text STR | Text to synthesize | | --stdin | Read text from stdin (for long input) | | --out PATH | Output WAV path (required) | | --ref PATH | Reference audio for cloning | | --prompt-wav PATH | Prompt wav for ultimate cloning | | --cfg FLOAT | Classifier-free guidance (default 2.0) | | --steps INT | Diffusion steps (default 10) | | --model ID | Model id (default openbmb/VoxCPM2) | | --quiet | Suppress loading messages |
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 — VoxCPM auto-detects from the text.
ModuleNotFoundError: voxcpm — venv missing. Run the setup commands from Prerequisites.No such file: VoxCPM2 weights — HuggingFace cache missing. First run will download (needs network, ~10 GB).On Apple M4 with MPS + bfloat16:
Not suitable for real-time streaming. Good for batch generation, voiceovers, podcasts, voice messages.
Example 1: Voice message for Telegram
bash"$VENV/bin/python" "$SCRIPT" \ --text "Hey, quick voice note about our meeting tomorrow." \ --out /tmp/voice_msg.wav
Example 2: Clone a voice from an MP3
bash"$VENV/bin/python" "$SCRIPT" \ --text "Bonjour, c'est une voix clonée localement." \ --ref ~/my_voice_sample.mp3 \ --out /tmp/cloned.wav
Example 3: Designed voice for narration
bash"$VENV/bin/python" "$SCRIPT" \ --text "(deep narrator voice, dramatic, slow pace)In a world where AI runs locally..." \ --out /tmp/narration.wav
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-07 | fail→pass | 17,751 | 9,644 | -46% | 1 | 1 | 0% | 2,113 | 2,590 | +23% | 0 | 0 | — |
case-01 | fail→fail | 17,424 | 9,049 | -48% | 1 | 1 | 0% | 2,269 | 2,305 | +2% | 0 | 0 | — |
case-02 | fail→fail | 11,417 | 17,423 | +53% | 1 | 1 | 0% | 1,144 | 2,185 | +91% | 0 | 0 | — |
case-03 | fail→pass | 10,846 | 9,868 | -9% | 1 | 1 | 0% | 1,084 | 2,703 | +149% | 0 | 0 | — |
case-04 | fail→pass | 28,617 | 17,585 | -39% | 1 | 1 | 0% | 4,077 | 3,462 | -15% | 0 | 0 | — |
case-05 | fail→pass | 22,643 | 15,212 | -33% | 1 | 1 | 0% | 3,126 | 3,536 | +13% | 0 | 0 | — |
case-06 | fail→fail | 15,125 | 12,666 | -16% | 1 | 1 | 0% | 1,822 | 3,128 | +72% | 0 | 0 | — |
case-08 | fail→pass | 14,892 | 7,915 | -47% | 1 | 1 | 0% | 1,776 | 2,291 | +29% | 0 | 0 | — |
case-09 | fail→pass | 11,249 | 7,117 | -37% | 1 | 1 | 0% | 1,078 | 2,087 | +94% | 0 | 0 | — |
case-10 | fail→pass | 16,800 | 8,236 | -51% | 1 | 1 | 0% | 1,763 | 2,197 | +25% | 0 | 0 | — |
case-11 | fail→pass | 9,576 | 8,131 | -15% | 1 | 1 | 0% | 1,702 | 2,335 | +37% | 0 | 0 | — |
case-12 | pass→pass | 10,867 | 6,840 | -37% | 1 | 1 | 0% | 1,568 | 2,144 | +37% | 0 | 0 | — |
case-13 | fail→pass | 25,605 | 8,831 | -66% | 1 | 1 | 0% | 2,154 | 2,478 | +15% | 0 | 0 | — |
case-14 | pass→pass | 18,323 | 12,028 | -34% | 1 | 1 | 0% | 1,971 | 3,164 | +61% | 0 | 0 | — |
case-15 | fail→pass | 17,527 | 7,129 | -59% | 1 | 1 | 0% | 1,773 | 2,711 | +53% | 0 | 0 | — |
case-16 | fail→pass | 18,450 | 10,862 | -41% | 1 | 1 | 0% | 2,031 | 2,588 | +27% | 0 | 0 | — |
case-17 | fail→pass | 19,955 | 8,633 | -57% | 1 | 1 | 0% | 2,317 | 3,018 | +30% | 0 | 0 | — |
case-18 | fail→pass | 7,242 | 4,987 | -31% | 1 | 1 | 0% | 1,352 | 2,536 | +88% | 0 | 0 | — |
case-19 | fail→pass | 13,701 | 9,075 | -34% | 1 | 1 | 0% | 1,449 | 2,480 | +71% | 0 | 0 | — |
case-20 | fail→pass | 9,746 | 8,624 | -12% | 1 | 1 | 0% | 1,993 | 2,499 | +25% | 0 | 0 | — |
case-21 | fail→pass | 15,733 | 11,477 | -27% | 1 | 1 | 0% | 2,026 | 2,614 | +29% | 0 | 0 | — |
case-22 | pass→pass | 20,801 | 11,381 | -45% | 1 | 1 | 0% | 2,440 | 2,730 | +12% | 0 | 0 | — |
case-23 | fail→pass | 14,419 | 7,461 | -48% | 1 | 1 | 0% | 2,309 | 3,139 | +36% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted, and 22 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +74 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.