Noise has perfectly good loudness
My system reads status updates to me. A neural voice generates the speech. FFmpeg converts it into a format my phone can play.
One evening it started producing loud white noise. I complained. The AI measured the audio, found peaks above the safe limit, and normalized the files. The measurements improved. The noise remained.
Every loudness check was green. The files sat near the intended level and stayed below clipping. They were also unlistenable.
A spectrogram found the defect in seconds. A spectrogram is a picture of sound across time and frequency. The first 2.2 seconds looked like speech. Then came a hard edge and a solid block across the whole frequency range. That block was white noise.
The cause was one byte.
The voice generator runs at 22,050 samples per second. The pipeline requested a quarter-second pause between sentences. Its silence function calculated 11,025 bytes. The audio format stores each sample in two bytes, so every valid block must have an even length.
The odd pause shifted the byte pairs after the first sentence. The decoder then read the wrong pairs as sound. Speech became noise.
FFmpeg had reported an invalid one-byte packet during every conversion. The pipeline recorded the warning and continued. Its checks measured loudness without checking whether the audio could be decoded cleanly.
The fix moved pauses into the assembly step. Each sentence is generated separately. The assembler reads the sample rate, creates silence in complete audio frames, and rejects any segment with an incomplete frame. A damaged segment now stops the job.
The original checks were accurate. White noise can have exemplary loudness.
A loudness check answers one question. Audio integrity needs its own checks: decode the finished file, treat decoder warnings as failures, verify that every sample is complete, and inspect a spectrogram when the sound itself is wrong.
The picture took seconds. The green numbers had already taken an afternoon.