How the audit works
After every render, scenecast audits the finished video moment by moment and writes the result to out/audit/.
scenecast render exits with code 1 when any check FAILs, so a script or CI job can stop on a bad video. A WARN never
fails the render. --no-audit skips the audit and removes any older out/audit/, so a stale audit is never left next
to a new video.
The audit does not trust the plan. It transcribes the final mix with faster-whisper to find when each cue word is really heard, and it reads the boxes the recorder measured in the live page.
Read every row of out/audit/audit-table.md and every tile of out/audit/contact-sheet.png. PASS, WARN and FAIL are written as text as well as shown in colour.
Files
| File | What it is |
|---|---|
audit-table.md |
The verdict, the loudness and blank frames, one row per cued step, the "Scene checks" table, and the narration diff. Read this first. |
audit.json |
The same data, for scripts: moments are the table's rows, scenes the scene checks. |
contact-sheet.png |
One thumbnail per zoom and ring moment, framed in green (PASS), amber (WARN) or red (FAIL). |
frames/ |
Those frames at full size, named <scene>-<cue>.png. |
The table
Each cued step is one row:
| Column | Meaning |
|---|---|
| scene, cue | The step. |
| word time | When the cue word is heard in the final video (seconds), and where that time came from: forced (forced alignment of the script against the mix), onset (the phrase's first word, from where the voice starts on its clean clip), free (the free transcript, when alignment fell back for that phrase) or plan (not heard: the planned time was used). |
| action time | When the action happens in the final video. |
| gap | action time minus (word time + the step's offset). |
| target label | The step's selector. |
| caption side | Where the caption was at the action: bottom, top, bottom-left, bottom-right, top-left, top-right, beside (next to the phone) or none. |
| checks | Every check and its result. |
| verdict | The worst check: PASS, WARN or FAIL. |
Checks
| Check | FAIL when | Typical fix |
|---|---|---|
| sync | The action is more than 0.30 s from its cue word, or retiming cut it out. | Move the cue to the word that names the action; use offset for a deliberate lead or lag. If retiming cut the action, reduce the work before it or allow more narration time. Otherwise, compare the word time and narration diff. See sync fixes. |
| target | The ring or zoom box does not contain the element's box (measured at the ring's peak), or no target was logged. A zoom's target is the element plus its pad, without the part of the pad that runs off the screen. |
Point sel at the element the narration names; add pad; make sure the element is still on screen when the ring peaks. |
| captions | A caption overlaps the target, the cursor's destination, a ring or an open panel by more than 0 px, judged on screen, including during a zoom. A box that covers 90% or more of the screen as shown (a full-frame target, such as a page-wide container) is not protected: no caption could avoid it. | Usually automatic. If both the top and the bottom are blocked, zoom less, move the target, or split the step across a shorter phrase. |
| crop | The zoom leaves the frame, the target is closer than 24 px to a side of the zoom that is not on the frame edge, or the zoom cuts a nav partway. A side within 0.5 px of the frame edge is exempt (nothing lies beyond it), and on phone scenes so is a side at or past the phone screen's edge. | Zoom a slightly larger element; declare the app's nav bars in app.nav. |
| loading | A spinner or skeleton was visible just before the action. WARN when the page had not settled before the step (the settle wait timed out). | Seed the data first, add prewarm routes, or add a cue-less wait step before it. |
| plan | The plan has no zoom where a zoom step expected one, no ring box was logged for a ring step, an unzoom has no zoom ending within 0.5 s of it, or a scene that starts zoomed has no matching zoom. |
Re-render with --fresh; if it persists, report it. |
| word | (WARN) The cue word was not found in the transcript, so the planned time was used. (A misheard word is already matched by its position; this means nothing was heard there.) | See troubleshooting: for a name, add it to audit.allowList; otherwise choose a more distinct cue word, or listen to how the voice says it. |
Three checks cover the whole video:
| Check | FAIL when |
|---|---|
| loudness | The mix is outside −16 ±1 LUFS, or its true peak is above −1.5 dBTP. |
| blank frames | Any frame inside an app scene is near-uniform, such as a blank page between two navigations. Only the app's screen counts (the phone screen on phone scenes), captions are left out, and cards and the dissolves into and out of them are skipped. The times are listed. |
| narration | Never FAILs. A WARN shows a diff (-"expected" +"heard") when the transcript differs from the script after normalising numbers, case and punctuation. A word or name in audit.allowList may be heard differently, including as one more word (for example "worklist" heard as "work list"), without a WARN. An allow-listed cue that recognition leaves out entirely is placed by position: at the gap the heard words around it leave. |
| pronunciation | A WARN by default (audit.pronunciation: fail makes it a FAIL, off skips it). Lists script words the transcript heard as something else, most likely because the voice said them differently, each with its time and a say: entry to start from. See pronunciation. |
Unzoom rows
An unzoom step gets a row like any cued step. Its action time is the end of the zoom it closes (the nearest zoom
end within 0.5 s of it); its target label is empty, and it has sync, captions and loading checks, but no target or
crop check (there is nothing to aim at).
Scene checks
The "Scene checks" table under the rows has one row per scene that needs checks of its own:
- A scene that starts zoomed (
zoomon the scene): a target check and a crop check for that initial zoom. - A scene without cued steps (a chapter card, for example): a captions check.
Word times
The free transcript decides whether a cue word was heard at all, and gives the narration diff. A heard cue takes its
time from forced alignment of the known script against the final mix, which returns one time for every script word
(none missed or merged). The first word of a phrase after a silence takes the voice's own onset instead. When the
aligner gives two adjacent spoken words the same start (a short word that got no frames of its own), the later one
starts one alignment frame (0.02 s) on, and the phrase stays forced. A phrase the aligner cannot time sensibly
(three or more words on one start, or times going backwards) falls back to the transcript for that phrase only, and
its words show free. A cue that
was not heard WARNs with the plan time, as before.
Read every moment
Read every row of audit-table.md and every tile of contact-sheet.png, not a sample. A video can pass on most
moments and still show a caption over a button, or a ring around the wrong element, on one. The audit is there so that
nobody has to watch the whole video frame by frame, but only if all of it is read.
The demo video in examples/demo-app passes with every cued moment at PASS: over five cold renders, the median gap
between word and action was 0.007 to 0.011 s and the largest 0.030 s.
What the audit does not check
- A caption over the target of an earlier step that is still on screen. Each row protects its own step's target and its open panels; the previous step's element is not protected once a new step has started. Keep the zoom pointed at what the narration names. See troubleshooting.
- Whether the narration is a good script. It checks that the words were spoken, not that they make sense.
Read a FAIL row
- Find the scene, cue and the failing check in
audit-table.md. - Compare word time, action time and gap. A missing action time can mean “cut by retime”;
planmeans the cue was not heard. - Inspect the corresponding contact-sheet tile and the full-size image in
frames/. Read the narration diff for missing or misheard words. - Apply the documented fix below. Use
--only <sceneId>while working on one scene; use--freshafter changing the app itself. - Render the whole video again with the audit enabled and read every row and tile.
Fix failures
Sync FAILs
Retime places every recorded action on its cue word, so a slow page shows up as trimmed waiting, not as a late action. A sync FAIL has one of two causes:
The action time is — ("cut by retime"). The action fell inside a stretch retime removed. This happens when the
take is far behind the voice and there is no quiet time to trim. Give the page less to do before the step (seed the
data with app.seed, open slow routes in prewarm), or give the narration more time before the cue.
The gap is large but the action time is set. Speech recognition placed the cue word away from where the voice says it. Check the word time column against the narration diff; if the word was misheard or dropped, see the next item.
The cue word was not heard
The cue word was not heard ((plan) in the word time column). A word recognition merely
misheard is already matched by its position, so this means nothing was heard where the cue should be. The narration diff
at the bottom of audit-table.md shows what was heard around it. Then:
- A name or product word (recognition often drops or merges these): add it to
audit.allowList. An allow-listed cue that is left out is placed by position, in the gap the heard words around it leave. - An ordinary word: choose a more distinct cue word for the step, one that is clearly spoken and not swallowed by its neighbours (for example "press Sign in the corner" rather than a short word at the end of a fast phrase).
- Check how the voice says it. Listen to the scene's voice in
work/<id>/voice/<scene>/voice.wav. If Kokoro mispronounces or rushes the word, respell it in the narration (for example spell out an abbreviation).
A cue at the start of a scene. A pointer step cued on one of the first words has no time to glide from the
scene's start position. The first pointer step of a scene is then pre-positioned: the cursor is on its target from
the first frame and the action fires on the cue, so it is not late. Only the first one is: a second early step glides
faster from the first to still land on its word. If the cursor appearing on the target looks abrupt, put the cue a
few words later, or set the scene's cursor near the target.
The cue is ambiguous. A cue matches whole words, case-insensitively. When the cue appears more than once, set
occ. In "To sign in, type your email, and press Sign in", the button is { cue: Sign in, occ: 2 }.
The steps cannot be recorded as scheduled
render stops after the voice and before recording, listing every step whose timing could only fail once the scene
was recorded:
… would act at 0.00 s, before the take has started (the flash marker takes the scene's first 0.12 s); cue a later word, or add offset: 0.2. The cue is the scene's first word. Cue the step on a later word of the same phrase, or give it theoffsetthe message suggests.… would act at 4.20 s, before step 2 (click on "pick") at 4.52 s; steps run in the order they are listed. The recorder runs steps in order, so a step cued on an earlier word than the step above it cannot happen first. Move it above that step, or cue it on a later word.
These used to fail after every scene had been recorded, as action <n> happened before the take started or
action <n> is scheduled before the previous action (the second only for cued steps: an uncued step no longer acts
before the step above it).
Two warnings, which do not stop the render:
… acts at 0.15 s, close to the flash marker that starts the take. It usually records. If the render then fails withhappened before the take started, cue a later word or add theoffsetit gives.… acts at 12.40 s, after the scene ends at 11.95 s …, so it is not shown. A step without a cue runs after the step before it plus that step'sms, and here that is past the end of the narration. Give it a cue, or shorten themsbefore it by the amount the message says.
Caption FAILs
A caption covers the target. Each caption tries bottom, top, then the four corners, and takes the first position
that covers nothing it must keep clear. When every position covers something, it takes the one that covers least, and
the captions check in the table gives the reason, no free position; <side> overlaps least (or all equal, <side> kept). Then zoom to
a smaller element, close a panel the step does not need, or move the step to a phrase when less is on screen. Point
the zoom at what the narration names: a zoom on a whole page leaves no room anywhere.
zoom on <sel> leaves no caption position free (its target fills N% of the zoomed height) (a warning from
render or preview, before composing). While that zoom is held, the zoomed target covers the top and bottom bands and
the corners, so some caption has to overlap it, and the audit will likely FAIL its captions check. Zoom on a smaller
element (the field, not the form), use a smaller pad, or end the zoom sooner with an unzoom before the phrase.
A caption covers a panel the audit does not know. Built-in panels are dialogs, menus, listboxes and modals. Add
the app's own pop-overs and drawers to app.panels (CSS selectors), and captions keep clear of them too.
A caption covers the previous step's target, and the audit passes. The audit protects each step's own target, not an earlier one that is still on screen. Keep the zoom pointed at what the narration names, so the thing being talked about is the thing being protected. Watch for this on the contact sheet.
Crop FAILs
The zoom cuts the nav. Declare the app's navigation bars in app.nav:
app:
nav:
- { selector: aside.sidebar, edge: left }
- { selector: header.topbar, edge: top }
A zoom then shows each declared nav whole or leaves it out.
zoom on <sel> became the full frame because it holds nav <nav> (a warning from render or preview), often followed
by a target FAIL such as zoom 0,0 1920x1080 does not contain target. The zoom's region (the element plus pad)
reached a declared nav, so it grew to show that nav whole, and that made it the whole frame: no zoom at all. Use a
smaller pad (on the scene's zoom or the step), or zoom on an element that is clear of the nav.
The target is too close to the zoom's edge. Zoom a slightly larger element (its card or section), so the zoomed region has room around it inside the frame.
Narration WARNs
A WARN such as -"worklist" +"work list" means speech recognition heard the word differently. If the voice is fine,
add the word to the scene file:
audit:
allowList: [worklist]
A narration WARN never fails the render, but read it: it is also how you catch a word that was mispronounced or dropped. In the demo, the first word after the silent intro card ("Welcome") is sometimes not heard; that WARN is known.
Pronunciation WARNs
The "Pronunciation" section of audit-table.md lists script words that the transcript heard as something else: the time,
what the script says, what was heard, how alike the two sound (0 to 1), and a say: entry to start from (an
acronym's letters, or misaki's phonemes for the word, to edit). To keep false alarms rare, it skips filler ("um"),
allow-listed names, words heard as the same letters or the same compound ("S K U" for SKU, "work list" for
worklist), homophones (the same misaki sound), words that were left out or added, and words heard as something that
sounds nothing like them (a recognition slip). A word with a say: entry is compared with what the entry says.
To fix a flagged word, listen to that moment, then add a say: entry (see pronunciation)
or an inline [word](/phonemes/), or allow-list the name if the voice was right and the recogniser was wrong.
say:
Mira: "/mˈiɹə/"
Blank frame FAILs
A page that goes blank while it navigates is frozen over automatically: when recording, scenecast finds near-uniform
frames in each take and replaces them with the last good frame before them, in the take itself. That frame is the one
on screen at the action that started the navigation (a click on Sign in, say), so the action stays visible, and the
blank frames right after it never reach the video. The render log says record/<scene>: 1 blank frame run(s) in the take; froze 1 on the last good frame. A blank-frame FAIL means a near-uniform frame is left in an app scene. The
times in the audit say where to look.
- The screen really is near-uniform. A zoom on a plain area, or a page that is mostly one colour, measures as blank (a false FAIL for what the viewer sees, but a dull shot). Zoom to a region with content (text, controls), or make the step show something.
- Anything else is unexpected: blank runs in a take are frozen over, including where the video holds a frame while
it waits for the next action. Re-render with
--fresh, and report it if it persists.
The cursor
The cursor sits on an input, or over what the narration is about. After a click or typing, the cursor stays
where it acted. When the next pointer step (or the scene end) is more than cursor.parkAfterSec (2.5 s) away, it
parks by itself at cursor.park (96 px in from the right edge by default). To move it sooner, or somewhere else, add
a { do: park } step (with at for the spot); to start a scene with the cursor out of the way, set the scene's
cursor (for example cursor: right). park is not allowed on phone scenes: there is no cursor, and the touch
indicator fades by itself (use wait to hold).
A hover step cannot ring what it reveals. The ringSel elements are found as the cursor sets off, before a
tooltip or hover menu appears. Ring the revealed element with a separate ring step cued a word or two later. An
action that only moves what it rings (a row that lifts 2 px on hover, a dialog that re-centres when an option is
clicked) needs nothing: its ringSel ring waits up to 0.4 s for the layout and the transitions to finish and is drawn
where the element comes to rest. A transition longer than that can still leave the ring off by the rest of the
movement.
Rings
ring target "<sel>" is taller than the screen …; the ring runs off the screen(a warning). The element can never be shown whole, so the page is not scrolled for it. Ring a smaller part: the card's heading, or its first rows.ring target "<sel>" runs past the edge of the screen and is not scrolled into view while an earlier ring is showing(a warning). Scrolling would move the page under the earlier ring and fail its target check. Ring a smaller part, or cue this ring after the earlier one has ended (shorten that ring'sms).- A ring around something that has gone. A ring fades out by itself when its element is removed or hidden (a
drawer that closes). A ring that stays over the wrong content means its element is still there, only covered:
close the cover later, or shorten the ring's
ms.
Late steps
typing "…" runs until …, after step <n> … is due to start(a warning). Typing takes 35 ms a character, and the next step starts only once it is done. Start typing on an earlier word, or shorten the text.- A step is late after a heavy page change. A cued step no longer waits for data requests or a moving layout past
its own time; only a document still loading or a visible loading indicator holds it up. If the audit still shows it
late with a
loadingWARN or FAIL, seed the data or add awaitearlier in the scene.
Steps that fail while recording
<sel> is not checked after the click(acheckstep).selmust be the element that holds the state: the<input type=checkbox>itself, or the element withrole="switch"andaria-checked, not its label or a wrapper.record/<scene>: no flash marker found in the take; recording it again(a log line). Very rarely the magenta marker that starts each take is missing from the video file. The scene is recorded once more by itself, on the app data as the first take left it:app.seedis not run again, since the other scenes of the render rely on the data being seeded once. A scene that changes data (signs a document, say) then replays on changed data and usually fails loudly (a selector not found); if it records, check that take, or render again with--fresh. If that happens twice in a row the render stops withno flash marker found … (twice in a row; re-run the render …): run the same command again, and report it if it keeps happening.clicking "<sel>" opened no file chooser(anuploadstep).selmust be what a person clicks to choose a file: the button, the<label>of the file input, or a drop zone that opens the chooser on click. A hidden<input type=file>cannot be clicked; point at the element that opens it. A drop zone that only takes dragged files (and opens nothing on click) cannot be filmed withupload.the page did not scroll(ascrollstep withbyorto).byandtoscroll the window. Most app layouts scroll inside a container (a main panel, a table), so the window does not move. Usescrollwithselon an element inside that container: it is scrolled into the middle of the view, whichever element scrolls.zoom selector "<sel>" not found(a scene'szoom). The element is measured before recording starts, onrouteaftersetup: it must be there without any scene step. If it appears only after a click, open it insetup.setup step <i> selector "<sel>" not found. Setup runs onroutebefore the take: check the steps in order in a browser. Each setup step waits for the page to settle before the next one runs. See setup.brand.accent "…" is not a CSS colour; the touch indicator uses #F5C518(a warning on a phone scene). The render goes on with the default yellow; givebrand.accenta CSS colour (#rrggbb, a name,rgb(…)) to use yours.
Loading FAILs
A spinner or skeleton was visible just before the action. scenecast treats [aria-busy=true], a
[role=progressbar] without a value, .is-loading, .skeleton and [data-scenecast-loading] as loading. Seed the
data, prewarm the route, or wait. A spinner that the action itself brings up is its result and does not fail.