This explains how bulletins.promptugal.news makes synthetic presenters for its video bulletins, so that a person, or another model such as ChatGPT, can rebuild it, extend it or do it differently.
This is version 1. Its files are frozen in src/lab/presenters/v1/ and served at bulletins.promptugal.news/lab/presenters/v1/. Version 1 never changes: a later version goes in a new folder (see "Making version 2").
Is it all programmatic? Yes. The only model call is the voice: OpenRouter reads our fixed text, and its transcript is checked against the text word for word. Everything else is code and data, run on one CPU with no GPU:
The same inputs always give the same video.
What it produces, all at bulletins.promptugal.news/lab/:
| Output | What it is |
|---|---|
presenters/index.html | The twelve presenters, driven live in the browser by one voice and one set of actions; each card shows its spec |
presenters/presenters.mp4 | The twelve side by side (wall.html) |
presenters/presenters-split.mp4 | The animated bulletin on the left, the twelve on the right (split.html) |
presenters/explainer.mp4 | How it is done, told by the presenters: the left explains each action while they show it on the right, with a live readout of the state they are applying (explain.html) |
video/200-animated.mp4 and video/play.html | One full bulletin with a presenter, and a player where each sentence can be clicked |
video/200.mp4 | The first, plain video bulletin |
A presenter is data, not a picture. A short description (presenters.json) says what kind of figure it is and how it looks, in words such as "hair": {"style": "curly"} or "render": "hatch". Code compiles that description into drawn parts and a rig: where the head pivots, where the eyes and mouth are, which arm points. A separate director turns the bulletin's script and voice into actions: speak, blink, nod, look, point and emote. At any moment t, the actions fold into one state, such as {mouth: 0.6, blink: 0, nod: 0.3, arm: 1, …}. Every presenter knows how to show any state. So one script drives a hologram, a teletext mosaic, a hand-drawn robot and a 3D cube in exactly the same way, and every frame is a pure function of t. That is what makes the video reproducible and quick to render.
bulletin facts ─► checked sentences ─► voice (+ transcript check) ─► timeline.json
│
presenters.json ──compile──► parts + rig │
(layer 1) (layer 2) ▼
│ director ─► actions (layer 3)
│ │
└──────► apply(state) ◄── stateAt(actions, t, loudness) (layer 4)
│
browser (live, audio-driven) or Playwright frame t ─► ffmpeg ─► MP4
| Layer | What it is | File |
|---|---|---|
| 1. Spec | What a presenter is, in high-level words | src/lab/presenters/presenters.json |
| 2. Parts and rig | Drawable shapes, plus the points that move | compile() in src/lab/presenters/presenters.js |
| 3. Actions | What the presenter does, and when | direct() in presenters.js |
| 4. State | Everything folded at one moment | stateAt() in presenters.js; each presenter's apply(state) |
Each presenter is one object:
{ "id": "rowan", "name": "Rowan", "category": "cartoon",
"tags": ["line cartoon", "ginger beard"],
"kind": "humanoid", "render": "line", "backdrop": "office",
"credit": "After the founder in RiskMandate's cast; a new drawing.",
"looks": { "skin": "#f0c8a0", "hair": { "style": "curly", "color": "#c8642a" }, "beard": "#c8642a",
"outfit": { "style": "shirt", "color": "#1a7f5a" }, "prop": "tablet", "ink": "#0d0d0c" } }
kind chooses the body plan, and each body plan has its own looks words:
| kind | looks |
|---|---|
humanoid | skin; hair.style (short, side, quiff, curly, grey, bald) and hair.color; beard (a colour, or absent); glasses (a colour); outfit.style (suit, jumper, shirt) with color, shirt, tie and lapel; prop (tablet, mic, pencil); eyeColor; lip; ink |
boxbot | head.w, head.h, head.color, head.screen; face (dots, or clock); antenna (true or false) and antennaColor; hat (hardhat, beret) and hatColor; glasses; badge (text); body.shape (box, tunic) and body.color; handColor; prop (magnifier, card, keys); ink |
owl | color, belly, glasses, ink |
mosaic | a teletext face as grid rows of palette letters, palette, cell, mouthRow, and three mouths (closed, half, open), each a pair of rows |
cube3d | size, colors per face; drawn in real CSS 3D |
render chooses the drawing style. It applies to any body plan:
| render | What it does |
|---|---|
flat | Flat fills and a thin ink outline (the book's cover style) |
line | Flat fills and a thick ink outline (a clean line cartoon) |
hatch | Hand-drawn: each outline drawn twice with a seeded wobble, and fills hatched (the storyboards' style) |
realistic | Radial gradients for light and shade, highlights in the eyes, no outline |
hologram | A cyan-to-blue see-through gradient, scan lines, a moving light band, flicker and a glow |
teletext | Used with mosaic; blocks only |
3d | Used with cube3d |
backdrop names a CSS background: grid-navy, studio, soft-studio, black, paper, zx, office, dusk or gradient.
credit is required whenever a presenter follows someone else's style.
Presenters.compile(spec) returns { parts, rig }.
{ shape: 'ellipse'|'rect'|'path'|'grid'|'text', layer: 'body'|'head'|'arm'|'front', fill, stroke, sw, …geometry }. Its geometry is in a 240 × 320 box. Parts on the head layer move with the head, and parts on the arm layer move with the pointing arm.headPivot [x, y];eyes [{cx, cy, r}];mouth {cx, cy, w, h, color};shoulder [x, y], the pivot of the arm that points;You can skip the body plans and write parts directly. That is the low-level form of the language, for one-off characters.
An action is { t, dur, do, … }, in seconds:
| do | Fields | Effect |
|---|---|---|
speak | none | While active, the mouth opens with the voice's loudness |
blink | none | The eyes close and open (a 0.16 s bump) |
nod | amount | The head dips and comes back |
look | dir: camera or content | The pupils, and for the cube the whole body, turn |
point | dir: content | The arm rises towards the story and comes back |
emote | mood: smile | The resting mouth curves into a smile |
Presenters.direct(timeline) writes the actions from the bulletin's timeline, by rules:
You can write actions by hand instead, or add your own to the list.
Presenters.stateAt(actions, t, loudness) returns:
{ t, mouth 0..1, blink 0..1, tilt (degrees), nod 0..1, look -1..1, arm 0..1, smile 0..1, bob -1..1 }
build(spec, element) draws the presenter and returns { apply(state) }. Each body plan maps the state onto its rig:
humanoid, boxbot and owl: SVG transforms (the head rotates about headPivot; the eyes scale vertically; the pupils shift; the mouth ellipse opens; the smile curve bends).mosaic: swaps between three mouth rows.cube3d: rotates the cube in CSS 3D.Nothing reads the clock or uses a random number at draw time. The same t always gives the same frame.
bulletins/video.mjs <page> picks up to three of the page's sentences that the check has kept, puts dates and units into spoken form by rule, and asks openai/gpt-audio-mini through OpenRouter to read them in the stock voice "alloy". The model's own transcript of what it said must match the script word for word, or nothing is published. Cost: about 0.002 USD for 30 seconds. The voice is labelled synthetic on every frame and in the closing words.bulletins/video2.mjs <page> reads the voice's loudness every 1/25 s and gives each word a start time. These are estimated from each segment's share of the words and from word length; they are not measured. It also finds the bars to grow and writes src/lab/video/timeline.json:{ "duration": 27.7, "fps": 25,
"segs": [{ "kind": "line", "show": "…", "start": 4.6, "end": 12.4,
"words": [{ "w": "IPMA", "start": 4.75 }],
"bars": [{ "v": 20.5, "place": "Faro", "word": 4 }],
"src": "…", "links": [] }],
"amp": [0.0, 0.31] }
It then renders the full bulletin.
bulletins/presenters-video.mjs renders the side-by-side wall.| File | Role |
|---|---|
src/lab/presenters/presenters.json | Layer 1: the twelve specs |
src/lab/presenters/presenters.js | Layers 2 to 4: compile, build/apply, direct, stateAt |
src/lab/presenters/gallery.js | Draws every spec and drives them all from one timeline (window.renderAt). A timeline with its own actions (the explainer's) is used as it is; otherwise the director writes them |
src/lab/presenters/index.html, wall.html, split.html + split.js, explain.html + explain.js | The gallery, the wall, the split screen and the explainer |
src/lab/video/stage.js | The bulletin's scenes: words as they are spoken, numbers that pop, bars, rain, wipes, ticker, subtitles, chapters and map. ?layout=half gives the 640-wide version used in the split |
src/lab/video/timeline.json, src/lab/presenters/explainer.json | Timelines: segments, word timings, loudness per frame, actions |
bulletins/voice.mjs | The voice, with the word-for-word transcript check and the cost ledger |
bulletins/video.mjs | The plain video bulletin and its voice |
bulletins/video2.mjs | The bulletin's timeline, the stage pages and the animated bulletin |
bulletins/presenters-video.mjs [wall|split] | The wall and split videos |
bulletins/explainer.mjs [--reuse] | The explainer: its script, voice, timeline and video. --reuse keeps the saved voice, at no cost |
presenters.js, which builds the presenters, and gallery.js, which runs them. In the browser, the audio element's currentTime is t. For the video, a page exposes window.renderAt(t).src/ on localhost and starts headless Chromium with Playwright. For every frame f it calls renderAt(f / 25) and takes a screenshot. ffmpeg joins the PNGs with the voice (libx264, yuv420p, +faststart).script-src 'self'.presenters.json, with a new id, a kind, looks, a render and a backdrop./lab/presenters/ and press play.humanoid() in presenters.js. It returns { parts, rig } and is registered in build() and compile().node bulletins/presenters-video.mjs to render the wall.src/lab/presenters/v1/ to v2/, and give presenters.json the version 2.0.0. Never edit v1/.looks words;{ parts, rig });render style in draw();direct(), and a field in stateAt();apply() must then handle or ignore.Date.now(), no unseeded random numbers, and no network at render time.v2/, and set them beside version 1's.Where version 2 could go, in rough order of cost:
docs/research/2026-11-20-synthetic-presenter-tools.md, which compares Kling AI Avatar and Hedra. Both take our own image and our own voice, and cost about $1.50 to $1.70 per 30 s.You are building synthetic news presenters as data. Read https://github.com/PrompTugal/PrompTugal__News__Bulletins/blob/dev/docs/presenters/README.md, then src/lab/presenters/presenters.json and src/lab/presenters/presenters.js in the same repository. Keep the four layers: spec, parts and rig, actions, and state at t. Keep every frame a pure function of t. Write three new presenters as JSON specs in the same language: one more realistic human (male), one non-human or shape, and one in a style of your choice. If a spec needs a new body plan, write it as a function that returns { parts, rig }. Do not copy anyone's likeness. Label every presenter as synthetic. Return the JSON, any new code, and a list of the actions each presenter supports.
openai/gpt-audio-mini, stock voice "alloy".Built in a separate Claude session from docs/presenters/briefs/claude.md, handed over as a zip, reviewed and adopted by bulletins.b@ at Dinis's word ("can we adopt these versions and tools and workflows").
src/lab/presenters/v2-claude/, live at https://bulletins.promptugal.news/lab/presenters/v2-claude/ (index.html the showcase, sheet.html the model sheet, playground.html);README.md, PLAN.md;COMPARISON.md;THIRD_PARTY.md;docs/presenters/v2-claude-debrief.md.moves.json, version 1's six among them with the same meaning; | Tool | What it does | |---|---| | render.mjs | Exports the showcase to video, frame by frame | | tools/determinism.mjs | Renders the same t twice and compares | | tools/frames.mjs | Grabs single frames | | tools/shot.mjs | Screenshots of dev.html | | tools/make-choreography.mjs | Writes choreography.json | | tools/pack.mjs | Builds single-file copies for sharing outside the site; never published, because they carry inline scripts |
.. and no symbolic links;three@0.160.1;default-src 'self'; script-src 'self', and make no request off their own host;This page is docs/presenters/README.md as frozen with version 1 (presenters.js, presenters.json, gallery.js, explain.js; their exact bytes are in git). Made by agents from PrompTugal.news's data.