Log in
Official

Check a take for re-performed speech

Check whether a video model re-performed the audio it was given instead of keeping it: a stretched or shortened word, a repeated syllable or phrase, a pause added or dropped, and where speech starts in the take. Aligns the take's own audio to the audio sent by dynamic time warping on 10 ms log-mel frames and flags any 0.4 s of speech that comes out 0.12 s or more longer or shorter. Free, local, under a second a take. Use on every take rendered with a reference audio track before picking it; for the mouth against the sound, hn4a-lipsync-check.

About this skill

Give it a rendered take and the exact audio the model was sent; get, per take, the most time any 0.4 s of the sent speech gained or lost in the take, where on both clocks, the words there, and where speech starts in each file. A take whose speech matches the audio sent passes. One that stretched a word, stuttered a syllable, said a phrase twice, added a pause or cut a piece out is flagged.

It checks the sound, not the picture: for the mouth against the sound, run hn4a-lipsync-check; to cut a late take so its line lands on time, python-find-line-in-render. A changed, missing or extra word is a transcript check (python-read-word-timings, check).

Inputs

  • The takes: the rendered videos, as they came back, with their own soundtrack.
  • The audio sent: the very file passed to the model. For a dialogue take that is the one mixed window both speakers were rendered on, never one speaker's line: every false flag in testing came from checking a dialogue take against one voice.
  • Word times (optional): the sent file's words on its own clock (python-read-word-timings, words), to name what is under a flagged window.

Run it

Write references/reperformed_speech.md's script into the job's scripts/ as reperformed_speech.py, as is, and run it with cwd the job folder:

exec("python", ["scripts/reperformed_speech.py", "--sent", "audio/shot18.wav",
  "--words", "audio/shot18.words.json",
  "video/raw/shot18_a.mp4", "video/raw/shot18_b.mp4"], cwd="<job>")
  • Several takes of one shot go in one call, all against the same --sent.
  • --locate when the take carries more speech than the file sent (a line checked inside a longer take): it finds the sent speech in the take instead of matching end to end. Without it, extra speech in the take reads as a stretch.

What you get

[{"take": "video/raw/shot18_a.mp4", "status": "flag",
  "longer":  {"s": 0.19, "at_s": 2.31, "in_take_s": 2.35, "words": ["the", "text"], "flag": true},
  "shorter": {"s": -0.01, "at_s": 1.87, "in_take_s": 1.9, "words": [], "flag": false},
  "speech_starts": {"sent_s": 0.11, "take_s": 0.11, "late_s": 0.0},
  "limits": {"window_s": 0.4, "flag_s": 0.12}}]
  • status: flag when either side is 0.12 s or more; else ok.
  • longer / shorter: the most time gained or lost over any 0.4 s of the sent speech (windows every 20 ms), with where that window starts on the sent file's clock (at_s) and the take's (in_take_s), and the words in it.
  • speech_starts: where speech starts in each file; late_s is the take's late start. Silence at both ends is trimmed before aligning, so a late start or a longer tail is reported here and never flagged: use it to place the line in the cut.

Tips and traps

  • Why not word times. Whisper on the same audio twice (232 words) gave a word's length differing by up to 0.87 s (p90 0.16 s), and onsets by up to 1.14 s: a "the" measured 0.19 s, then 1.05 s. Rules on whisper's lengths or gaps that caught a real 0.19 s stretch also flagged 10 to 11 takes, 6 to 7 of them pure noise. This check, on the same 29 takes, flagged 9, every one real.
  • The threshold has margin both ways. On 29 real takes, untouched ones stayed at 0.035 s or under, the nearest clean value was 0.08 s and the smallest real edit 0.15 s. Synthetic edits come back within ±0.06 s, the start within ±0.03 s.
  • What it caught, in seconds gained (+) or lost (−): an inserted 1.6 s gap with the next phrase re-voiced (+1.58, −0.39); a three-word phrase said twice (+1.11, and +1.02 in the retake made to fix it); a whole line re-voiced and spread to fill the clip (+0.86); one word held long (+0.81); a 0.33 s longer pause between two lines (+0.27); a doubled consonant, "t-text" (+0.19); 0.15 s dropped inside a phrase (−0.15).
  • A longer pause is flagged too. No word stretched, but the timing moved; listen and decide. Whether a model is prone to it, and how to send audio it keeps, is in that model's leaf.
  • A repeat sits at either copy. When a piece is said twice, the extra time can be placed on the first saying or the second; at_s and words point near it, not to the frame. Listen around the window.
  • A flag is a measurement, not a verdict on its own: listen to the window before rejecting a take, and to an ok take as well, since a changed word keeps the timing.
  • Seconds, not minutes. It runs in well under a second on a 15 s take; no model.

Check it

  • Play each flagged take from in_take_s with the sent audio from at_s; the difference should be audible.
  • Transcribe each take you keep and check its words against the lines (python-read-word-timings, check): a repeat shows there as extra words.

FAQs

Check whether a video model re-performed the audio it was given instead of keeping it: a stretched or shortened word, a repeated syllable or phrase, a pause added or dropped, and where speech starts in the take. Aligns the take's own audio to the audio sent by dynamic time warping on 10 ms log-mel frames and flags any 0.4 s of speech that comes out 0.12 s or more longer or shorter. Free, local, under a second a take. Use on every take rendered with a reference audio track before picking it; for the mouth against the sound, hn4a-lipsync-check.

Install Hypernatural Desktop, a free Mac app, and connect it to Claude Code, Codex or Claude Desktop. Then describe the video you want and your agent finds the skill itself, or paste this page's link (https://hypernatural.ai/skill/hn/python-check-reperformed-speech) and it installs hn/python-check-reperformed-speech and follows it.

Nothing. The skill is free and runs with tools on your own Mac, like python and ffmpeg.

Yes. Ask your agent to adjust it for your job, or to save its own version. You can publish your version under your own handle so anyone can install it.

Get Hypernatural.

Install the Hypernatural app, open your agent like Claude or Codex, and describe your great video.

Sticker HypernaturalSticker BannerSticker TVBoy