local-tts
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".
What this skill does
# Local TTS — Offline Text-to-Speech
Generate speech from text using VoxCPM2 locally. 30 languages, voice design, voice cloning. Runs on Apple Silicon via Metal. Apache-2.0, zero cost.
## Overview
This skill wraps VoxCPM2 (OpenBMB, Apache-2.0) for local text-to-speech. It supports three modes:
1. **Default voice** — just feed text, get natural speech in 30 languages (auto-detected)
2. **Voice Design** — describe the voice in a parenthetical prefix, get matching speech
3. **Voice Cloning** — provide a 3-10s reference clip, the output mimics the voice
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).
## Prerequisites
- Python 3.10+ (3.12 recommended)
- macOS with Apple Silicon preferred (M1/M2/M3/M4). Linux with CUDA also works.
- ~10 GB disk space for model weights (downloaded once on first use)
- ~16 GB RAM recommended
The skill expects a Python venv at `~/.local-tts/venv` with the `voxcpm` package installed. If missing, create it:
```bash
mkdir -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.
## Instructions
### Step 1 — Verify the environment
```bash
ls ~/.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.
### Step 2 — Generate the speech
Use the `generate.py` script bundled in this plugin. The entry point:
```bash
VENV=~/.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 language
**Voice 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):
```bash
cat /path/to/article.txt | "$VENV/bin/python" "$SCRIPT" --stdin --out "$OUT"
```
### Step 3 — Verify and hand off
```bash
file "$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.
## Output
- **Format**: 48 kHz mono WAV, 16-bit PCM
- **Location**: whatever `--out` path specified (typically `/tmp/tts_*.wav`)
- **Size**: roughly 100 KB per second of audio
- **Usage**: ready to attach to Telegram, embed in video, use as voiceover
## Script options
| 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 |
## Supported languages (30)
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.
## Error Handling
- **`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).
- **Slow first call (~5 min)** — normal. Model download + initial load. Subsequent runs ~30s.
- **French pronunciation edge cases** — add an IPA-ish hint or rephrase. Most names and proper nouns work out of the box.
## Performance
On Apple M4 with MPS + bfloat16:
- First load: ~340s (downloads weights)
- Subsequent loads: ~30s
- Generation: ~2.3× realtime (10s audio ≈ 23s compute)
Not suitable for real-time streaming. Good for batch generation, voiceovers, podcasts, voice messages.
## Examples
**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
```
## Resources
- VoxCPM2 source: https://github.com/OpenBMB/VoxCPM
- Model card: https://huggingface.co/openbmb/VoxCPM2
- Script source (same as bundled): https://github.com/vdk888/local-tts/blob/main/scripts/generate.py
- License: Apache-2.0
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.