/media-os:media-tts-ai [text] [output]from media-os
AI text-to-speech and voice cloning using open-source models (Kokoro, OpenVoice, CosyVoice, etc.). Synthesize speech, clone voices, generate audiobooks, and add TTS to apps.
Ships in media-os. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Context: $ARGUMENTS
scripts/tts.py speak --model kokoro --text "Hello" --voice af_bella --out out.wav → Step 3scripts/tts.py clone --model openvoice --reference ref.wav --text "..." --out out.wav → Step 4scripts/tts.py audiobook --text-file book.md --model kokoro --voice af_bella --chapter-split --out-dir chapters/ → Step 5scripts/tts.py speak --model piper --text "Hi" --voice en_US-amy-medium --out out.wavscripts/tts.py speak --model bark --text "Nice. [laughs]" --out out.wavsay or eSpeak with neural-quality TTSmedia-lipsync. Transcription (opposite direction) is media-whisper.All nine models below are open-source + commercial-safe. Pick by task:
| Task | Recommended | License | Notes |
|---|---|---|---|
| Default high-quality TTS, no cloning | Kokoro | Apache 2.0 | 82M params, realtime on CPU, ~50 preset voices |
| Lowest-latency embedded TTS | Piper | MIT | ONNX runtime, Raspberry Pi friendly |
| Voice cloning from short reference | OpenVoice v2 | MIT | Tone-color transfer, cross-lingual |
| SOTA 2025 cloning / multilingual | CosyVoice 2 | Apache 2.0 | Alibaba FunAudioLLM |
| Zero-shot cloning + emotion intensity | Chatterbox | MIT | Resemble AI |
| Expressive speech + [laughs] [sighs] | Bark | MIT | Suno AI original weights (not v2/Suno paid) |
| Emotional Llama-3-based TTS | Orpheus | Apache 2.0 | Canopy AI 2025 |
| Prompt-controlled voice style | Parler-TTS | Apache 2.0 | HuggingFace |
| Base architecture of Kokoro | StyleTTS2 | MIT | Direct access to the model under Kokoro |
Full comparison matrix (quality / speed / GPU req / clone-support / emotion-support) in references/models.md. License proofs in references/LICENSES.md.
DO NOT use: XTTS-v2 (Coqui CPML — non-commercial), F5-TTS (CC-BY-NC weights), MusicGen (CC-BY-NC weights), Suno-proprietary Bark v2 derivatives. This skill explicitly refuses those.
# Default path (Kokoro ONNX — CPU-friendly, no torch required)
pip install kokoro-onnx onnxruntime soundfile
# Or the PyTorch variant (bigger, supports more voices)
pip install kokoro soundfile
# Piper (ONNX, <50 MB for a voice)
pip install piper-tts
# Voice cloning (pick one)
pip install openvoice-cli # OpenVoice v2 CLI wrapper
pip install "funasr[llm]" modelscope # CosyVoice 2 via ModelScope
pip install chatterbox-tts # Chatterbox
pip install suno-bark # Bark (Apache 2.0 weights only)
pip install orpheus-speech # Orpheus
pip install parler-tts # Parler-TTS
# StyleTTS2 (builds from source)
pip install styletts2
Or let the script bootstrap for you:
uv run ${CLAUDE_SKILL_DIR}/scripts/tts.py install kokoro
Check what's available:
uv run ${CLAUDE_SKILL_DIR}/scripts/tts.py check
# Kokoro (default)
uv run ${CLAUDE_SKILL_DIR}/scripts/tts.py speak \
--model kokoro \
--text "Hello world, this is a test." \
--voice af_bella \
--lang en-us \
--out out.wav
# Piper (fastest)
uv run ${CLAUDE_SKILL_DIR}/scripts/tts.py speak \
--model piper \
--text "Hello" \
--voice en_US-amy-medium \
--out out.wav
# Bark (expressive)
uv run ${CLAUDE_SKILL_DIR}/scripts/tts.py speak \
--model bark \
--text "Hmm, interesting. [laughs] That's wild." \
--voice v2/en_speaker_6 \
--out out.wav
List available voices per model:
uv run ${CLAUDE_SKILL_DIR}/scripts/tts.py list-voices --model kokoro
uv run ${CLAUDE_SKILL_DIR}/scripts/tts.py list-voices --model piper
See references/voices.md for the ~50 Kokoro voice names and language codes.
A clean 5-10 s reference clip of the target voice works best. Mono, 16-24 kHz, minimal background noise.
# OpenVoice v2
uv run ${CLAUDE_SKILL_DIR}/scripts/tts.py clone \
--model openvoice \
--reference speaker_ref.wav \
--text "Text to say in the cloned voice." \
--lang en \
--out out.wav
# CosyVoice 2 (SOTA 2025)
uv run ${CLAUDE_SKILL_DIR}/scripts/tts.py clone \
--model cosyvoice \
--reference ref.wav \
--text "Hello in the cloned voice." \
--out out.wav
# Chatterbox with emotion intensity
uv run ${CLAUDE_SKILL_DIR}/scripts/tts.py clone \
--model chatterbox \
--reference ref.wav \
--text "I'm actually pretty excited about this!" \
--emotion 0.8 \
--out out.wav
Ethical note: only clone voices you have explicit consent to clone. Logging the reference path is recommended for provenance.
# Audiobook: split on `# heading` into chapter files
uv run ${CLAUDE_SKILL_DIR}/scripts/tts.py audiobook \
--text-file book.md \
--model kokoro \
--voice af_bella \
--chapter-split \
--out-dir chapters/
# Batch: each SRT cue → aligned WAV inside out-dir/
uv run ${CLAUDE_SKILL_DIR}/scripts/tts.py batch \
--script script.srt \
--model kokoro \
--voice af_bella \
--out-dir dub/
# Or a plain text file, one line = one utterance
uv run ${CLAUDE_SKILL_DIR}/scripts/tts.py batch \
--script lines.txt \
--model piper \
--voice en_US-amy-medium \
--out-dir lines/
media-ffmpeg-normalize (EBU R128, -16 LUFS for podcasts, -23 LUFS for broadcast).ffmpeg -i out.wav -c:a libopus -b:a 64k out.opusffmpeg -i video.mp4 -i out.wav -map 0:v -map 1:a -c:v copy -shortest dubbed.mp4media-lipsync (LivePortrait / LatentSync).references/LICENSES.md.kokoro-onnx runs CPU-only without torch; the PyTorch kokoro package adds more voices but requires torch + CUDA for speed. The script auto-picks ONNX first..onnx + .onnx.json. Path to .onnx is the voice argument.audiobook and batch subcommands do this automatically.~/.cache/modelscope/.[laughs], [sighs], [music], [gasps], [clears throat]. Music notes like ♪ la la la ♪ trigger sung output (unreliable)..!? splits).--device cpu.references/models.md.uv run ${CLAUDE_SKILL_DIR}/scripts/tts.py speak \
--model kokoro \
--text "Welcome to the show. Today we're talking about open-source AI." \
--voice af_bella \
--out intro.wav
ffmpeg -i intro.wav -c:a libopus -b:a 64k intro.opus
# Record a 10s clean reference clip of the speaker
ffmpeg -f avfoundation -i ":0" -t 10 -ac 1 -ar 24000 ref.wav
# Clone with CosyVoice 2
uv run ${CLAUDE_SKILL_DIR}/scripts/tts.py clone \
--model cosyvoice \
--reference ref.wav \
--text "This is the accessibility narration in the cloned voice." \
--out narration.wav
# Chapteruv run ${CLAUDE_SKILL_DIR}/scripts/tts.py audiobook \
--text-file manuscript.md \
--model kokoro \
--voice af_bella \
--chapter-split \
--out-dir book/
# -> book/01-introduction.wav, book/02-chapter-one.wav, ...
uv run ${CLAUDE_SKILL_DIR}/scripts/tts.py batch \
--script subs.srt \
--model kokoro \
--voice am_michael \
--out-dir dub/
# -> dub/0001-00-00-00-00-000.wav, dub/0002-...wav, with timing in dub/manifest.json
ModuleNotFoundError: No module named 'kokoro_onnx'Cause: Default path isn't installed.
Solution: pip install kokoro-onnx onnxruntime soundfile or run scripts/tts.py install kokoro.
Voice not found: af_bellaCause: Kokoro voice pack wasn't downloaded or the name is misspelled.
Solution: scripts/tts.py list-voices --model kokoro to see the exact names; kokoro-onnx fetches voices on first use from HuggingFace (network required once).
Cause: Using a smaller Piper voice (-low / -x_low) or CPU-quantized Kokoro.
Solution: switch to a -medium or -high Piper voice; for Kokoro use the full PyTorch package instead of ONNX-int8.
Cause: reference clip is noisy, too short, or has music under it.
Solution: pre-process with media-denoise-ai enhance ref.wav clean_ref.wav, then re-clone. Also try CosyVoice 2 which is SOTA 2025 for zero-shot cloning.
Cause: Bark's 13s hard limit per generation.
Solution: use audiobook or batch subcommand — splits on sentence boundaries and concatenates.
CUDA out of memory on Bark / CosyVoice / OrpheusCause: VRAM pressure.
Solution: --device cpu (slower), or free other GPU processes; Bark has a SUNO_USE_SMALL_MODELS=1 env var for an 8GB-VRAM mode.
Cause: text was empty after preprocessing (e.g. only emoji), or model errored silently.
Solution: rerun with --verbose to see the exact command and the model's stderr; confirm soundfile.info(out.wav) shows a nonzero duration.
references/models.md — full comparison: license, clone support, emotion control, speed, GPU need, languages.references/voices.md — ~50 Kokoro voice names, Piper naming convention, Bark prompts, language codes.references/LICENSES.md — strict table confirming every model shipped here is commercial-safe. XTTS-v2 / F5-TTS / MusicGen are explicitly excluded.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
text-to-speech, voice-cloning, audiobook, open-source-tts, kokoro, openvoice
npx claudepluginhub damionrashford/media-os --plugin media-os110 skills in this plugin
/audio-coreaudioManipulate macOS audio at the Core Audio HAL layer: afinfo (audio file metadata), afplay (play), afconvert (convert format/rate/bit-depth/channel layout), say (TTS), SwitchAudioSource (change default input/output/system device — brew install switchaudio-osx), audiodevice CLIs (npm/Go variants), AppleScript via osascript to drive System Preferences Sound. HAL plugins at /Library/Audio/Plug-Ins/HAL/ load virtual drivers (BlackHole 2ch/16ch/64ch, Loopback, Background Music). Aggregate Device (drift-corrected multi-in) and Multi-Output Device via Audio MIDI Setup.app or AudioHardwareCreateAggregateDevice. Use when the user asks to change default macOS audio device, route audio between apps on Mac, install BlackHole, build an Aggregate Device, convert audio files with afconvert, or script Mac audio from the terminal.
/audio-jackRoute professional low-latency audio with JACK Audio Connection Kit (jackaudio.org): jackd server (ALSA/CoreAudio/PortAudio/ASIO backends), jack_control (D-Bus JACK2 config), jack_lsp (list ports/connections), jack_connect/jack_disconnect (manage links), jack_cpu_load, jack_samplerate, jack_bufsize (runtime period size), jack_transport, jack_rec (multi-channel WAV recording), jack_iodelay (round-trip latency), jack_wait, jack_midi_dump. JACK1 C maintenance vs JACK2 C++ multicore. Modern Linux swaps jackd for PipeWire's libjack shim — same client API. JackTrip for uncompressed multichannel UDP over the Internet. Use when the user asks to run a JACK server, connect audio clients, measure roundtrip latency, record from JACK ports, set JACK period size, or bridge JACK over the network with JackTrip.
/audio-pipewireRoute and introspect Linux audio/video/MIDI graphs with PipeWire: pw-cli (interactive object/module control), pw-dump (full graph JSON with --monitor), pw-link (list/create/destroy port links), pw-cat / pw-play / pw-record (playback+record), pw-top (real-time DSP load + xrun viewer), pw-metadata (shared metadata store), pw-loopback (source/sink bridges), pw-midiplay/pw-midirecord, pw-jack (JACK client compat shim), pw-mon, pw-profiler. WirePlumber session manager handles routing/defaults/profiles. Replaces PulseAudio (via pipewire-pulse) and JACK (via libjack.so shim) simultaneously. Use when the user asks to route Linux audio, link two apps, list audio devices on Linux, create a loopback, record system audio, monitor the audio graph, or set up a virtual audio device on modern Linux.
/audio-wasapiManipulate Windows audio via WASAPI (learn.microsoft.com/coreaudio): SoundVolumeView + svcl.exe (NirSoft — set default device, per-app volumes, save/load profiles), AudioDeviceCmdlets PowerShell module (Get-AudioDevice, Set-AudioDevice, Get-AudioDevicePlaybackMute), nircmd setdefaultsounddevice. Shared mode (Windows engine resamples all streams to endpoint fixed format) vs Exclusive mode (bit-perfect, audiophile, ~sub-3ms latency with IAudioClient3 + event-driven callbacks). WASAPI then MMDevice then Audio Engine (audiodg.exe) then WDM/KS. ASIO is Steinberg's parallel stack bypassing Windows audio. Virtual audio devices: VB-Audio Virtual Cable, VoiceMeeter/Banana/Potato. Use when the user asks to change Windows default audio device, route app audio, use VoiceMeeter, install VB-Cable, set a specific device from PowerShell, or enable exclusive-mode low-latency output.
/cv-mediapipeGoogle MediaPipe Tasks API (current supported, NOT legacy mediapipe.solutions): Vision Tasks (Face Detector, Face Landmarker, Face Stylizer, Hand Landmarker, Gesture Recognizer, Pose Landmarker, Holistic Landmarker, Object Detector, Image Classifier, Image Segmenter, Interactive Segmenter, Image Embedder, Image Generator), Audio Tasks (Audio Classifier), Text Tasks (Text Classifier, Text Embedder, Language Detector), GenAI Tasks (LLM Inference — on-device Gemma/Phi-2/Falcon/StableLM). Three run modes: IMAGE, VIDEO, LIVE_STREAM (async). Python: mediapipe.tasks.python.vision/audio/text/genai. Docs at ai.google.dev/edge/mediapipe/solutions. Model Maker for transfer learning. Use when the user asks to detect pose/face/hand landmarks, classify an image, run a body-pose model, segment people, recognize gestures, do on-device LLM inference via MediaPipe, or build a mobile/embedded CV pipeline.
/cv-opencvComputer vision on images + video with OpenCV (docs.opencv.org/4.x/): core (Mat / ndarray, linalg), imgproc (filtering, morphology, geometric transforms, color conv, histograms, contours), imgcodecs (imread/imwrite — PNG, JPEG, TIFF, WebP, EXR), videoio (VideoCapture / VideoWriter — FFMPEG, GStreamer, V4L2, AVFoundation, MSMF backends), calib3d (camera calibration, stereo, solvePnP, homography), features2d (ORB, AKAZE, BRISK, KAZE, SIFT), objdetect (FaceDetectorYN, FaceRecognizerSF, HOG, ArUco, QRCode), dnn (ONNX/TF/Caffe/Darknet, CUDA + OpenVINO + Vulkan backends, model zoo at github.com/opencv/opencv_zoo), photo (inpainting, denoising, HDR Debevec/Robertson), stitching (panorama), video (optical flow Farneback/LK/DIS, BackgroundSubtractorMOG2/KNN, tracking KCF/CSRT/MIL/Nano/Vit/DaSiamRPN). Python-first via cv2. Use when the user asks to detect faces, track objects, run YOLO inference, capture + process webcam frames, calibrate a camera, stitch a panorama, or use OpenCV from Python/C++.
Other plugins' skills for the same job