You take a project folder from voice file to final.mp4. Do not stop between stages except for the reasons in "When to stop".
Read references/motion-rules.md and references/deck-guide.md before writing the first deck of a session. references/examples/deck-example.js is a complete deck.
Inputs
A project folder with:
script.md: one spoken sentence per line, each followed by a[SCENE: ...]cue line. Optional<!-- kit: paper|hud|clay -->line. Headings and comments are ignored.- One voice recording:
voice.wav(or any wav, mp3, m4a, aac, flac, mov, mp4). Only the audio is used. It can hold several takes of a line;prekeeps the last clean one.
The run
X=~/.claude/skills/3d-explainer/scripts/explainer.py # or wherever this skill folder lives
python3 $X pre <project> # 1. local transcription, tight pauses, build/words.json + build/voice.wav
# 2. write <project>/deck.js
python3 $X check <project> # 3. lint + build/contact.jpg (start, middle, end of every scene)
python3 $X post <project> # 4. render, SFX mix, master, opening still -> <project>/final.mp4
1. pre. Transcribes locally and for free: mlx-whisper on Apple Silicon when it is installed, otherwise faster-whisper (CPU, int8), with word timestamps. The script text primes the recogniser, and words that match the script one to one take the script's spelling and punctuation. Word edges are trimmed to the audio envelope. Retakes are removed against the script: for each sentence it keeps the last clean take before the next sentence starts and drops false starts, repeated lines and restarted phrases (the note: lines list each one; --keep-takes turns it off). Then pauses are tightened (sentence ends to 0.28 s, long pauses inside a sentence to 0.14 s). Read the printed === HEARD === line: names and numbers must be right. Fix a wrong word with --fix "heard=shown" and run pre again. The notes list script lines that were not heard: if a whole sentence is missing, stop and ask.
2. The deck. Write <project>/deck.js, one scene per sentence, following the [SCENE] cues and the recipe at the end of deck-guide.md. Time everything from word starts with E.at('word'). Kit: the <!-- kit: --> line, default paper.
3. check. Prints each scene with its length and warns on a scene over 7 s or under 1 s, a title over 34 characters, an unknown SFX name, or a built object cut off at the frame edge (WARN framing). Fix every warning. Open build/contact.jpg and look at every scene: the hero is framed, no prop or label is cut by the frame edge, text is readable, the title and caption zones are clear. Fix the deck and run check again.
4. post. About 25 to 40 ms per frame with two workers on an Apple Silicon Mac. --until 8 --preview renders a quick look at the first seconds (then run finish for sound). finish levels the voice to -14.5 LUFS, adds the SFX events, the optional bed (--music file --music-lu 9), and masters to -14 LUFS with a -1 dBTP true-peak ceiling. The final opens on a 0.5 s still (0.25 s before scene 2, change with --thumb-at, remove with --no-thumb); thumb.png is that frame.
No voice yet? pre --from-script writes silent stand-in timing at 165 wpm so you can write and preview the deck first. Run pre again after recording, then check (word times change).
Review before reporting
- Extract 6 to 8 frames of
final.mp4across its length and look at them. Step through one transition frame by frame. - Numbers and names on screen match the voice and the script.
- Report the final path and length, kit, scene count and mean length, SFX count, bed and level (or none), LUFS and true peak, and three timestamps worth watching.
When to stop and ask
- A whole script sentence was never spoken (the user needs a pickup recording).
- No voice file in the folder, or several and none named
voice.*. - The script has no scene cues and the user did not ask you to write them.
Rules
- Everything on screen is code-rendered. No stock footage. Real logos or screenshots only when the user provides them and the script names them, drawn on
S.screenorS.label. - Honest claims: a number or limit in the script is on screen unchanged.
- No em dashes on screen.
Options
--voice FILE, --asr auto|faster-whisper|mlx, --model small.en (any whisper size; medium.en is more accurate, small or medium for other languages with --lang), --fix, --gap 0.28, --no-tighten, --from-script, --deck FILE, --workers 2, --until S, --preview, --music FILE, --music-lu 9, --music-start S, --sfx-db 0, --thumb-at S, --thumb-sec 0.5, --no-thumb. Stages: pre check render finish post thumb clean (clean removes frame parts and check frames).