I built a small command-line denoiser. The first version removed 20.9 dB of mains hum, which sounds like a strong result. Then I measured it properly and found it was making speech harder to understand — including on files that had no noise at all.
This post is the measurement that changed the design, and the numbers behind it.
The metric that caught it
Most denoiser write-ups report dB. Noise floor down 20 dB, SNR improved 15 dB, and so on. Those numbers are real, but they are easy to win: subtract enough from every time-frequency bin and the noise floor drops beautifully. So does the quiet part of speech.
STOI (Short-Time Objective Intelligibility) scores 0 to 1 on how intelligible the words are. It is sensitive to exactly the damage spectral subtraction causes — the consonants and breath sounds that live in the same bins as the noise. A denoiser that drops the noise floor 20 dB while STOI falls by 0.06 has made the recording worse, and the dB number will never tell you that.
Setup
Four real voice recordings, two male and two female. Six noise conditions. 4-second clips at 16 kHz. Noise mixed synthetically at a stated SNR against the speech RMS. Processed with default settings, scored with pystoi. 24 combinations total.
Results, current version
| Noise condition | ΔSTOI | Noise floor |
|---|---|---|
| Mains hum, 5 dB SNR | +0.0228 | −22.9 dB |
| White noise, 5 dB SNR | +0.0227 | −9.1 dB |
| Fan / air conditioning, 5 dB SNR | +0.0086 | −8.8 dB |
| Hiss, 5 dB SNR | +0.0084 | −8.9 dB |
| Codec artefacts, 15 dB SNR | +0.0050 | −7.7 dB |
| Reverb, 0.6 s | +0.0004 | −5.5 dB |
Averaged over all 24:
Average ΔSTOI +0.0113 Worst case -0.0022 Best case +0.0432 Average noise floor -10.49 dB Deepest -24.46 dB Improved (ΔSTOI > +0.005) 17 of 24 Unchanged (|ΔSTOI| ≤ 0.005) 7 of 24 Worse (ΔSTOI < -0.005) 0 of 24 The version that looked better and was worse
The first build used a 2.0× over-subtraction factor.
On the hum case it removed 20.9 dB — 3 to 6 dB more than the current build. STOI dropped 0.063. The audio sounded muddy, and words were harder to follow.
On clean input it dropped STOI by 0.121. It was actively damaging files that needed nothing done to them.
The current build uses 1.0×. It removes less noise and STOI no longer falls in any of the 24 cases. That trade is the whole design.
What it does not do
Reverb. +0.0004 STOI, −5.5 dB noise floor. Essentially untouched. Reflections are not noise. The tool reports ALREADY_CLEAN or MILD rather than claiming success.
Overlapping speakers. It cannot separate sources and may suppress one of them. Not tested here because a number would be meaningless.
Clipped audio. Not recoverable.
Very low bitrate. Partly reduced at best.
Throughput
i5-14490F, audio held in memory, spectral subtraction then two-pass ffmpeg loudnorm:
| Input | Denoise | Loudnorm | Total | Realtime |
|---|---|---|---|---|
| 12 s | 2.4 s | 0.7 s | 3.1 s | 3.9× |
| 5 min | 7.4 s | 3.5 s | 10.9 s | 27× |
| 30 min | 11.1 s | 32.7 s | 43.8 s | 41× |
Loudness lands at −16.1 LUFS / −1.5 dBTP on the longer files, 0.1 LU off target. Short clips under ~30 s land further out, because loudnorm integrates over a longer window.
Reproducing it
The test script is in the repo under tools/bench24.py and expects four wav files — any speech corpus works. Noise is generated at a measured SNR, mixed against speech RMS, processed, then scored with pystoi.
pip install pystoi The code
One dependency (numpy), no build step. Free for personal use; a one-time licence is required if the output is part of paid work.
- Source and the benchmark script: github.com/gem3match-dev/speech-denoise
- On PyPI: speech-denoise
- Commercial licence, if you are using it for paid work: longjiao5.gumroad.com/l/hyotu
Personal use, study, teaching and hobby projects are free. The code is the same either way — there is no crippled build, no file limit and no watermark. The $9 is only for client work, paid podcasts or anything shipped as part of a job.
If you want to check the claim before paying anything, the benchmark table above is the entire argument. Run tools/bench24.py against your own recordings and see whether those numbers hold on your material.