/audio:text-to-audiofrom Audio
Generates speech audio files from text locally using Kokoro-82M on MLX. Use for voice prompts, narration, notification sounds, or placeholder dialogue in apps and games.
Ships in Audio. 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.
None: SKILL.md is the whole skill.
Use tts to make speech from text on the user's Mac with Kokoro-82M on MLX. Each command takes
a few seconds, mostly to load the model, so run a set of prompts as one batch. Kokoro's weights
and text front end (misaki) are Apache-2.0, and the runtime (mlx-audio, MLX) is MIT. The user can
ship the audio inside an app. tts itself is part of pdf2audio, which is AGPL-3.0, so its code
does not go into a closed app. No text or audio leaves the machine, and nothing costs money.
Prefer it to a cloud TTS API unless the user wants a particular hosted voice. Also prefer it to
macOS say, which sounds dated. Each run asks Hugging Face whether the model has changed,
sending the model's name and the machine's IP address.
tts comes from the pdf2audio repository (https://github.com/jonstraveladventures/pdf2audio)
and is installed separately from this plugin:
brew install uv ffmpeg
uv tool install --python 3.12 git+https://github.com/jonstraveladventures/pdf2audio
This installs tts and pdf2audio into ~/.local/bin. If that folder is not on PATH, uv tool update-shell adds it. ffmpeg writes MP3, M4A and OGG. On an Apple Silicon Mac, Kokoro runs
on MLX. Other platforms use the PyTorch build. The first run downloads Kokoro's weights and
voices (under 400 MB).
If command -v tts finds nothing, tell the user the tools are not installed and give them the
steps above. Do not install packages yourself.
tts "Welcome back." -o assets/audio/welcome.wav
tts -f script.txt -o intro.mp3 --voice bm_george
echo "Timer finished." | tts -o done.m4a
tts --batch prompts.json --out-dir assets/audio --format wav
tts --list-voices
wav, flac, mp3, m4a (AAC), ogg
(Opus). Choose for the target: WAV or M4A for iOS and macOS assets, WAV or OGG for
Android and games, MP3 or M4A for the web. Default to WAV when nothing says otherwise..ogg, which is Opus at 48 kHz.
Pass --rate 44100 or --rate 48000 when the project's audio pipeline expects it.--no-trim keeps Kokoro's padding.af_heart (American female). Use the English voices: British bf_* and
bm_*, American af_* and am_*. The other voices shown by --list-voices are for other
languages, and pdf2audio installs only the English text front end. Ask only if the voice
matters to the task. Otherwise, use the default and report which voice you used.{"id", "text"} (optionally "voice"
per line) or a CSV with id,text[,voice] columns, and pass --batch. Files are named
<id>.<format>. Any character other than a letter, digit, dot, underscore or hyphen is changed
to _ (two words gives two_words.wav). Choose ids the app code can reference.Write straight into the project's assets folder when you know it, and wire the files in if that is part of the task.
Check the path and duration printed for each file. At the default speed, trimmed speech runs
at about 2.5 to 3.5 words per second. A duration far from that means something went wrong.
Confirm words that matter, including names, numbers, jargon and anything Kokoro might
mispronounce. If the transcribe command from the co-scientist-toolkit's tools/meeting is
installed, use transcribe -l en <file> to transcribe locally. It writes .txt, .srt and
.vtt files beside the audio, so run it on a copy outside the project's assets folder.
Offer --play or afplay <file> if the user wants to hear it.
Kokoro reads what it is given literally: spell out symbols, units and abbreviations the way they should be said ("5 km" as "five kilometres", "v2.1" as "version two point one") before passing text in.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
tts, text-to-speech, kokoro, mlx, audio-generation, local-tts
npx claudepluginhub shocklab/co-scientist-toolkit --plugin audio2 skills in this plugin
Other plugins' skills for the same job