Assertions for AI-generated media. The bugs don't throw; rendercheck makes them throw.
Project description
rendercheck
The worst bugs in generated media don't throw.
"the audio often cuts off the final sentence […] though the API returns success without error signals"
— a developer on the OpenAI forum, April 2026, describing production output
If you generate speech or video with a model — TTS, voice agents, podcasts, avatars, AI video — your tests catch the exception that never happens. They do not catch the narration that reads at 300 words per minute, the voice track sitting 18 dB below the footage it's cut against, the clip that rendered at 42% length and got cached as a success, or the file whose audio track is missing entirely.
The 2026 state of the art for catching these is a person listening to the output. That works, and it costs more than everything else in your pipeline combined.
rendercheck makes them throw.
from rendercheck import assert_pace, assert_loudness, looks_ok
assert_pace("episode-12.mp3", "episode-12.vtt")
assert_loudness("episode-12.mp3")
looks_ok("slide-14.png", ["the title fits on one line"])
Plain assert functions. No framework, no runner, no config file, no service.
They raise AssertionError, so they already work in pytest, in CI, or in a
five-line script. Ten of the eleven checks have no dependencies and make no
network calls — if you have ffmpeg, you're ready.
Quickstart
You need ffmpeg on your PATH (brew install ffmpeg, apt-get install ffmpeg,
or winget install ffmpeg). Then:
pip install rendercheck
rendercheck demo
Or drop a file into the playground — same checks, running on ffmpeg compiled to WebAssembly, nothing uploaded.
demo synthesises five defective files and runs the real checks against them,
so you can see it fire without owning a broken render. Verbatim, first two of
five:
Narration too fast
A voice picked to match a presenter's face read English at machine-gun speed.
$ rendercheck check machine-gun.wav --script narration.vtt
FAIL pace narration pace 300 WPM exceeds 245 (300 words in 60.0s) -- this reads as machine-gun delivery and listeners cannot follow it: machine-gun.wav
PASS loudness -16.1 LUFS
PASS dead air 0.0 s silence
Levels that don't match
Synthesised narration landed 18 dB under the footage it was cut against.
$ rendercheck check too-quiet.wav
SKIP pace no --script given
FAIL loudness -34.0 LUFS is 18.0 dB quieter than the -16 target -- it will sound inaudible next to correctly-levelled audio cut alongside it: too-quiet.wav
PASS dead air 0.0 s silence
Then point it at your own output:
rendercheck check episode-12.mp3 --script episode-12.vtt
Exit code is 1 if anything failed — or if nothing could be measured, because
a run that looked at nothing is not a clean one. A path you typo'd exits 2.
--json gives you the same report for pipelines in any language, and --strict
rejects partial runs too.
In pytest they're just asserts — no plugin, no fixtures:
@pytest.mark.parametrize("episode", EPISODES)
def test_episode_is_shippable(episode):
assert_pace(episode.audio, episode.vtt)
assert_loudness(episode.audio)
assert_no_dead_air(episode.audio)
"Isn't this forty lines of pyloudnorm?"
For one of the eleven checks, roughly yes. None of these measurements are novel, and it would be dishonest to imply otherwise:
| The measurement | Already available from |
|---|---|
| Integrated loudness | pyloudnorm, ffmpeg's loudnorm |
| Silence detection | pydub.silence, ffmpeg's silencedetect |
| Duration, streams | ffprobe |
| Black frames, freezes | ffmpeg's blackdetect, freezedetect |
| Speaker identity | resemblyzer |
| Video quality metrics | VMAF, ffmpeg-quality-metrics |
Every one of those hands a number to a researcher. None of them is a gate. What is actually missing, and what this is:
- A threshold that came from a defect, not from a paper. 245 WPM because a real voice narrated at 280 and shipped. −16 LUFS because narration landed at −34 against footage at −13.
- A message that says what a person would notice. "−34.0 LUFS" is a reading. "18.0 dB quieter than the −16 target — it will sound inaudible next to correctly-levelled audio cut alongside it" is a bug report.
- Fail-open on infrastructure, fail-closed on a defect, so it can sit in CI without becoming the thing that breaks the build for its own reasons.
- Exit codes and one command over a directory, rather than a notebook.
Against the LLM-eval tools the difference is structural rather than a matter of coverage. promptfoo, DeepEval and RAGAS are excellent and none of them can do this: their test case is a string. There is no assertion to add, because there is nowhere to put the file. Use them for the script; use this for what the script turned into.
And if you already run broadcast QC — Interra BATON, Telestream Vidchecker, QCTools — you have had most of this for twenty years. It just isn't in your git hooks.
In your pipeline
GitHub Actions — installs ffmpeg and fails the build on a defect:
- uses: rogermsc/rendercheck@v0
with:
files: out/
strict: "true"
Node, Remotion, anything that renders in a build step:
npx rendercheck check out/
promptfoo — its assertions are all string-shaped, so an eval can confirm the
narration script and tell you nothing about the audio. examples/promptfoo/
closes that half in thirty lines:
assert:
- type: python
value: file://rendercheck_assert.py:get_assert
Anything else — --json on stdout, one object per file, plus exit codes.
Six checks, six incidents
Each default is a threshold set by a defect that actually shipped, not a number chosen for symmetry. All output below is verbatim. Every threshold is an argument — see the reference for tuning.
Narration too fast. A voice picked to match a presenter's face narrated English at ~280 WPM. The audio was valid, correctly timed, perfectly in sync. It just sounded like a machine gun.
assert_pace("episode-12.mp3", "episode-12.vtt", max_wpm=245)
narration pace 300 WPM exceeds 245 (300 words in 60.0s) -- this reads as
machine-gun delivery and listeners cannot follow it: episode-12.mp3
Levels that don't match. Synthesised narration landed at −34 LUFS and was concatenated with footage at −13. Same file, a 20 dB step in the middle. Nobody noticed until viewers spent 45 minutes riding the volume knob.
assert_loudness("episode-12.mp3", target_lufs=-16, tol=2.0)
-34.0 LUFS is 18.0 dB quieter than the -16 target -- it will sound inaudible
next to correctly-levelled audio cut alongside it: episode-12.mp3
Truncated renders cached as successes. Encode failures produced clips a fraction of their intended length, which the pipeline cached as succeeded. Retries only re-ran the ones that had errored — and these hadn't.
assert_duration("segment-07.mp4", expected_seconds=24.0)
segment-07.mp4 is 10.0s -- 42% of the expected 24.0s. A render this short is a
silent encode failure, not a short take; re-render rather than retry
Holes in the middle. Compositing failed transiently and silently, leaving dead stretches mid-file. Right length, right average loudness. The hole only existed in the middle.
assert_no_dead_air("episode-12.mp3", max_silence=3.0)
6.2s of silence starting at 0:41 exceeds the 3s limit -- a gap this long
mid-file is a dropped segment, not a pause (2 found in total): episode-12.mp3
The wrong person speaking. A script said "I'm Jordan" while the system had assigned Alex. A whole module rendered with the wrong face and the wrong voice. Every other gate passed.
assert_speaker(script, expected="Alex", known_names=["Alex", "Jordan", "Sam"])
the script introduces the presenter as "Jordan" but Alex is assigned -- the
rendered avatar would introduce itself with someone else's name. Fix whichever
is wrong: the assigned presenter, or the name in the script
The known_names roster is required, and it's the whole trick: without it, a
character in a scenario saying "I'm Rosa, a nurse" trips the check on every
script that tells a story. Only a name belonging to someone who could actually
have been cast counts as a claim about the speaker.
Things you can only see. Overflowing titles, colliding logos, half-empty canvases, figures cropped mid-caption. All rendered without error.
looks_ok("slide-14.png", ["the title fits on one line", "no text is clipped"])
[major] slide-14.png: the title wraps to three lines and overlaps the logo in
the top-right corner -- failed rubric item: 'the title fits on one line'
This is the only check that needs a key: pip install "rendercheck[vision]".
Five more, for defects other people keep reporting
The six above came out of one pipeline. These came from reading other people's bug reports — the same complaint, filed against every provider in turn:
| Check | The defect |
|---|---|
assert_no_truncation |
Speech that stops mid-sentence while the API returns success. The single most-reported defect in generated audio; measured against the file's own average, so it holds for quiet and loud content alike. |
assert_has_sound |
A clip that comes back silent — an upscale step drops the audio track, a mux points at the wrong stream, a synthesis writes zeroes. |
assert_no_clipping |
A gain stage pushed the waveform past full scale. Crackles on consonants, and turning it down afterwards does not undo it. |
assert_no_black_frames |
Generated video truncating to black instead of erroring: right length, valid container, nothing in the last third. |
assert_not_frozen |
The picture stops moving. Every frame present, every frame the same frame. |
The video pair skips rather than passes when a file has no video stream.
blackdetect on a .wav reports nothing, and nothing would otherwise read as
"looked, all clean" — the same trap that produced the regression below.
Found on real files
Not a synthetic benchmark. Pointed at the output of a production pipeline that renders narrated video at scale:
| result | |
|---|---|
| A course known to be good | clean — 162 WPM, −14.1 LUFS, no dead air |
| Content re-rendered after a loudness fix landed | passes at −14.2 LUFS |
| Four episodes rendered before that fix | fails at −19.4 to −21.3 LUFS |
It drew the line exactly where the fix landed, on files it was never told anything about, agreeing with a conclusion humans had reached months earlier — and produced no false positives across the clean set.
Two promises
It fails open on infrastructure. No ffmpeg, no key, no network, no measurement → it warns and passes. A gate that blocks your pipeline because of its own breakage gets deleted within a week, and then it protects nothing. A defect fails closed; the checker fails open. (A missing file is your typo, not infrastructure — that still raises.)
Silence is never mistaken for success. A check that couldn't run says so, as
a rendercheck.Skipped warning and in the CLI output. An empty run never reads
as a clean one.
We had to earn the second one, twice.
The first cut of this library returned PASS for a file with no audio track
at all — silencedetect reports nothing when there is nothing to analyse, and
that read as "no silence found". It is now the loudest failure in the suite,
with a regression test named after it, and the line it taught is the rule
everything else follows: if we measured and it is wrong, fail closed; if we
could not measure, fail open.
Then, before releasing under this name, we audited the tool against its own premise and found seven more. Every one of them reported success without having established it:
- An all-skipped run exited
0. No ffmpeg on the runner meant a green build. - A typo'd file path exited
0, contradicting the promise two paragraphs up. - A typo'd
--scriptpath was read as narration — one word — and produced a confident, wrong verdict about the audio:1 WPM is below 110. --presenterwithout--known-namesdefaulted the roster to the assigned presenter, which made the speaker check structurally incapable of firing. It printedPASSon a script naming somebody else.looks_okblamed a missing API key for every exception, so an SDK mismatch passed forever and Bedrock users were sent chasing the wrong thing.- ffprobe failures leaked a raw Python list into the message.
- Without ffmpeg the test suite crashed on collection instead of skipping.
All seven are fixed, each with a test that fails without the fix, and the exit
codes are now a contract: 0 measured and clean, 1 a defect or nothing
measured, 2 a path that isn't there. Details in the
changelog.
A tool that catches silent failures is worth exactly as much as its own honesty about them.
What it does not check
Being explicit, because a QA tool that implies more coverage than it has is worse than none:
- Lip sync and A/V drift. The video checks look for black and frozen stretches; nothing here relates the picture to the sound.
- Perceptual video quality. No PSNR, SSIM, or VMAF — those need a reference encode to compare against, which generated media does not have.
- Whether the narration is correct — only how fast it's read. Groundedness and factual accuracy are a different problem, well covered by the LLM-eval tools.
- Speech intelligibility. Loudness is not clarity; a correctly-levelled track can still be mumbled.
- Music, mixing, or anything non-speech. The defaults assume spoken word.
- The rubric you didn't write.
looks_okonly checks what you ask it to.
More
- Symptoms — "the TTS cut off the last sentence", "the clip came back silent", and which check catches each
- Reference and tuning — every threshold, and when to turn a check off
- Contributing — the bar for a new check
- Changelog
MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rendercheck-0.2.0.tar.gz.
File metadata
- Download URL: rendercheck-0.2.0.tar.gz
- Upload date:
- Size: 42.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e44cd4f27cf53966333b4f574a8c876b97fa1fbc544e1343913b14807098e029
|
|
| MD5 |
6fb419d4eab0617f4dd7f95d3f775d9a
|
|
| BLAKE2b-256 |
2314d969eb8fc73f4f05423c009e8d131058a3fc77f6df88e1b5fca80469bdbb
|
Provenance
The following attestation bundles were made for rendercheck-0.2.0.tar.gz:
Publisher:
release.yml on rogermsc/rendercheck
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rendercheck-0.2.0.tar.gz -
Subject digest:
e44cd4f27cf53966333b4f574a8c876b97fa1fbc544e1343913b14807098e029 - Sigstore transparency entry: 2339961778
- Sigstore integration time:
-
Permalink:
rogermsc/rendercheck@bea0bd71bd10a9ad0b5e4d7719f3185089241b8a -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/rogermsc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bea0bd71bd10a9ad0b5e4d7719f3185089241b8a -
Trigger Event:
push
-
Statement type:
File details
Details for the file rendercheck-0.2.0-py3-none-any.whl.
File metadata
- Download URL: rendercheck-0.2.0-py3-none-any.whl
- Upload date:
- Size: 32.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
384592fe8f5e4a57818c010962e793d188549756231cd05894e470ef5695ceed
|
|
| MD5 |
7ccc1be9f781c48bb35de306b3ba3173
|
|
| BLAKE2b-256 |
569b727dfab399914bc35e0b67a526e262955d77e6dc2af91b1187a774f7d1a5
|
Provenance
The following attestation bundles were made for rendercheck-0.2.0-py3-none-any.whl:
Publisher:
release.yml on rogermsc/rendercheck
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rendercheck-0.2.0-py3-none-any.whl -
Subject digest:
384592fe8f5e4a57818c010962e793d188549756231cd05894e470ef5695ceed - Sigstore transparency entry: 2339961799
- Sigstore integration time:
-
Permalink:
rogermsc/rendercheck@bea0bd71bd10a9ad0b5e4d7719f3185089241b8a -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/rogermsc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bea0bd71bd10a9ad0b5e4d7719f3185089241b8a -
Trigger Event:
push
-
Statement type: