Article explainer
A narrated explainer of someone else's article: the voice explains, the screen shows. House renderer, 1920x1080, 1–3 minutes.
Style reference: the template tools/templates/explainer/ and the workflow's explainer example,
examples/apollo-1202-eli10-explainer/, which runs on the same engine. Read references/style-reference.md before
designing pages: it maps the engine and the page patterns that worked.
Workflow
-
Read the source. For an X post,
x.comreturns 402; usecurl -s https://api.fxtwitter.com/<user>/status/<id>:tweet.article.content.blocksholds the full article text andmedia_entitiesthe chart images (append?name=orig). For other sites, fetch the page. If the source can't be read, say so and ask the user to paste it. -
Make the project.
P=$(tools/new-project.sh <subject>-explainer) cp tools/templates/explainer/{index.html,script.json} $P/ tools/fonts.sh $PThe template has the engine and pages; the drawing helpers (
box,arrow,pill,ask) are in the example'sindex.html. Copy the ones the film needs.Save the article (
assets/article.md) and every chart image intoassets/. Look at every chart. Numbers on screen come from the article; anything read off a chart image by eye, or made up for illustration, is labelled on screen ("illustrative") and noted inbrief.md. -
Voice. The template narrates with Kokoro, the free local voice:
"voice": {"engine": "kokoro", "id": "am_michael", "speed": 1.0}. Other voices:af_heart af_bella am_fenrir bf_emma bm_george. Use ElevenLabs only when the user asks for it and.envholds their key: ask for the voice id they want, then"voice": {"engine": "elevenlabs", "model": "eleven_v4", "id": "<their voice id>", "stability": 0.5, "similarity_boost": 0.75, "seed": 42}. Every run that changes a line re-narrates it and its neighbours (they are sent as context), which costs their credits. -
Fill in
brief.md, then writescript.json: pages, each a list of clauses (rules below). -
Narrate:
uv run tools/voiceover.py $P. It synthesizes each line, trims the engine's edge silence, times every word with whisper.cpp, lays out the whole timeline (audio/vo/timing.js), mixesaudio/mix.wavat -14 LUFS and writesbeats.json. It fails when the film runs pastmax_seconds(180): cut words, never speed the voice up. Kokoro runs about 150 words per minute of film, so 3 minutes holds roughly 450 words. -
Draw the pages in
index.html: one function per page id. Reveal each thing as the voice reaches it, withP.c(i)(seconds since clause i began) andP.at(i, f)(seconds since fraction f of clause i). -
Place the sound cues in
cues.json(tools/audio/README.md): a select or step on the reveals that matter, a door as each page pushes in, a resolved chord on the last review line. Re-runvoiceover.py; it reuses every take that did not change and mixes the cues. -
Loop (
AGENTS.md):--sheetsamples every clause end and review hold. Look, score, fix, re-runvoiceover.pyafter any script change, then the full render and the master sheet. Compare a whisper transcript ofaudio/mix.wavwith the script. -
Finish: give the user the master's path (
renders/<project>-1920x1080.mp4) and open it.
Script rules
- A page has
clausesandreviewlines. One clause = one spoken line = one thing appearing on screen. Spoken numbers in words ("zero point five"). - Burned-in subtitles come from the script and the voice's word timings (local whisper.cpp, no API cost). Write
numbers, symbols and domains as
{spoken|shown}so they read well in the subtitles:{zero point five|0.50},{eighty percent|80%},{four and a half times|4.5×},{example dot com|example.com}. The audio cache keys on the spoken side, so adding markup never re-narrates. - Open on the article's main claim, stated plainly (the hook;
AGENTS.mdWriting), credit the authors in the first page, end on a recap and where to read the original. - Explain before you name. Every concept gets a plain-language line before its jargon, and the last third of the film must be as easy to follow as the first. Drop a topic rather than rush it: an advanced section with no room to explain it loses the viewer.
- The recap restates the frame: whose article it was, what they set out to do, then what they did and the result. Viewers who lost the thread should be able to rejoin there.
- Information-rich pages (a chart, several numbers, a list to take in) get one short
reviewline: the takeaway, or what the numbers on screen mean, spoken while the countdown runs. Nothing new appears during review. Title, intro and transition pages get"review": []. Never hold a page just for the sake of it.
Pacing rules (learned in review; do not regress)
- Continuous motion. Elements appear steadily as the narration reaches them. Spread a list across its clause; run slides and morphs over the clause. No holds or dead spots in the middle of a page.
- Review at the end, only where earned, and never silent. Once everything has appeared, a cut-out pie in the
bottom-right unwinds clockwise while the voice speaks the review line; when it is gone, the next page comes in. The
voice keeps talking through the whole film. The template's
countdown()does this fromtiming.js. - Push transitions: the finished page slides off to the right as the next slides in from the left (1 s). A page without review lines pushes on as its last line ends; only a countdown earns a hold. No wipes, no sweeping lines with chapter tags.
- Voice first. No music. Sparse sound cues under the voice, nothing else.
- A slow 1.5% push-in across each page keeps held frames from looking frozen.
- No sentence captions that repeat the narration: one heading per page, the visual, short labels and values.
- Subtitles are burned in as pill subtitles: up to 3 words per cue, a sentence ending closes a cue early, white
Poppins 700 48px on a 55% black pill, all four corners rounded and the same padding above and below the text, one
cue at a time, a 0.08 s pop just ahead of the first word. Pages scale to 88% toward the top to leave the band free.
The template's
subtitles()does it fromtiming.js.
Style
- The dark pastel palette (the template's
C): background#0B0F14, surface#1A232E, text#E5E7EB, muted#9CA3AF; pastel pink#FF9EC7for emphasis and key numbers, pastel lavender#C4B5FDfor headings and structure, pastel cyan#9BE7F0only as a second data class. - Inter for type (headings 600, big statements 800), DejaVu Sans Mono for labels, values and typed asides, Poppins
only in the subtitles.
tools/fonts.shcopies all three, with their licences, into the project. No decorative display faces. - Visual patterns that worked: big number + strike-through hook, a named list landing name by name, trace → model → score pipeline, one dot chart that persists and morphs across pages, dumbbell chart for before/after, scatter with a frontier, calibration curve sliding onto the diagonal, numbered recap + credit bar.