Eve library

Audio defect detection, measured (2026-09-10)

Guide

Revision 1

On this page

Evidence for 182.C.18.04, which names nine defects: clipping, silence, low SNR, pumping, phasing, duplicate audio, channel inversion, excessive noise, and sample-rate/time-stretch artifacts.

Method#

Twelve clips, all derived from the committed clean fixture (../2026-09-10-cpu-sync-and-alignment/known-onset-clip-16k.wav, six Kokoro words with 600 ms gaps, 7.23 s) by arithmetic on real samples. Each defect is built the way the real thing happens rather than by setting the flag a detector reads — clipping is gain into the ceiling, phasing is one channel delayed by a fraction of a millisecond, the upsample is a real anti-aliased decimation and interpolation. A fixture that merely sets the flag proves the detector reads the flag.

The clips are not committed. tools/human-video/evaluator/make_defect_fixtures.py reproduces them byte for byte from a seeded generator (verified: all twelve SHA-256s identical on a second run), and measurements.json holds what tools/human-video/evaluator/audio_defects.py measured on them.

text
python tools/human-video/evaluator/make_defect_fixtures.py --out /tmp/fixtures
python tools/human-video/evaluator/audio_defects.py --audio /tmp/fixtures/clipped.wav

Results#

Defect Clean clip Defective clip Separates
clipping 0-sample runs 15-sample run, peak 0.00 dBFS yes
silence 0.599 s word gaps 1.200 s digital hole yes
low SNR 81.3 dB 11.9 dB yes
excessive noise 81.3 dB 3.0 dB yes
duplicate audio 0.261 1.000 at a 4.23 s lag yes
channel inversion — correlation −1.000, mono sum −73.7 dB yes
phasing — delay −6 samples (−0.375 ms), correlation 1.000 yes
sample-rate artifact energy to 8000 Hz energy stops at 4426 Hz against an 8000 Hz Nyquist yes
pumping no background at all not separated — see below no

The clean clip passes every gate. That is the most important row: a detector that fires on the good take teaches people to ignore it.

Three designs that did not work, and are recorded so nobody rebuilds them#

Duplicate audio, on the envelope. The obvious design correlates the loudness envelope with itself at a lag. It is worse than useless here: the CLEAN clip scored 0.813 and the same clip with its first three seconds spliced over its last three scored 0.795. Regular speech rhythm beats a real duplicate, because a rhythmic envelope correlates with itself at the word period. Rebuilt on the waveform, where a duplicate is the same samples twice, it separates 0.261 from 1.000.

Phasing, band by band. Measuring the mono sum's loss per frequency band and looking for deep, regularly spaced notches does not work on speech: the harmonic fine structure puts plenty of bins below −6 dB by chance, and on the 0.4 ms fixture it reported 53 "notches" spaced at 50 Hz — the grouping width, not the comb, whose real nulls are at 1250, 3750 and 6250 Hz. Rebuilt as inter-channel cross-correlation, which is the standard measurement and unambiguous: −6 samples at correlation 1.000, first null 1333 Hz.

Pumping — all three attempts. Measured against a real compressed fixture (the clip with continuous noise under it, through a 20:1 limiter with a 400 ms release) and its uncompressed control:

Design Compressed Uncompressed control Verdict
speech envelope vs. local floor, correlation 0.495 0.536 no separation
ramp from gap start to gap end −2.0, −0.4, −2.5, +0.7, −1.5, −1.3 dB +0.1, +0.3, +3.5, +1.1, −4.7, −7.3 dB both scattered
max climb within each gap (mean) 1.17 dB 2.87 dB backwards

Design 1 also had the sign wrong on the physics: a compressor ducks during speech and recovers after, so what a listener hears as pumping is the background swelling in the gaps, not rising with the speech. Designs 2 and 3 tested that corrected theory and still did not separate.

So pumping is measured and not gated. PUMPING_VALIDATED is false, assertPumpingGateable() refuses, and gateAudio() will not fail a take on it; the gap-floor numbers still reach a human through reportedNotGated(). A real detector probably needs the 182.C.33 rated corpus rather than a synthetic compressor, because the thing being detected is a perceptual judgement about a gain stage and not a threshold on a number.

What is deliberately not detected#

Time-stretch artifacts. A phase vocoder's transient smearing has no signature separable from a soft consonant. The RESAMPLE half of that item is unambiguous and is detected (the band-limit row above). The speaking-rate change a stretch causes is 182.C.18.02's slope, measured against the approved audio, and that is where a stretched take is caught.

True SNR. What is computed is the percentile split — loud frames as speech-plus-noise, quiet frames as noise. A true SNR needs the clean reference, which does not exist for a generated take. The estimate reads low when the speaker never pauses, and speechFraction is reported so a reader can see whether that applies. Every finding says so in its own text.

Per-item status this evidence supports#

Item Was Is
182.C.18.04 not-started done for eight of nine; pumping measured, not gated, and blocked on 182.C.33