/lorenzh:cloning-voices-with-kittenttsfrom lorenzh
Voice cloning with KittenTTS 2 from a short recording and text. Use when users say "kitten tts", "Stimme klonen", "clone my voice", "sprich diesen Text mit meiner Stimme", or "text to speech with my voice" and want a speech WAV.
Ships in lorenzh. 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.
Produce a 24 kHz speech WAV from text and a short voice recording.
Clone a person's voice only with that person's consent.
Ask whose voice the recording holds before running the helper. If it is the user's own voice, their cloning request supplies consent. Otherwise, require the user's statement that the speaker consented. Without that statement, stop: No consent, no run. Obtain the recording, text, output path, and language (English by default). Use a clean, single-speaker recording lasting 5–30 seconds. Without a reference transcript, kittenml uses Whisper to transcribe the recording. If trimming is needed, agree on a segment and use ffmpeg; keep the original recording. Done when consent and all inputs are established.
Use Python 3.10+, PyTorch, ffmpeg, kittenml, and soundfile. CPU works; a GPU is optional.
Run python3 -c "import kittenml, soundfile" and ffmpeg -version to check dependencies.
If packages are missing, show python3 -m pip install kittenml soundfile; do not install silently.
If pip reports No module named pip or venv fails, ask before installing python3-venv.
Alternatively, use python3 -m venv --without-pip <dir>, download https://bootstrap.pypa.io/get-pip.py, then run <dir>/bin/python get-pip.py.
Use <dir>/bin/python -m pip install kittenml soundfile in that venv; never install silently.
Mention the Stellon Labs Community License: non-commercial or limited commercial use, with a USD 1M revenue/funding cap.
Mention its attribution requirement on distribution; check the linked license before commercial use or distribution.
Done when dependencies are available and the user has received the download and license information.
The first run downloads about 954 MB of weights. Check free RAM first; peak usage can reach about 14 GB.
On six CPU cores, generation ran about 10x slower than real time (20 seconds of speech took 240 seconds).
Run generation as a background job that reports completion; do not use polling loops.
Trim long references to an agreed segment with ffmpeg -ss <start> -t 20 -i in -ac 1 out.wav; keep the original.
Run the bundled helper, replacing the placeholders:
python3 <skill-dir>/scripts/clone_voice.py reference.wav --text-file text.txt --out speech.wav --language en
Pass --reference-text "Recorded words" or --reference-text-file transcript.txt to skip Whisper transcription.
The transcript must match the reference recording.
For short text, use the optional positional argument: reference.wav "Hello" --out speech.wav.
Use exactly one of positional text, --text "Hello", or --text-file text.txt.
For a batch, repeat --text-file and replace --out with --out-dir DIR.
If a batch fails halfway, files already written stay on disk.
The overwrite guard refuses a rerun while those files exist; the user deletes them or chooses a new --out-dir.
The helper loads the model once and writes DIR/<text-file stem>.wav for each file; stems must be distinct.
The helper validates duration, converts the reference to mono PCM WAV with ffmpeg, and keeps temporary audio only during generation.
It refuses an existing output file. Exit codes are 0 for success, 1 for runtime failure, and 2 for incorrect arguments.
If Python or ffmpeg is missing, report the blocked dependency and stop.
For other failures, fix only what the error names and retry at most 2 times; then report the error and stop.
English is the default. --language de disables normalization, as required for non-English text.
The language option controls normalization only; it does not select a language voice.
The model card describes nine additional languages through language voices, including German.
For those languages, verify current language-voice compatibility with reference cloning before promising supported output.
If an English word sounds wrong in German text, try phonetic spelling.
In one test, “Branch” → “Brantsch” fixed “Bronch”.
Splitting text by language with one reference per language and joining the parts with ffmpeg is possible.
One listening test found no audible gain over a single run, so do not use this by default.
Done when the command exits 0 and creates the requested WAV.
Check the WAV sample rate and duration, then listen if playback is available. Report the output path, language, and whether listening was possible. Repeat the Stellon Labs Community License note: non-commercial or limited commercial use, USD 1M revenue/funding cap, and attribution on distribution. If generation was not run, state that explicitly; never describe an offline test as a model run. Done when the report distinguishes generated audio from checks that did not use the model.
Input: “Sprich diesen Text mit meiner Stimme”, a consenting user's 10-second recording, and German text.
Run the helper with --language de after checking language-voice compatibility; report the actual WAV and any quality limits.
node --test <skill-dir>/tests/clone_voice.test.mjs to check the helper offline without downloading weights.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub lorenzh/skills --plugin lorenzh27 skills in this plugin
/checking-before-publishingPrivacy check for anything about to go public. Use when about to post an issue or PR comment, opening a PR, committing, pushing, publishing a release, blog post or README, or sharing screenshots, GIFs, videos or terminal recordings; when relaying a subagent's text to a public place; or when the user asks to "check for private data", "scrub" or "redact" something before sharing./competing-implementationsImplementation competition for one task. Use when the user asks to have two agents compete on a change, wants competing implementations, asks to compare implementations and ship the winner, or asks for competing implementations on several dependent issues in waves./creating-worktreesGit worktree setup and cleanup for isolated parallel work. Use when the user asks to "work in a worktree", wants an isolated workspace or a parallel branch checkout, is about to execute an implementation plan that should not touch the current checkout, asks how to install dependencies or copy .env files into a worktree, wants a coding agent or sandbox to work in one, or asks to remove or clean up a worktree, or when worktrees fill the disk (ENOSPC, "No space left on device")./cutting-releasesRelease workflow from version bump to verified install. Use when the user asks to "cut a release", "release x.y.z", "ship a new version" or publish to npm or another registry, or when a release was tagged but the package, the back-merge to main or the installed version still needs checking./directing-videosVideo directing workflow for demos, screencasts, terminal tours, tutorials, launch videos and short films. Use when the user asks to plan, script, storyboard or direct a video, wants a "tour of all features", a demo or launch video, asks how long or how paced a video should be, or asks whether a recorded cut is ready to publish./dispatching-codexCodex CLI dispatch with completion notices that mean Codex really finished. Use when starting, dispatching or waiting for `codex exec`; when handing work to a GPT or Codex subagent; for cross-family review or verification by a GPT model; when running several Codex jobs in parallel; or when a workflow fans out to Codex.