@audio/denoise 0.8.1 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +359 -153
- package/index.d.ts +2 -0
- package/index.js +1 -0
- package/package.json +14 -13
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Try it in the browser: [Noise remover](https://audiojs.dev/util/denoise/). Runs on this package, nothing is uploaded.
|
|
4
4
|
|
|
5
|
-
Single-pass noise reduction.
|
|
5
|
+
Single-pass noise reduction. 17 specialised methods + an auto-classifier.
|
|
6
6
|
|
|
7
7
|
| | Domain | Targets | Quality | CPU | Best for |
|
|
8
8
|
|---|---|---|---|---|---|
|
|
@@ -14,15 +14,16 @@ Single-pass noise reduction. 13 specialised methods + an auto-classifier.
|
|
|
14
14
|
| [omlsa](#omlsa) | freq | broadband non-stationary | ★★★★ | high | speech in changing noise |
|
|
15
15
|
| [declick](#declick) | time | impulses | ★★★★ | medium | vinyl ticks, edit clicks, mouth clicks |
|
|
16
16
|
| [decrackle](#decrackle) | time | dense impulses | ★★★ | medium | shellac crackle |
|
|
17
|
-
| [declip](#declip) | time + freq | hard clipping | ★★★★ | high | clipped speech and music, rails found by itself |
|
|
17
|
+
| [declip](#declip) | time + freq | hard clipping | ★★★★ | high | clipped speech and music, rails found by itself, also through MP3/AAC |
|
|
18
18
|
| [dewind](#dewind) | freq | wind, LF rumble | ★★★ | medium | wind under a voice, its harmonics kept |
|
|
19
|
-
| [deplosive](#deplosive) | time | LF bursts |
|
|
19
|
+
| [deplosive](#deplosive) | time | LF bursts | ★★★★ | low | mic plosives (p, b) |
|
|
20
20
|
| [deesser](#deesser) | time | sibilance | ★★★★ | low | voice (s, sh) |
|
|
21
|
-
| [debreath](#debreath) | time |
|
|
21
|
+
| [debreath](#debreath) | time | breaths | ★★★★ | low | breaths between phrases |
|
|
22
22
|
| [desilence](#desilence) | time | pauses | ★★★ | low | remove / shorten / trim silence, split by pause |
|
|
23
23
|
| [dereverb](#dereverb) | freq | late reverb | ★★★ | high | speech in a room |
|
|
24
24
|
| [debleed](#debleed) | freq | bleed of a source with its own track | ★★★ | high | click track, amp or co-host in a mic |
|
|
25
25
|
| [dewow](#dewow) | time + freq | pitch drift | ★★★ | medium | disc wow (33⅓ / 45 / 78 rpm) in music; tape by its pilot tone |
|
|
26
|
+
| [desqueak](#desqueak) | time + freq | guitar squeaks, picks, amp noise | ★★★ | medium | finger squeaks on wound strings, harsh picks, amp hiss |
|
|
26
27
|
|
|
27
28
|
For broader DSP needs use [stretch](https://github.com/audiojs/stretch), [shift](https://github.com/audiojs/shift), [pitch](https://github.com/audiojs/pitch), [beat](https://github.com/audiojs/beat).
|
|
28
29
|
|
|
@@ -139,6 +140,8 @@ Per noise, the noisy speech routed to a reducer (VoiceBank+DEMAND's training and
|
|
|
139
140
|
|
|
140
141
|
Material with nothing to remove (tune 586, test 900): 565 and 854 come back untouched (0.4.1: 566, 855). Most of the rest goes to `declick` on VoiceBank's lip smacks (14 and 37 takes, 32–124× out of the error); to `omlsa` (5 and 6): three VoiceBank takes and one narration in each set whose floor reads 8–25 dB under the voice (audio-lena's: 22 dB), a GuitarSet mic take and a VocalSet one 19–25 dB over theirs, two MUSDB18 mixes (`wiener`'s in 0.4.1). Missed: a bed further under the program than `BED_SNR`, where VoiceBank's own clean takes sit (their room 28–41 dB under): DEMAND's bus and office noise holds its power under 63 Hz, so the test set's bus and office takes at 12.5 and 17.5 dB read 26–33 dB in the pauses, as do the training set's car at 15 dB, and the washing machine's drum at 16 Hz leaves almost nothing above; babble and cafeteria that wander more than 3 dB pause to pause; a bed under a dense mix, masked where its power lies. ~10–18 ms per second of sound.
|
|
141
142
|
|
|
143
|
+
Most of the test set's misses are those: bus and office at 12.5 and 17.5 dB go to a reducer in 0–52 % of takes, the rest in 75–100 %. Their noise holds 88 % (bus) and 95 % (office) of its power under 40 Hz (every 3rd test take, noisy less clean); above 63 Hz it lies 26–33 dB under the voice, where VoiceBank's clean takes keep their own room (10th–90th percentile 30–40 dB). On the training material a bar low enough to take them does not pay: over 351 tuning takes (VoiceBank+DEMAND's training set, every 6th utterance clean and noisy, and the speech of `audio`'s `bench/rx/assistant.mjs` tuning split, whose brown and rumble beds sit as low), routing every bed read under T dB to `omlsa` changes PESQ by +40.4 summed at 25 dB, +41.7 at 28, +34.8 at 31, +19.0 at 34 (STOI +0.24, +0.22, +0.03, −0.29): `omlsa` takes a clean take's room 15 dB down and 0.40 of its PESQ. Taking a bed only to 40 dB under the program (ACX's noise floor under its loudness; `threshold` 4) slows the fall, +33.4 at 31 and +27.0 at 34, but never reaches 25 dB's; the pauses' power at 20–63 Hz, 15–20 dB under the voice in the test set's bus and office takes against 28 in its clean ones, is 18 dB or less in 5 % of the training speakers' clean takes. Under the chain's 40 Hz highpass (`@audio/chain`) the bulk of those beds goes anyway.
|
|
144
|
+
|
|
142
145
|
dereverb has no reliable single-pass signature, so auto-mode never selects it — reach it explicitly via `denoise(data, { force: 'dereverb' })` or `dereverb()`.
|
|
143
146
|
|
|
144
147
|
|
|
@@ -146,58 +149,75 @@ dereverb has no reliable single-pass signature, so auto-mode never selects it
|
|
|
146
149
|
|
|
147
150
|
### `dehum`
|
|
148
151
|
|
|
149
|
-
|
|
152
|
+
Follows the mains phase, then subtracts the hum along it: each harmonic of the mains frequency, to 8 kHz where buzz carries it, is estimated as a slowly varying sinusoid and taken out, so what goes with the hum is the program within a fraction of a hertz of each line, and less of it where the program is loud there. Without hum the audio comes back untouched. Notches (0.2.0) took whatever their band held, a band that grows with the harmonic (Q 30: 1.7 Hz at 50 Hz, 33 Hz at 1 kHz), an orchestra's G2 two hertz under the 100 Hz line among it; and as the mains frequency wanders (±0.02–0.2 Hz, h times that at harmonic h) narrow ones miss the upper harmonics.
|
|
150
153
|
|
|
151
154
|
```js
|
|
152
|
-
dehum(data, { fs }) // 50 or 60 Hz,
|
|
153
|
-
dehum(data, { fs, freq: 60 }) // the 60 Hz series, its exact frequency
|
|
155
|
+
dehum(data, { fs }) // 50 or 60 Hz, found; nothing without hum
|
|
156
|
+
dehum(data, { fs, freq: 60 }) // the 60 Hz series, its exact frequency tracked
|
|
154
157
|
dehum(data, { fs, freq: 60, harmonics: 4 }) // remove 60–240 Hz as told
|
|
155
158
|
measure(data, fs) // → { f0, harmonics } or null (import from @audio/denoise-dehum)
|
|
156
159
|
```
|
|
157
160
|
|
|
158
161
|
| Param | Default | |
|
|
159
162
|
|---|---|---|
|
|
160
|
-
| `freq` |
|
|
161
|
-
| `harmonics` | to
|
|
163
|
+
| `freq` | found | Fundamental, Hz. Omitted: the 50 or 60 Hz series, whichever is found. Given: that series, its frequency tracked from there (within ±0.4 %, ±`drift` Hz with `adaptive`) |
|
|
164
|
+
| `harmonics` | to 8 kHz | Remove h = 1…`harmonics` as told. Omitted: every harmonic to 1 kHz and each line above it that stands out, to 8 kHz |
|
|
165
|
+
|
|
166
|
+
Hum is found by `measure()`, one Fourier transform over the signal (its first 80–90 s, taken down to 3 kHz), where a hum line, steady for minutes, gathers into a peak 1/T wide while speech spreads: the fundamental 20 dB over the median of the ±8 Hz around it, or two of the first six harmonics 15 dB, each 6 dB over any other peak within 3 Hz, all harmonics of one fundamental. Under music a line 20 dB under the program is too faint for that, so the band to 1 kHz is also tracked along each series (below) and its lines weighed where the program is quiet around them: hum is there when two or more of the first 20 harmonics stand out by 18 dB, are no more than 60 dB under the signal and stand alone, 6 dB over any other peak within 3 Hz, a third at least of those that stand out (a bar of music repeated exactly is a comb of lines 1/bar apart, lines at 50 and 60 Hz among them, few alone). A faster pattern spaces its teeth past 3 Hz, and where its instrument rings a tooth stands over the next: a kick at 200 bpm repeats every 15 periods of 50 Hz and 18 of 60, a comb every 3.33 Hz with teeth on both series, and in the MUSDB18 preview of Dark Ride's "Burning Bridges" its 50 Hz tooth stands 7 dB over the next one; the take has no pause to hear the line persist in, and 0.5.1 took it for hum (the mix out at 6.0 dB SDR). Neither the line's level nor its neighbours tell such a tooth from hum; the program's comb does, by all its teeth: for each pattern of 1/8 s to 2 s that spans a whole number of mains periods (its comb runs through the series), the share of the positions of its other lines, 40 Hz to 1 kHz, that hold a peak, less the share midway between them, where chance puts as many. The kick scores 0.30 (synthetic kicks 0.44–0.50, two BabySlakh mixes rendered from MIDI at an exact tempo 0.33 and 0.53); the 143 other MUSDB18 previews 0.16 at most, the other 18 BabySlakh mixes 0.20, 200 VocalSet takes, 120 GuitarSet takes, ten readings and five DEMAND noises 0.06. Over a quarter, in a take with no pause, the series is the program's and is left. Through 468 clean takes (MUSDB18's 94 training and 50 test previews, Brahms, Vibe Ace, the Nutcracker and the trumpet whole, 200 VocalSet takes, 120 GuitarSet takes, 30 s each: `node bench/rx/dehum.mjs clean` in `audio`) 0.5.2 changes none; 0.5.1 changed that one. Hum under such a pattern is left too where the take has no pause; with one, its lines and the pattern's within a fraction of a hertz of them go together (59.95 Hz hum 20 dB under the 200 bpm kick after 2 s of room tone: the mix out at 2.0 dB SDR, 0.5.1 alike). A tone held right on a mains line through a take with no pause is taken for hum.
|
|
162
167
|
|
|
163
|
-
The
|
|
168
|
+
The mains phase is tracked first from the harmonics to 1 kHz (each harmonic's phasor per Hann frame four mains cycles long, fitted over 2 s, their turn combined by h²·SNR over 8 s: Hajj-Ahmad, Garg & Wu 2013), then the signal is resampled so that the tracked mains period spans 2^k samples (computed order tracking: Fyfe & Munck 1997). There every harmonic sits on one bin of a 2^k-point transform of each frame however the mains wander, and the phase is refined from the turn between frames of the harmonics, to 16, 64, … 8 kHz, whose lines stand out alone (a partial beside a line turns it with the program), each weighted by its line's power over the program's there and smoothed by Rauch–Tung–Striebel at the likeliest rate of wander and noise scale; a refinement is kept only if it draws the lines tighter (their coherent power grows). Each harmonic's phasors are fitted over 2 s by weighted local-linear least squares (normalized convolution, Knutsson & Westin 1993), each frame weighted by the inverse of the program's power around the line there, so a passing voice or note is bridged from the frames around it rather than averaged in. Under a dense mix there is no frame to bridge from, and a fit over 2 s takes the music near every line, more of it than a faint hum (0.5.0: buzz 30 dB under music came out 7 dB worse than it went in); so the fit is kept within 30 % of the hum bridged through the program: the line's phasors, with any steady tone beside it taken out, followed as a slow random walk by Rauch–Tung–Striebel with the program's power in each frame as its noise, which carries the hum across a loud passage from where it stands alone instead of taking the music in. A line counts only if it persists where the program falls silent, at a tenth of its power elsewhere at least (a note held on a line goes quiet with the music; a held synth note at exactly 50 Hz was taken for hum). The sinusoids are resynthesized period by period, brought back to the original samples (Kaiser-windowed sinc) and subtracted (harmonic subtraction, as power-line interference is taken out of ECG: Levkov et al. 2005).
|
|
164
169
|
|
|
165
|
-
|
|
170
|
+
Where the hum itself jumps (an edit's splice turns its phase, a level step, hum switched on or off), every line's phasors before and after a frame differ beyond their spread at once, a note beside one line moving that line alone: the tracking does not integrate across the jump, each stretch is fitted on its own frames, and the hum switches from one stretch's to the next at the sample that best splits the signal between them. A note within ~0.5 Hz of a line for seconds is taken for hum. Whole clip (`streaming: false`), a second at least to find hum; shorter, it removes the harmonics of a given `freq` as told and passes the audio through without one. About a tenth of real time (0.4.0: a hundredth), most of it in the 2 s fits.
|
|
166
171
|
|
|
167
|
-
Measured by `node scripts/dehum.js
|
|
172
|
+
Measured by `node scripts/dehum.js`, 0.4.0 → 0.5.1 (0.5.2 alike, every cell): the hum (mains: 12 harmonics at −6 dB per octave; buzz: odd-heavy to 8 kHz, odd h at h^−½, even at 0.3·h^−½, rolling off over 3 kHz; levels drifting ±10 %, f0 0.05 Hz off nominal and wandering) and the program told apart by phase inversion (Hagerman & Olofsson 2004). 50 Hz hum 20 dB under the program, wandering ±0.02 Hz; program SDR per band where the band holds 1 % of the program:
|
|
168
173
|
|
|
169
174
|
| material | hum down, dB | program SDR, dB | <100 Hz | 100–300 | 300–1k | 1–4k | >4k |
|
|
170
175
|
|---|---:|---:|---:|---:|---:|---:|---:|
|
|
171
|
-
| speech | 45.5 | 38.5 | 28.9 | 39.2 | 39.2 | 83.0 | – |
|
|
172
|
-
| narration | 43.5 | 42.7 | – | 38.8 | 42.9 | 64.5 | 73.9 |
|
|
173
|
-
| vibeace | no hum found | | | | | | |
|
|
174
|
-
| brahms | 42.2 | 25.7 | 30.2 | 17.9 | 27.0 | 57.8 | 50.2 |
|
|
175
|
-
| nutcracker | 41.6 | 27.6 | 23.5 | 30.7 | 26.8 | 63.6 | – |
|
|
176
|
-
| trumpet | 51.0 | 47.9 | – | – | 42.2 | 82.3 | – |
|
|
176
|
+
| speech | 45.5 → 41.7 | 38.5 → 41.7 | 28.9 → 28.9 | 39.2 → 42.3 | 39.2 → 45.1 | 83.0 → 83.8 | – → – |
|
|
177
|
+
| narration | 43.5 → 38.6 | 42.7 → 46.8 | – → – | 38.8 → 40.0 | 42.9 → 48.1 | 64.5 → 85.9 | 73.9 → 89.0 |
|
|
178
|
+
| vibeace | no hum found → 33.3 | no hum found → 32.6 | no hum found → 32.3 | no hum found → 32.8 | no hum found → 32.4 | no hum found → 74.8 | no hum found → – |
|
|
179
|
+
| brahms | 42.2 → 24.4 | 25.7 → 31.4 | 30.2 → 34.0 | 17.9 → 22.3 | 27.0 → 36.9 | 57.8 → 84.5 | 50.2 → 77.5 |
|
|
180
|
+
| nutcracker | 41.6 → 26.4 | 27.6 → 33.2 | 23.5 → 27.9 | 30.7 → 35.2 | 26.8 → 32.9 | 63.6 → 77.4 | – → – |
|
|
181
|
+
| trumpet | 51.0 → 47.3 | 47.9 → 49.4 | – → – | – → – | 42.2 → 43.6 | 82.3 → 94.8 | – → – |
|
|
177
182
|
|
|
178
183
|
Hum down / program SDR, dB:
|
|
179
184
|
|
|
180
|
-
| material | 60 Hz | 50 Hz, ±0.05 Hz | 50 Hz, 30 dB under |
|
|
181
|
-
|
|
182
|
-
| speech | 46.3 / 42.1 | 36.4 / 38.5 | 38.7 / 38.6 |
|
|
183
|
-
| narration | 43.6 / 44.0 | 33.8 / 42.8 | 42.3 / 42.9 |
|
|
184
|
-
| vibeace | no hum found | no hum found | no hum found |
|
|
185
|
-
| brahms | 41.7 / 29.0 | 27.8 / 25.7 | 33.9 / 25.7 |
|
|
186
|
-
| nutcracker | 40.7 / 24.3 | 33.2 / 27.9 | no hum found |
|
|
187
|
-
| trumpet | 51.9 / 47.8 | 46.0 / 47.7 | 48.4 / 48.0 |
|
|
185
|
+
| material | 60 Hz | 50 Hz, ±0.05 Hz | 50 Hz, 30 dB under | 60 Hz buzz to 8 kHz | 50 Hz buzz, ±0.2 Hz |
|
|
186
|
+
|---|---|---|---|---|---|
|
|
187
|
+
| speech | 46.3 / 42.1 → 45.4 / 44.5 | 36.4 / 38.5 → 35.5 / 41.5 | 38.7 / 38.6 → 35.1 / 43.9 | 6.7 / 42.1 → 28.9 / 36.2 | 5.2 / 37.3 → 7.8 / 36.4 |
|
|
188
|
+
| narration | 43.6 / 44.0 → 39.9 / 45.8 | 33.8 / 42.8 → 36.8 / 46.8 | 42.3 / 42.9 → 31.8 / 50.4 | 6.7 / 43.9 → 26.4 / 40.2 | no hum found → no hum found |
|
|
189
|
+
| vibeace | no hum found → 33.7 / 32.3 | no hum found → 29.0 / 32.5 | no hum found → no hum found | no hum found → 22.1 / 33.8 | no hum found → 3.6 / 26.8 |
|
|
190
|
+
| brahms | 41.7 / 29.0 → 25.1 / 34.0 | 27.8 / 25.7 → 16.1 / 31.5 | 33.9 / 25.7 → 13.2 / 32.9 | 6.5 / 29.0 → 11.8 / 31.9 | 5.0 / 25.7 → 4.3 / 32.9 |
|
|
191
|
+
| nutcracker | 40.7 / 24.3 → 20.4 / 35.0 | 33.2 / 27.9 → 23.1 / 32.9 | no hum found → no hum found | 2.9 / 26.1 → 13.6 / 31.4 | 5.2 / 28.3 → 6.2 / 33.3 |
|
|
192
|
+
| trumpet | 51.9 / 47.8 → 50.5 / 50.2 | 46.0 / 47.7 → 42.0 / 48.9 | 48.4 / 48.0 → 39.9 / 49.0 | 6.1 / 48.0 → 39.0 / 43.9 | 6.2 / 45.8 → 20.6 / 38.2 |
|
|
188
193
|
|
|
189
|
-
An edited take
|
|
194
|
+
An edited take (eight stretches cut out, from a pause to a pause in the speech, anywhere in the music, the hum's phase jumping at each cut), then the hum's level stepping four times among off, −10, −5, 0 and +5 dB; hum down within a second of a cut or step / elsewhere, and the program SDR, dB:
|
|
190
195
|
|
|
191
196
|
| material | within 1 s | elsewhere | program SDR |
|
|
192
197
|
|---|---:|---:|---:|
|
|
193
|
-
| speech | 6.
|
|
194
|
-
| narration | no hum found | | |
|
|
195
|
-
| brahms | 9.
|
|
196
|
-
| nutcracker | 9.7 → 9.
|
|
198
|
+
| speech | 6.5 → 7.7 | 41.1 → 41.2 | 38.3 → 38.7 |
|
|
199
|
+
| narration | no hum found → 24.6 | no hum found → 35.3 | no hum found → 41.9 |
|
|
200
|
+
| brahms | 9.5 → 7.9 | 37.0 → 15.1 | 25.0 → 30.7 |
|
|
201
|
+
| nutcracker | 9.7 → 9.1 | 36.0 → 13.9 | 28.0 → 34.8 |
|
|
197
202
|
|
|
198
|
-
|
|
203
|
+
| material | within 1 s | elsewhere | program SDR |
|
|
204
|
+
|---|---:|---:|---:|
|
|
205
|
+
| speech | 14.7 → 18.9 | 40.9 → 28.8 | 38.4 → 39.8 |
|
|
206
|
+
| narration | 15.0 → 23.6 | 41.0 → 34.7 | 42.5 → 43.7 |
|
|
207
|
+
| brahms | 13.9 → 14.1 | 40.5 → 26.7 | 25.8 → 32.0 |
|
|
208
|
+
| nutcracker | 15.0 → 17.7 | 40.7 → 24.0 | 27.7 → 34.5 |
|
|
199
209
|
|
|
200
|
-
|
|
210
|
+
Hum alone, 30 s, ±0.02 Hz: 56 → 61 dB down; buzz to 8 kHz alone: 6.4 → 62.2. Clean speech, narration and music: no sample changed. Under music 0.5.1 takes less hum than 0.4.0 and far less of the music: Brahms loses 24 dB of its hum, not 42, and keeps 31.4 dB of program SDR, not 25.7, its 100–300 Hz band 22.3, not 17.9; what is left of the hum is 44 dB under the orchestra. Vibe Ace's hum, among the track's own steady lines, is found now (0.4.0 left it): 33 dB down. A generator's ±0.2 Hz wander under a voice is followed by 8 dB only.
|
|
211
|
+
|
|
212
|
+
Against iZotope RX 12 De-hum (2026-10, `node bench/rx/dehum.mjs` in `audio`; RX hosted through Pedalboard, a new instance per render, its Learn on 3 s of the hum alone before each take as its manual has it): 21 test clips (6 VoiceBank speech clips of eight utterances, 4 Spoken Wikipedia readings, Brahms, Vibe Ace, the Nutcracker, the trumpet, 7 MUSDB18 test previews), six conditions (50 Hz mains, 60 Hz buzz to 8 kHz, 50 Hz buzz wandering ±0.2 Hz, level steps, six splices, 60 Hz buzz 30 dB under), RX's knobs chosen on a separate split (VoiceBank training speakers, other readings, MUSDB18 training previews): its best, Dynamic at sensitivity 1 and Q 10000, beat its defaults (sensitivity 5: 18.6 dB mean SDR on the tuning split) and every Static setting (7–12 dB: its notches, 16 harmonics at Q 300–3000, leave an error 3–10 dB under a white program's 40–1000 Hz band). Mean over conditions and materials, hum down / SDR against the clean program / PESQ (speech and readings):
|
|
213
|
+
|
|
214
|
+
| | RX defaults | RX tuned | 0.4.0 | 0.5.2 |
|
|
215
|
+
|---|---:|---:|---:|---:|
|
|
216
|
+
| hum down, dB | 7.7 | 3.2 | 11.8 | 17.7 |
|
|
217
|
+
| SDR, dB | 18.9 | 25.4 | 29.4 | 34.9 |
|
|
218
|
+
| PESQ | 3.06 | 2.80 | 3.27 | 4.01 |
|
|
219
|
+
|
|
220
|
+
RX's learned Dynamic profile acts as a gate: it takes the hum in the room tone 54–60 dB down and leaves it under the speech, where it takes as much of the voice (18.9 dB mean SDR, the input's 22.6). Tuned, it barely touches the take (3 dB of hum), the best SDR it reaches. 0.5.2 (every score as 0.5.1's) is over RX tuned in SDR in all 18 condition × material cells (buzz 30 dB under music: 35.9 against 32.2, input 31.3), and every clip comes out within 0.2 dB of its input SDR or better. Hum as recorded (MIR-1K singing, DEMAND's washing machine and hallway, five readings, a VoiceBank take): RX's select-all Learn takes its lines up to 18 dB down and the program with them (the rest of the spectrum 1.5–20 dB SDR); dehum takes them 0–14 dB down and leaves the rest 21–60 dB. VocalSet's 60 Hz lines, more than 60 dB under the singing and barely over its room tone, are left as they are (0.4.0 took them 0–7 dB down; RX up to 23, the rest of the spectrum 0.2–12.5 dB).
|
|
201
221
|
|
|
202
222
|
**Use when:** mains buzz, ground-loop hum, fixed tonal interference.<br>
|
|
203
223
|
**Not for:** broadband noise (use `wiener`/`omlsa`); shifting tones (use spectral methods).
|
|
@@ -281,68 +301,76 @@ The wind goes under the words too, between and under the harmonics; what a voice
|
|
|
281
301
|
|
|
282
302
|
### `deplosive`
|
|
283
303
|
|
|
284
|
-
|
|
304
|
+
Takes a close-mic `p` or `b` out: a pressure pulse that rises out of nothing under 80 Hz and has no period, where a voice's or a bass note's low end repeats at its pitch. A pop begins when the 3 ms envelope of the band under 80 Hz jumps over 3× its 30 ms average while standing over `triggerRatio`× the band over 120 Hz (a voice's fundamental and up), and holds while that lasts and the low band stays aperiodic: its normalized autocorrelation's peak at a 2.5–25 ms lag (Talkin 1995) under ½, where a harmonic part would lead (Boersma 1993). The voice band is floored 6 dB under its peak over the last seconds: a room's rumble in a pause is no pop, and a pop reaches the voice's level. Removal takes the sound's own part under `crossover` away, x − w·LP(x), LP linear-phase: a pulse through a causal filter leaves the filter's response to its edges behind (with the pops' spans known, a duck to a causal 2nd-order high-pass at 100 Hz takes a median 12 dB of their error, the linear-phase band at 120 Hz 21). LP runs at ~2 kHz (three box sums decimate, a Kaiser-windowed sinc low-passes, linear interpolation returns), and its half-length is the look-ahead: the output is `latency(fs)` samples late (~14 ms, declared to the host), the duck starts 4 ms before where the pop's low band rose and is held to its end. With no pop the output is the input, sample for sample, that late.
|
|
285
305
|
|
|
286
306
|
```js
|
|
287
|
-
deplosive(data, {
|
|
307
|
+
deplosive(data, { fs: 48000 }) // in place, aligned
|
|
308
|
+
let write = deplosive({ fs: 48000 }) // stream: each block back whole, latency(48000) samples late; write() flushes
|
|
288
309
|
```
|
|
289
310
|
|
|
290
311
|
| Param | Default | |
|
|
291
312
|
|---|---|---|
|
|
292
|
-
| `triggerRatio` | `
|
|
293
|
-
| `attenuation` | `-
|
|
294
|
-
| `crossover` | `
|
|
295
|
-
| `attack` | `0.
|
|
313
|
+
| `triggerRatio` | `1` | the band under 80 Hz over the band over 120 Hz that a pop must exceed |
|
|
314
|
+
| `attenuation` | `-40` | dB, how far the band under `crossover` goes in a pop |
|
|
315
|
+
| `crossover` | `120` | Hz, the band a pop is taken from |
|
|
316
|
+
| `attack` | `0.0005` | s |
|
|
296
317
|
| `release` | `0.03` | s |
|
|
297
318
|
|
|
298
|
-
|
|
319
|
+
Against iZotope RX 12 De-plosive, `node bench/rx/deplosive.mjs` in [audio](https://github.com/audiojs/audio) (2026-10): VoiceBank clean speech (2 test speakers, 11.4 min), pops added at stop bursts found on it (Liu 1996's +b landmark), six in ten: a one-sided pressure pulse of 20–80 ms rising in 1–4 ms (as the narrations' own pops do), under 200 Hz, 0.3–2× the speech peak. Every setting chosen on 28 training speakers; RX tuned: sensitivity 1, strength 5, frequency limit 125 Hz (defaults 5, 5, 200). The error to the clean speech taken away over each pop and the 100 ms after it; SNR to the clean speech over the reels with pops; on the speech alone, its voiced frames:
|
|
320
|
+
|
|
321
|
+
| | pops: error taken away, median · 10th pct | with pops: SNR to clean | clean, voiced frames: SNR to input | voiced frames thinned > 3 dB under 250 Hz |
|
|
322
|
+
|---|---:|---:|---:|---:|
|
|
323
|
+
| RX 12 defaults | 21.8 · 11.1 dB | 19.1 dB | 22.8 dB | 4.9 % |
|
|
324
|
+
| RX 12 tuned | 21.9 · 13.4 dB | 22.0 dB | 46.8 dB | 0.0 % |
|
|
325
|
+
| 0.2.0 | 5.8 · 0.8 dB | 9.1 dB | 39.9 dB | 0.1 % |
|
|
326
|
+
| **0.3.0** | **22.5 · 16.3 dB** | **24.6 dB** | **53.4 dB** | **0.0 %** |
|
|
327
|
+
|
|
328
|
+
0.2.0 missed one pop in ten (a pop under a word's level never stood 4× over the band above 200 Hz) and took 6 dB of the rest. `node scripts/lowend.js deplosive` puts clean speech and music through it, then speech with pops (half-sine pressure pulses of 20–60 ms under 150 Hz before each word that follows a pause): VoiceBank+DEMAND test utterances, Spoken Wikipedia narrations, the music `repair` uses, 0.2.0 → 0.3.0; voiced frames thinned: the voiced 10 ms frames whose level under 250 Hz fell by more than 3 dB:
|
|
299
329
|
|
|
300
330
|
| | voiced frames thinned | 20–63 Hz | 63–125 Hz | 125–250 Hz |
|
|
301
331
|
|---|---:|---:|---:|---:|
|
|
302
|
-
| speech, male |
|
|
303
|
-
| speech, female |
|
|
304
|
-
| narrations |
|
|
332
|
+
| speech, male | 0.7% → 0.2% | −0.1 → 0.0 | 0.0 → 0.0 | 0.0 → 0.0 |
|
|
333
|
+
| speech, female | 2.2% → 0.7% | −0.2 → −0.1 | 0.0 → 0.0 | 0.0 → 0.0 |
|
|
334
|
+
| narrations | 0.0% → 0.1% | −0.2 → −0.2 | 0.0 → 0.0 | 0.0 → 0.0 |
|
|
305
335
|
| audio-lena | 0.0% → 0.0% | 0.0 → 0.0 | 0.0 → 0.0 | 0.0 → 0.0 |
|
|
306
|
-
| Vibe Ace (jazz) |
|
|
307
|
-
| Brahms (strings) | 0.
|
|
308
|
-
| Nutcracker |
|
|
336
|
+
| Vibe Ace (jazz) | 0.4% → 1.6% | 0.0 → −0.1 | 0.0 → −0.2 | 0.0 → −0.1 |
|
|
337
|
+
| Brahms (strings) | 0.1% → 0.0% | 0.0 → 0.0 | 0.0 → 0.0 | 0.0 → 0.0 |
|
|
338
|
+
| Nutcracker | 0.1% → 0.1% | 0.0 → 0.0 | 0.0 → 0.0 | 0.0 → 0.0 |
|
|
309
339
|
| trumpet | 0.0% → 0.0% | 0.0 → 0.0 | 0.0 → 0.0 | 0.0 → 0.0 |
|
|
310
|
-
| bass line |
|
|
340
|
+
| bass line | 0.0% → 0.0% | −0.1 → 0.0 | 0.0 → 0.0 | 0.0 → 0.0 |
|
|
311
341
|
|
|
312
342
|
Pops peaking at 0.5, 1 and 2× the utterance's peak, the error to the clean speech taken away over each pop and the 150 ms after it (dB):
|
|
313
343
|
|
|
314
344
|
| | 0.5× | 1× | 2× |
|
|
315
345
|
|---|---:|---:|---:|
|
|
316
|
-
| speech, male | 11.
|
|
317
|
-
| speech, female |
|
|
318
|
-
|
|
319
|
-
0.1.10 often met a pop with its duck already down on the pause's rumble before the word; it now waits for the pop, and takes the first few ms of it a little less.
|
|
346
|
+
| speech, male | 11.0 → 23.3 | 13.2 → 28.1 | 14.5 → 31.3 |
|
|
347
|
+
| speech, female | 12.6 → 25.8 | 14.2 → 30.6 | 15.0 → 33.6 |
|
|
320
348
|
|
|
321
349
|
**Use when:** mic plosives (`p`, `b`, `t`) producing low-frequency thuds.<br>
|
|
322
|
-
**Not for:** a kick drum
|
|
350
|
+
**Not for:** a kick drum: it is a pop to this (a jazz mix loses 3 dB under 250 Hz on 1.6 % of its frames, 0.2.0: 0.4 %); a live path that cannot wait 14 ms.
|
|
323
351
|
|
|
324
352
|
|
|
325
353
|
### `deesser`
|
|
326
354
|
|
|
327
|
-
Sibilance reduction, [`@audio/dynamics-deesser`](https://github.com/audiojs/dynamics)
|
|
355
|
+
Sibilance reduction, [`@audio/dynamics-deesser`](https://github.com/audiojs/dynamics) 0.4 behind this family's seconds-based options (2026-07 near-dupe merge), every setting the kernel's unless given. An 's' is told by its shape, not its level: the band over `split` (3.5 kHz) against the voice body under it, in dB, read 5 ms ahead so the cut is in place as the 's' begins; how far it rises over `threshold` sets the cut, held within `range`. By default (`split`) only that band moves, through a linear-phase split, so nothing under it changes; `mode: 'band'` cuts a bell at `fc`, `'broadband'` the whole sound. Measured against iZotope RX 12 De-ess in the kernel's README: harsh sibilants 12.5 dB of the error gone (RX tuned 12.1).
|
|
328
356
|
|
|
329
357
|
```js
|
|
330
|
-
deesser(data, { fs }) // the kernel's threshold (0 dB) and range (−
|
|
331
|
-
deesser(data, { fs,
|
|
358
|
+
deesser(data, { fs }) // the band over 3.5 kHz, the kernel's threshold (0 dB) and range (−8 dB)
|
|
359
|
+
deesser(data, { fs, mode: 'band', fc: 7500, Q: 1 }) // a bell at 7.5 kHz alone
|
|
332
360
|
```
|
|
333
361
|
|
|
334
362
|
| Param | Default | |
|
|
335
363
|
|---|---|---|
|
|
336
|
-
| `
|
|
337
|
-
| `
|
|
338
|
-
| `
|
|
364
|
+
| `mode` | `'split'` | `'split' \| 'band' \| 'broadband'` |
|
|
365
|
+
| `split` | `3500` | Hz, where split mode's band starts |
|
|
366
|
+
| `fc` | `6500` | Hz, band mode's centre (`freq` still accepted) |
|
|
367
|
+
| `Q` | `1.4` | band mode's width |
|
|
368
|
+
| `threshold` | `0` | dB of the sibilance band over the voice body where the cut starts; not a level |
|
|
369
|
+
| `range` | `-8` | dB, the deepest cut |
|
|
339
370
|
| `ratio` | `4` | Compression ratio above threshold |
|
|
340
|
-
| `attack` | `0.001` | s
|
|
341
|
-
| `release` | `0.
|
|
342
|
-
| `
|
|
343
|
-
| `block` | `64` | Coefficient update interval (samples) |
|
|
344
|
-
|
|
345
|
-
`threshold` was a level, −30 dBFS here; under the kernel's 0.3 it is the band over the body, and −30 cut a ride cymbal 12 dB under a mix by a median 2.7 dB.
|
|
371
|
+
| `attack` | `0.001` | s, how fast the cut engages |
|
|
372
|
+
| `release` | `0.015` | s, how slowly it recovers |
|
|
373
|
+
| `lookahead` | `5` | ms read ahead (the output stays aligned) |
|
|
346
374
|
|
|
347
375
|
**Use when:** voice post-production with hot s/sh; vocal bus de-essing.
|
|
348
376
|
|
|
@@ -407,7 +435,7 @@ The a priori SNR the speech absence is read from is smoothed in the cepstrum (Br
|
|
|
407
435
|
|
|
408
436
|
A held note, a sustained vowel or a chord is not learned as the noise. IMCRA, as minimum statistics, takes whatever holds a bin for about a second as noise: clean music through `omlsa` lost 9.9 % of its time-frequency energy by more than 3 dB, a sung long tone 8.8 %, a synthesized band 22.6 %. @audio/noise-estimate's `partials` reads, each frame, where a partial stands, a peak over the spectrum's morphological floor (the inverse harmonic mask of Nelke, Naylor & Vary, ICASSP 2015) held 0.3 s within ±1 bin and 10 dB over what its bin held while free, and there holds the noise at that memory; elsewhere, and on noise alone, the tracker's estimate is as it was, to the bit. A line steady from the take's start (hum, a fan, an engine) has no free frame and stays noise; one that starts mid-take is held up to 60 s, then learned, as is a note held longer; a note sounding from the first frame is learned until its bin is once free of it. Music cut 9.9 → 3.0 %, sung long tones 8.8 → 0.0 %, Slakh mixes 22.6 → 2.3 %; on the training speech PESQ 1.825 → 1.823, OVRL 2.543 → 2.542, musical noise 0.80 → 0.81 ([Speech](#speech) has the test set). `estimator: { partials: false }` turns it off.
|
|
409
437
|
|
|
410
|
-
A noise that holds still can be learned instead: `profile`, the noise's PSD (`noiseProfile` of a stretch where it plays alone), or, in the batch form, `noiseFrames`/`profileFrom`/`profileTo` naming that stretch. The noise is then held (`known` of @audio/noise-estimate), and p reads the observation: γ averaged over 105.5 Hz and over 543 Hz of the frame, at fixed priors (Gerkmann, Breithaupt & Martin 2008: the averaged γ is χ² with r degrees of freedom from the Hann window's correlation across bins, ξ<sub>fix</sub> the a priori SNR that minimizes false alarms plus misses, eq. 13; at 48 kHz r 5.7 and 24, ξ<sub>fix</sub> 9.4 and 5.1 dB), and 0 where the estimated q reaches 0.9, as before. Until 0.4 it read γ in each bin alone, at ξ<sub>H1</sub> = 15 dB (Gerkmann & Hendriks 2012), and speech 0–5 dB over the noise lost 7.8 dB on the training speech, where the MMSE Wiener gain keeps 3.9. The paper averages over 64 ms of frames as well; presence then outlasted a sound by those frames, and in the half second after music stopped the noise came through in tones (log kurtosis ratio 0.45 at G<sub>min</sub> −12 dB, 1.77 at −20): over the frame alone. On the training speech, G<sub>min</sub> −12 dB: PESQ 1.861 → 1.867, OVRL 2.564 → 2.572, BAK 3.05 → 3.08, musical noise 0.53 → 0.46, speech 0–5 dB over the noise −7.8 → −5.1 dB, the noise taken in pauses 9.7 → 10.1 dB. Steady noise under speech and music goes exactly G<sub>min</sub> down, with no musical noise from −12 to −20 dB (log kurtosis ratio 0.00); in the half second after music stops, 0.
|
|
438
|
+
A noise that holds still can be learned instead: `profile`, the noise's PSD (`noiseProfile` of a stretch where it plays alone), or, in the batch form, `noiseFrames`/`profileFrom`/`profileTo` naming that stretch. The noise is then held (`known` of @audio/noise-estimate), and p reads the observation: γ averaged over 105.5 Hz and over 543 Hz of the frame, at fixed priors (Gerkmann, Breithaupt & Martin 2008: the averaged γ is χ² with r degrees of freedom from the Hann window's correlation across bins, ξ<sub>fix</sub> the a priori SNR that minimizes false alarms plus misses, eq. 13; at 48 kHz r 5.7 and 24, ξ<sub>fix</sub> 9.4 and 5.1 dB), and 0 where the estimated q reaches 0.9, as before. Until 0.4 it read γ in each bin alone, at ξ<sub>H1</sub> = 15 dB (Gerkmann & Hendriks 2012), and speech 0–5 dB over the noise lost 7.8 dB on the training speech, where the MMSE Wiener gain keeps 3.9. The paper averages over 64 ms of frames as well; presence then outlasted a sound by those frames, and in the half second after music stopped the noise came through in tones (log kurtosis ratio 0.45 at G<sub>min</sub> −12 dB, 1.77 at −20): over the frame alone. On the training speech, G<sub>min</sub> −12 dB: PESQ 1.861 → 1.867, OVRL 2.564 → 2.572, BAK 3.05 → 3.08, musical noise 0.53 → 0.46, speech 0–5 dB over the noise −7.8 → −5.1 dB, the noise taken in pauses 9.7 → 10.1 dB. Steady noise under speech and music goes exactly G<sub>min</sub> down, with no musical noise from −12 to −20 dB (log kurtosis ratio 0.00); in the half second after music stops, 0.04 at −12 dB and 0.40 at −20 (0.5: 0.05 and 0.61, 0.3: 0.11 and 1.00; `scripts/broadband.mjs`). Held, the frame is the power of two at or above 32 ms (`frame(fs, true)`; a `profile` without a `frameSize` brings its own, 2(K − 1) for K bins): 2048 at 44.1 kHz as at 48, where the nearest power of two, the tracked frame, left 1024 and 43 Hz bins, half the resolution 48 kHz gets. Nothing is tracked on a held noise, so the frame's length goes to frequency, and a partial under the noise is parted from it. 0.5 → 0.6, music under steady noise at 44.1 kHz (audio's `bench/rx/denoise.mjs`: ten MUSDB18 test mixtures, strings and jazz, under white, pink and two DEMAND noises 10 and 25 dB down, 96 takes): SDR 20.16 → 20.94 dB, noise-to-mask ratio −9.6 → −10.0 dB, music cut by more than 3 dB 2.2 → 1.3 %, above 8 kHz −2.8 → −2.6 dB, musical noise under the music 0.44 → 0.38; VoiceBank training speech at 44.1 kHz, its lead-in learned: PESQ 1.875 → 1.872, STOI 0.830 → 0.835, OVRL 2.549 → 2.574. Tracking, the shorter frame stays: 2048 at 44.1 kHz cost that speech PESQ 0.053 and BAK 0.08. Tracking the noise from the print (Gerkmann & Hendriks 2012's MMSE tracker started on it, RX's "adaptive") lost OVRL 0.04 and left musical noise (0.40 on pink): the print is held. `processor(opts)` is the gain as an @audio/stft frame process, for a host running its own frames: audio's `denoise` op learns a print from a range and runs it so.
|
|
411
439
|
|
|
412
440
|
```js
|
|
413
441
|
omlsa(data, { fs })
|
|
@@ -422,12 +450,15 @@ omlsa(data, { fs, profileFrom: 0, profileTo: fs / 2, gMin: -12 }) // the noise
|
|
|
422
450
|
| `xiMin` | `10^−2.5` | A priori SNR floor (−25 dB) |
|
|
423
451
|
| `qPrior` | estimated | A fixed a priori speech absence instead of the estimate |
|
|
424
452
|
| `qFrom` | `'cts'` | The a priori SNR the speech absence is read from: smoothed in the cepstrum, or `'dd'`, decision-directed (Cohen's `omlsa.m`) |
|
|
425
|
-
| `frameSize` | power of two nearest 32 ms
|
|
453
|
+
| `frameSize` | by the rate | Tracking, the power of two nearest 32 ms: 512 at 16 and 22.05 kHz, 1024 at 44.1, 2048 at 48 (`frame(fs)`); on a held noise, at or above 32 ms: 512 at 16 kHz, 1024 at 22.05, 2048 at 44.1 and 48 (`frame(fs, true)`) |
|
|
426
454
|
| `hopSize` | `frameSize/4` | |
|
|
427
455
|
| `profile` | tracked | A known noise PSD (`frameSize/2+1` bins), held |
|
|
456
|
+
| `threshold` | `0` | dB: the noise read that much louder (RX's Threshold), a held profile raised, the tracked estimate's β multiplied: more of what is quiet counts as noise |
|
|
428
457
|
| `estimator` | | IMCRA options (@audio/noise-estimate `imcra`); `{ partials: false }`: held notes learned as noise, as before 0.5 |
|
|
429
458
|
| `noiseFrames` / `profileFrom` / `profileTo` | | A noise-only stretch to learn the profile from (batch) |
|
|
430
459
|
|
|
460
|
+
Against iZotope RX 12's Voice De-noise and Spectral De-noise on the same speech, narrations and music: [Speech](#speech).
|
|
461
|
+
|
|
431
462
|
**Use when:** speech in non-stationary noise (street, café, car); generally the highest-quality choice for noisy speech. A steady noise with a stretch of it alone (hiss, hum, a fan, room tone): learn it, `profile`.
|
|
432
463
|
|
|
433
464
|
|
|
@@ -435,7 +466,7 @@ omlsa(data, { fs, profileFrom: 0, profileTo: fs / 2, gMin: -12 }) // the noise
|
|
|
435
466
|
|
|
436
467
|
### `declick`
|
|
437
468
|
|
|
438
|
-
Finds each click as an outlier of the AR prediction error,
|
|
469
|
+
Finds each click as an outlier of the AR prediction error, finds how far it reaches and whether it rings on, and rebuilds the sound under it. The error is judged against its own median level over ±12 ms, so a click can't raise the bar it must clear; the model is fitted again with the outliers left out, since a loud click otherwise teaches it its own ringing. A click spans where the error stays over 3× that level after its onset; one with a like half its size 2.5–15 ms away is a glottal pulse or a plucked string, and is left alone. Each click is then judged under a finer model, AR(256) of the 46 ms either side: as a gap from its start over every length up to its end, or up to the end of another click within 6 ms (a dropout's two edges), every length's error from one Levinson-Durbin pass since the gaps nest; and as a damped resonance struck at its onset, which is what a stylus's tick and a scratch's pop are (Godsill & Rayner 1998, ch. 7), with a gap over the onset or over its first sample alone. Kept: the one that explains the sound at least cost, each gap sample at its marginal likelihood's cost under a Gaussian click of the onset's size (ch. 9), so a loud click's gap is dear and a resonance that explains its ring wins; no resonance that would take off more than the recording holds; and nothing at all where the sound's own excitation explains it better, an innovation outlier rather than an added one (Chang, Tiao & Chen 1988): a plosive's burst, a note's attack. The gap is rebuilt by least-squares AR(512) interpolation over 46 ms either side ([`lpc`](https://github.com/audiojs/denoise/tree/main/packages/lpc)'s `arBridge`, Janssen 1986), then as the sound's posterior mean under the click as Gaussian noise of its own envelope and spectrum (AR(4) of what least squares took off, refined by EM, Godsill & Rayner §5.3 with the click coloured): under a mouth click the voice is kept where the click is weak, in time and in frequency. Samples no click reaches come back bit-exact.
|
|
439
470
|
|
|
440
471
|
```js
|
|
441
472
|
declick(data, { fs: 44100 }) // everywhere
|
|
@@ -450,16 +481,32 @@ declick(data, { fs: 44100, regions: [{ at: 12.31, duration: 0.02 }] }) // the cl
|
|
|
450
481
|
| `regions` | — | `[{ at, duration }]`, s: look only there, and take nothing there for a pulse or too long |
|
|
451
482
|
| `fs` | `44100` | sample rate, Hz |
|
|
452
483
|
|
|
453
|
-
`node scripts/declick.js` adds clicks to speech (audio-lena) and music (
|
|
484
|
+
`node scripts/declick.js` adds clicks to speech (audio-lena) and music ("Vibe Ace", Brahms, the trumpet, as `repair`), one every 0.25–0.45 s at 2, 5 and 15× the sound's RMS around it, and measures how much of each click's error is gone (median dB, from 1 ms before the click to 20 ms after it, so a repair's own ringing counts), the share gone by 10 dB or more, and FFmpeg `adeclick` at its defaults after ·:
|
|
454
485
|
|
|
455
486
|
| click | 2× | 5× | 15× |
|
|
456
487
|
|---|---:|---:|---:|
|
|
457
|
-
| tick (rings at 2–8 kHz, 0.05–0.3 ms) |
|
|
458
|
-
| pop (300–1500 Hz, 0.3–1 ms) |
|
|
459
|
-
| glitch (1–8 samples off) |
|
|
460
|
-
|
|
|
488
|
+
| tick (rings at 2–8 kHz, 0.05–0.3 ms) | 26.9 dB · 93% · 8.0 | 33.8 dB · 100% · 8.0 | 41.0 dB · 100% · 9.8 |
|
|
489
|
+
| pop (300–1500 Hz, 0.3–1 ms) | 19.2 dB · 71% · 0.4 | 28.6 dB · 99% · 0.6 | 34.5 dB · 100% · 0.3 |
|
|
490
|
+
| glitch (1–8 samples off) | 41.6 dB · 100% · 19.8 | 45.5 dB · 100% · 24.8 | 56.7 dB · 100% · 29.2 |
|
|
491
|
+
| spike (a jump decaying over 1–3 samples, cut off after 4–8) | 28.3 dB · 96% · 22.3 | 37.9 dB · 100% · 24.4 | 50.6 dB · 99% · 33.1 |
|
|
492
|
+
| mouth (1–3 ms of noise) | 23.2 dB · 99% · 4.4 | 27.8 dB · 100% · 11.0 | 32.8 dB · 100% · 15.7 |
|
|
493
|
+
| dropout (0.02–1 ms gone to zero) | 13.8 dB · 56% · 0.2 | | |
|
|
494
|
+
|
|
495
|
+
0.3.0 (a gap over the onset ±0.1 ms or over all of the error's span, nothing between; the click under it white), measured the same way: ticks 23.9, 31.0 and 39.5 dB; pops 18.5, 27.1, 34.5; glitches 29.2, 37.9, 48.7; spikes 21.3, 24.2, 41.3; mouth clicks 20.4, 24.5, 31.4; dropouts 7.1. 0.2.0 (a gap as far as the AR(32) error showed the click, least squares; over the click and 1 ms either side): ticks 13.4, 17.5 and 25.4 dB; pops 5.7, 12.9, 18.2; glitches 15.5, 20.5, 29.4; mouth clicks 9.3, 17.8, 25.6. The clean material through it: untouched (0.3.0 changed 112 samples of "Vibe Ace", to −62 dB; 0.1.7 2295, 123 and 2283 of the speech, Brahms and the trumpet); `adeclick` changes 7 116–22 978 samples of each, to −27 to −49 dB. Each click's surroundings (3–20 ms either side) given as `regions`: the same within 1.3 dB; regions over the clean material change nothing. Tuned on other material (VoiceBank+DEMAND training takes, two other narrations, other parts of "Vibe Ace" and Brahms, the Nutcracker). Clicked sound takes 1.25× 0.3.0's time, run side by side (10 s with three clicks a second), clean sound as long.
|
|
496
|
+
|
|
497
|
+
Against iZotope RX 12 Advanced, De-click and Mouth De-click (VST3 hosted by Pedalboard; [`audio`](https://github.com/audiojs/audio)'s `bench/rx/declick.mjs`, October 2026), through `audio`'s `declick()`, on other takes: 12 s of VoiceBank+DEMAND's clean test utterances, two Spoken Wikipedia narrations, "Vibe Ace" and Brahms (5–15 s) and the trumpet. RX at its defaults, and at its best per kind on separate takes (VoiceBank+DEMAND training utterances, two other narrations, other passages, the Nutcracker) from algorithm × sensitivity × click widening, Mouth De-click from sensitivity, then frequency skew. Median dB gone as above, speech at 2 / 5 / 15× · music:
|
|
498
|
+
|
|
499
|
+
| click | RX, defaults | RX, best on other takes | `declick` 0.3.0 | `declick` |
|
|
500
|
+
|---|---|---|---|---|
|
|
501
|
+
| tick | 7.2 / 14.6 / 20.2 · 10.3 / 13.3 / 19.2 | 11.7 / 14.8 / 18.6 · 13.9 / 16.2 / 19.1 (Multi-band random, 3) | 20.5 / 28.8 / 34.7 · 26.0 / 30.0 / 40.3 | 23.1 / 31.4 / 37.6 · 28.1 / 32.7 / 41.2 |
|
|
502
|
+
| pop | 0.0 / 1.0 / 3.8 · 0.0 / 2.4 / 5.5 | 5.0 / 8.9 / 15.5 · 6.8 / 12.9 / 19.0 (Multi-band random, 7) | 12.9 / 25.5 / 35.5 · 16.8 / 24.6 / 34.3 | 13.8 / 26.6 / 37.4 · 18.4 / 26.4 / 35.5 |
|
|
503
|
+
| glitch | 10.9 / 15.7 / 30.0 · 10.9 / 20.2 / 27.2 | 11.1 / 17.1 / 30.1 · 9.9 / 20.4 / 28.3 (Single-band, 1.5) | 21.8 / 33.3 / 44.4 · 30.3 / 40.1 / 49.1 | 30.8 / 40.5 / 51.9 · 37.8 / 45.8 / 56.6 |
|
|
504
|
+
| spike | 10.0 / 13.3 / 25.7 · 7.7 / 17.2 / 27.1 | 11.3 / 15.1 / 26.1 · 9.7 / 17.8 / 27.1 (Single-band, 1.5) | 17.0 / 21.2 / 28.4 · 21.6 / 31.9 / 38.9 | 22.8 / 30.1 / 42.7 · 27.0 / 39.0 / 46.5 |
|
|
505
|
+
| dropout | 0.0 · 0.0 | 1.3 · 4.2 (Multi-band random, 7) | 3.0 · 7.9 | 6.3 · 15.4 |
|
|
506
|
+
| mouth, speech at 1 / 2 / 5× | Mouth De-click 9.6 / 16.0 / 20.5 | 11.0 / 16.7 / 21.2 (sensitivity 4, skew 5) | 13.5 / 16.4 / 21.8 | 13.4 / 18.1 / 23.6 |
|
|
507
|
+
|
|
508
|
+
The share of mouth clicks gone by 10 dB or more: 65, 83 and 92%, Mouth De-click's 45, 78 and 83% at its defaults, 53, 82 and 87% at its best. Do no harm: on the clicked takes, the error left outside the clicks' spans is 35–43 dB under the sound, RX's 22–29 dB at its defaults and 21–37 at its best. The clean takes through each (samples moved over 2⁻¹⁵ · error under the sound): `declick` VoiceBank 0.5% · −38 dB, the narrations 0.03% · −43 and 0.3% · −43, the music untouched (0.3.0: 0.7% · −36, 0.2% · −36, 1.1% · −27, "Vibe Ace" −62); RX De-click at its defaults 1.1% · −28, 0.1% · −40, 0.3% · −29, the music 0.009–1.9%, the trumpet to −13; Mouth De-click 5.1% · −34, 0.4% · −44, 5.1% · −26 (at its best 5.0% · −35, 0.4% · −45, 5.0% · −27); Single-band at sensitivity 1.5, RX's least, 0.3% · −38, 0.03% · −45, 0.06% · −42, the trumpet to −28. On four real narrations (30 s each, with their own mouth clicks), `declick` changes 27.5 places a minute (0.3.0: 49.5), Mouth De-click 75 and De-click 81; RX De-click changes 65% of `declick`'s places too. Each click selected, 3–20 ms either side (`declick({ at, duration })` a click): ticks 22.5 / 30.1 / 37.4 · 28.1 / 32.7 / 41.2 dB, glitches 30.0 / 36.8 / 50.2 · 37.0 / 45.8 / 55.9, mouth clicks 13.3 / 17.7 / 23.6, within 3.7 dB of the whole take and over RX's on the whole take in every condition.
|
|
461
509
|
|
|
462
|
-
0.2.0 (a gap as far as the AR(32) error showed the click, least squares): ticks 13.4, 17.5 and 25.4 dB; pops 5.7, 12.9, 18.2; glitches 15.5, 20.5, 29.4; mouth clicks 9.3, 17.8, 25.6. Pops rebuilt at their true span by least squares under AR(512) reach 9.5, 18.0 and 27.8: the resonance taken off beats the best gap by 7–9 dB. 0.1.7 (AR(60) on its own window, σ including the click, 2 samples either side): ticks 5–6 dB, pops 0, mouth clicks 4–6 dB. The clean material through it: speech, Brahms and the trumpet untouched (0.1.7 changed 2295, 123 and 2283 samples, the trumpet to −19 dB), "Vibe Ace" 112 samples at −62 dB (0.2.0: −42 dB); `adeclick` changes 7 116–22 978 samples of each, to −27 to −49 dB. Each click's surroundings (3–20 ms either side) given as `regions`: the same within 0.4 dB; regions over the clean material change nothing. Tuned on other material (two narrations, VoiceBank+DEMAND training takes, other parts of "Vibe Ace" and Brahms, the Nutcracker, two other VocalSet singers). Clicked sound takes 1–2× 0.2.0's time (10 s with three clicks a second in 0.3–0.7 s), clean sound as long.
|
|
463
510
|
|
|
464
511
|
**Use when:** vinyl ticks, edit clicks, digital glitches, mouth clicks on a voice; a click seen on a spectrogram, given as a region.<br>
|
|
465
512
|
**Not for:** dense crackle (use `decrackle`); long dropouts (use `repair`).
|
|
@@ -489,19 +536,31 @@ decrackle(data, { fs: 44100 })
|
|
|
489
536
|
|
|
490
537
|
`decrackle` does better than `adeclick` in all 54 cases, by 0.3–18.6 dB; the sung vibrato, where 0.2.0 trailed in 8 (loud crackle at 50/s: 24.2 · 29.1), now leads in all 9 (30.7 · 29.1). 0.2.0 (the rebuild alone, no soft samples): 44.2, 38.3 and 30.2 dB small; 36.4, 29.6, 20.8 medium; 29.2, 21.8, 12.0 loud; the soft samples gain up to 6.5 dB (0.2–6.5 in 51 of the 54 cases, none in one) and lose 3.3 and 1.3 dB on the trumpet with small crackle at 50 and 200/s. The clean sound through it: audio-lena 0.05% of the samples changed, to −73 dB; VoiceBank 2.2%, −41 dB; the music 0.07–1.1%, −49 to −70 dB; the song 0.3%, −60 dB (`adeclick`: 1.9–8.5%, −26 to −47 dB). The soft samples move more of them, each by less: 0.2.0 changed 0.01–0.22%, to −41 to −74 dB ("Vibe Ace" −64, now −49). Tuned on other material (two narrations, VoiceBank+DEMAND training takes, other parts of "Vibe Ace" and Brahms, the Nutcracker, two other VocalSet singers): there 0.2.0 trailed `adeclick` in 23 of 72 cases, now in none. 0.1.7 (2.5 × its window's MAD, 30 Gauss-Seidel sweeps of the fill) made small crackle worse than it found it (38.7 → 21.9 dB at 50/s, the trumpet to 5.6) and changed 3.7–10% of the clean samples (the trumpet to −5.5 dB, speech to −21 dB). 1–1.6× 0.2.0's time, run side by side (the most at 1000/s).
|
|
491
538
|
|
|
539
|
+
Against iZotope RX 12 Advanced De-crackle (VST3 hosted by Pedalboard; [`audio`](https://github.com/audiojs/audio)'s `bench/rx/decrackle.mjs`, October 2026), through `audio`'s `decrackle()` on other takes (12 s of VoiceBank+DEMAND's clean test utterances, two Spoken Wikipedia narrations, "Vibe Ace" and Brahms 5–15 s, the trumpet), the same crackle: RX at its defaults (quality Low, strength 5) and at its best for each size on separate takes (quality × strength, then amplitude skew): small Medium, 3; medium High, 9.5; loud Medium, 9.5, skew 5. SDR out, dB, speech at 50 / 200 / 1000 a second · music:
|
|
540
|
+
|
|
541
|
+
| crackle | in | RX, defaults | RX, best for the size | `decrackle` |
|
|
542
|
+
|---|---|---|---|---|
|
|
543
|
+
| small | 38.7 / 32.9 / 26.0 · 38.9 / 32.8 / 25.7 | 30.7 / 29.5 / 25.6 · 40.5 / 35.0 / 27.1 | 38.1 / 33.2 / 26.2 · 40.7 / 34.1 / 26.2 | 42.3 / 38.6 / 31.7 · 45.3 / 39.5 / 32.1 |
|
|
544
|
+
| medium | 27.1 / 20.9 / 14.0 · 26.7 / 20.8 / 13.7 | 28.1 / 24.0 / 16.2 · 31.2 / 25.1 / 15.9 | 22.6 / 21.0 / 17.7 · 31.3 / 26.1 / 18.9 | 38.4 / 33.1 / 24.0 · 39.3 / 33.5 / 24.2 |
|
|
545
|
+
| loud | 14.8 / 8.9 / 1.9 · 14.8 / 8.6 / 1.7 | 22.1 / 15.9 / 5.4 · 22.4 / 15.0 / 4.8 | 19.4 / 15.5 / 10.1 · 22.7 / 17.2 / 11.4 | 32.1 / 25.5 / 16.7 · 32.7 / 25.4 / 16.2 |
|
|
546
|
+
|
|
547
|
+
RX at its defaults makes small crackle on speech worse (38.7 → 30.7 dB at 50 a second). The clean takes through each (samples moved over 2⁻¹⁵ · error under the sound): `decrackle` 0.07–2.3% · −37 to −66 dB; RX at its defaults 3.7–48% · −25 to −52; at its best for medium and loud crackle 4–75% · −15 to −59; at its best for small crackle, its gentlest, 0.3–10.3% · −36 to −67, more samples than `decrackle` on five of the six takes but less error on four (VoiceBank −46 against −42, the narrations −51 against −50, "Vibe Ace" −58 against −50, the trumpet −67 against −49): what `decrackle` takes for crackle in clean sound it softens 0.6 ms around, each sample moved further.
|
|
548
|
+
|
|
492
549
|
**Use when:** shellac / 78 RPM crackle; a worn LP's surface noise; dense small ticks under music or speech.<br>
|
|
493
550
|
**Not for:** loud isolated clicks and pops (use `declick`); long dropouts (use `repair`).
|
|
494
551
|
|
|
495
552
|
|
|
496
553
|
### `declip`
|
|
497
554
|
|
|
498
|
-
Finds where a sound was cut
|
|
555
|
+
Finds where a sound was cut and rebuilds what the cut took off. A hard clip piles every sample it cuts onto one level, its rail. Each side's rail is the sound's extreme there, taken when the samples within 0.1 % of it outnumber those in the next 0.1 % below tenfold and most of them sit in runs: the top-bin test of FFmpeg's `adeclip` (1000 bins, ratio 10), made relative to the rail so it holds at any level (and never finer than one step of a 16- or 24-bit grid), and per side, so one rail or two different ones are found. A loud peak is one sample; a limiter's ceiling is touched by single samples or by arches, and a sine's top is an arch, which fill the band below about as densely.
|
|
556
|
+
|
|
557
|
+
Lossy coding (MP3, AAC, Opus) leaves no flat top: it spreads the rail into a band, the coder's noise around the level the runs were cut at, a mode of the amplitude density with mass on both sides of it. A waveform's own peaks, a sine's top, a limiter's ceiling, only approach a level from below. So, where no side has a flat rail, each side's band is its highest mode standing 4 times over the density 2–6 % of the extreme below it (at 1, 2 and 4 times that scale, for coarser coders), with samples over it reaching 3 of its spreads σ (the RMS of the samples over the mode) and beyond; the sound is cut again 6σ under the mode and rebuilt as a clip there (κ = 6 chosen on VoiceBank and MUSDB18 training material through LAME at 128 kbit/s: 0.6 dB over 4 on average, speech +0.9, music −0.1; 5 and 8 within 0.2 on speech). Sound with no rail and no band comes back bit-exact: none of VoiceBank+DEMAND's 1328 clean utterances, MUSDB18's 144 mixtures, the survey's ten SQAM excerpts or sines from 50 Hz to 5 kHz shows one.
|
|
499
558
|
|
|
500
|
-
Every sample at a rail is then rebuilt
|
|
559
|
+
Every sample at a rail is then rebuilt three times, each rebuild held at least as far out as the sample was recorded (a clip only ever lowers a sample). AR: per window of 186 ms, AR(256) fitted under its taper, every unknown solved at once by exact least squares ([`lpc`](https://github.com/audiojs/denoise/tree/main/packages/lpc)'s `arFill`), refitted and solved again until the fill moves by under 1 %, at most 8 times (Janssen, Veldhuis & Vries 1986). Sparse: A-SPADE (Kitić, Bertin & Gribonval 2015) as the declipping survey's code runs it (Záviška, Rajmic, Ozerov & Rencker 2021), the fewest DFT lines that agree with what was recorded, per block of 93 ms and per block of 186 ms: the long block resolves a held note's partials (a held chord clipped to 1 dB, half a second: 11.6 → 14.2 dB), the short one follows speech and attacks. No one of the three wins everywhere, so they are blended, region by region, by weights chosen by cross-validation (Stone 1974; stacked regressions, Breiman 1996): the clipped sound is clipped once more, at the level that takes as large a share of what the first clip left as the first took of the whole; each method rebuilds that; the weights, on a grid of tenths over the three, are those whose blend lies nearest what is known there (the samples the second clip hid, and the bounds of those the first took), read per 93 ms over ±1 s. A blend of consistent rebuilds is consistent; each rebuild runs only where its weight is not 0. Samples off the rails come back bit-exact; a sound over 30 s is rebuilt in pieces crossfaded over 2 s.
|
|
501
560
|
|
|
502
561
|
```js
|
|
503
|
-
declip(data, { fs: 44100 }) // each side's rail found; none: untouched
|
|
504
|
-
declip(data, { fs: 44100, clipLevel: 0.95 }) // a known rail, ±0.95
|
|
562
|
+
declip(data, { fs: 44100 }) // each side's rail (or band) found; none: untouched
|
|
563
|
+
declip(data, { fs: 44100, clipLevel: 0.95 }) // a known rail, ±0.95; soft saturation: the level to cut at
|
|
505
564
|
```
|
|
506
565
|
|
|
507
566
|
| Param | Default | |
|
|
@@ -514,36 +573,56 @@ declip(data, { fs: 44100, clipLevel: 0.95 }) // a known rail,
|
|
|
514
573
|
|
|
515
574
|
| input SDR | 1 dB | 3 dB | 7 dB | 10 dB | 15 dB | 20 dB |
|
|
516
575
|
|---|---:|---:|---:|---:|---:|---:|
|
|
517
|
-
| speech | 8.
|
|
518
|
-
| "Vibe Ace" |
|
|
519
|
-
| Brahms |
|
|
520
|
-
| trumpet | 6.
|
|
521
|
-
|
|
522
|
-
0.
|
|
523
|
-
|
|
524
|
-
| input SDR | 1 dB | 3 dB | 5 dB | 7 dB | 10 dB | 15 dB | 20 dB | mean |
|
|
525
|
-
|
|
526
|
-
| declip |
|
|
527
|
-
|
|
|
528
|
-
|
|
|
529
|
-
|
|
|
530
|
-
|
|
|
531
|
-
|
|
|
532
|
-
|
|
|
576
|
+
| speech | 8.5 · 1.1 | 10.9 · 5.0 | 24.1 · 12.1 | 31.7 · 16.9 | 38.2 · 24.0 | 42.8 · 30.5 |
|
|
577
|
+
| "Vibe Ace" | 8.4 · 1.6 | 13.8 · 5.0 | 19.7 · 10.3 | 24.4 · 14.0 | 31.4 · 19.9 | 36.3 · 24.6 |
|
|
578
|
+
| Brahms | 7.2 · 0.6 | 13.4 · 3.9 | 19.3 · 10.2 | 23.1 · 14.4 | 29.2 · 19.8 | 35.9 · 23.8 |
|
|
579
|
+
| trumpet | 6.6 · 1.3 | 16.7 · 4.1 | 31.4 · 10.4 | 42.8 · 14.8 | 46.2 · 21.4 | 59.7 · 25.0 |
|
|
580
|
+
|
|
581
|
+
0.3.0 (the AR rebuild and the 93 ms sparse one), 1–20 dB: speech 8.4 / 10.9 / 24.2 / 31.9 / 38.3 / 42.6, "Vibe Ace" 6.9 / 13.1 / 19.1 / 22.7 / 31.4 / 36.2, Brahms 6.9 / 12.7 / 18.9 / 22.8 / 29.2 / 35.8, the trumpet 6.1 / 16.8 / 31.4 / 44.7 / 46.5 / 60.3: the long blocks gain up to 1.7 dB on the music, the trumpet at 10 dB loses 1.9. On the survey's own test, its ten SQAM excerpts (solo instruments and an ensemble, 44.1 kHz) clipped by its `clip_sdr.m`, mean ΔSDR over the clipped samples, dB, and PEAQ's ODG (Kabal's implementation as the survey ran it, ported in [audio](https://github.com/audiojs/audio)'s `bench/rx/peaq.py`: the survey's grades of its clipped inputs to within 0.0015), beside the means it publishes for its leading methods (code and results: [declipping2020_codes](https://github.com/rajmic/declipping2020_codes); PEAQ with the reliable samples replaced, as declip keeps them):
|
|
582
|
+
|
|
583
|
+
| input SDR | 1 dB | 3 dB | 5 dB | 7 dB | 10 dB | 15 dB | 20 dB | mean ΔSDR | mean ODG |
|
|
584
|
+
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
|
585
|
+
| declip | 9.7 | 14.0 | 15.6 | 16.7 | 18.5 | 20.5 | 22.1 | 16.7 | −1.84 |
|
|
586
|
+
| declip 0.3.0 | 8.3 | 13.2 | 14.8 | 15.8 | 17.6 | 19.7 | 21.9 | 15.9 | −1.95 |
|
|
587
|
+
| social sparsity, PEW (Siedenburg, Kowalski & Dörfler 2014) | 12.2 | 15.0 | 16.6 | 17.7 | 19.0 | 21.2 | 22.2 | 17.7 | −1.60 |
|
|
588
|
+
| A-SPADE | 11.9 | 13.9 | 15.1 | 16.0 | 17.3 | 19.4 | 20.3 | 16.3 | −2.40 |
|
|
589
|
+
| S-SPADE | 11.4 | 13.7 | 15.0 | 15.6 | 17.1 | 19.3 | 19.9 | 16.0 | −2.59 |
|
|
590
|
+
| ℓ1, parabola-weighted | 9.9 | 13.0 | 14.8 | 16.0 | 17.4 | 19.6 | 21.0 | 16.0 | −1.66 |
|
|
591
|
+
| NMF (Bilen, Ozerov & Pérez 2018) | 5.1 | 12.2 | 14.3 | 16.2 | 18.0 | 20.6 | 22.0 | 15.5 | −1.46 |
|
|
592
|
+
| Janssen (AR) | −0.9 | −1.3 | 0.6 | 3.5 | 7.9 | 17.0 | 19.6 | 6.6 | −2.28 |
|
|
593
|
+
| iZotope RX 12 De-clip, tuned (below) | 0.8 | 5.4 | 8.2 | 9.7 | 11.5 | 14.0 | 15.8 | 9.4 | −2.26 |
|
|
594
|
+
|
|
595
|
+
On the mean ΔSDR 2nd of the 7 (0.3.0: 5th), 1.0 dB behind social sparsity; from 3 dB up ahead of both SPADEs and ℓ1 at every level, of NMF but at 15 dB (0.1), behind social sparsity by 0.15–1.05 dB; at 1 dB behind A-SPADE by 2.2 and social sparsity by 2.5. On ODG 4th, behind NMF, social sparsity and ℓ1 by 0.18–0.38, at 3–7 dB by up to 0.7. The blend misjudges some held tones: the clarinet clipped to 15 dB comes back 17.1 dB, its 186 ms sparse rebuild alone 22.1 (the second clip scores a fill's overshoot inside the first clip's runs as nothing, only its bound being known there). On VoiceBank speech (below) it is 0.3.0 within 0.1 dB at every level.
|
|
596
|
+
|
|
597
|
+
Against iZotope RX 12 Advanced De-clip (VST3 hosted by Pedalboard, output aligned to the input; [audio](https://github.com/audiojs/audio)'s `bench/rx/declip.mjs`, 2026-10), through `audio`'s `declip()`. Test: the ten SQAM excerpts; "other music", four MUSDB18 test mixtures and "Vibe Ace", Brahms, the trumpet and the Sugar Plum Fairy (6 s each); speech, 16 VoiceBank clean test utterances. Each clipped at the level leaving it 1–20 dB from the original and scaled so its rails sit at 0 dBFS; asym: the positive rail at the 15 dB level, the negative at the 7 dB level; down: the 7 dB clip turned down 6 dB; MP3: the 7 dB clip through LAME at 128 kbit/s; soft: tanh(g·x), g giving 10 dB (analog saturation, no rail). RX at its defaults (threshold −1.02 dBFS, quality Low, post-limiter on), and tuned per condition and kind on other material (four MUSDB18 training mixtures, ten VoiceBank training utterances): asymmetric thresholds at each side's peak plus an offset (−0.07 to −6 dB) × quality, post-limiter off; its best: −0.07 dB on flat rails (High; Low or Medium on some speech conditions), High at −2 dB on MP3, −2 (music) and −4 (speech) on soft. Mean ΔSDR, dB, RX default · RX tuned · declip:
|
|
598
|
+
|
|
599
|
+
| condition | SQAM | other music | speech |
|
|
600
|
+
|---|---:|---:|---:|
|
|
601
|
+
| 1 dB | −0.8 · 0.8 · 9.7 | −0.8 · −0.6 · 6.2 | −0.8 · −0.4 · 5.8 |
|
|
602
|
+
| 3 dB | −1.4 · 5.4 · 14.0 | −1.6 · 1.5 · 10.4 | −1.5 · 2.3 · 8.7 |
|
|
603
|
+
| 5 dB | −1.9 · 8.2 · 15.6 | −2.2 · 3.5 · 12.0 | −2.1 · 4.7 · 10.0 |
|
|
604
|
+
| 7 dB | −2.4 · 9.7 · 16.7 | −2.6 · 4.8 · 12.8 | −2.6 · 7.0 · 10.5 |
|
|
605
|
+
| 10 dB | −3.2 · 11.5 · 18.5 | −3.2 · 6.3 · 14.5 | −3.5 · 8.2 · 10.1 |
|
|
606
|
+
| 15 dB | −4.3 · 14.0 · 20.5 | −3.9 · 8.3 · 14.5 | −4.8 · 10.7 · 12.2 |
|
|
607
|
+
| 20 dB | −5.1 · 15.8 · 22.1 | −4.4 · 9.4 · 15.6 | −5.9 · 11.4 · 13.0 |
|
|
608
|
+
| asym | −1.4 · 12.0 · 18.4 | −0.9 · 6.4 · 14.2 | −2.1 · 10.5 · 12.0 |
|
|
609
|
+
| down | 0.0 · 9.7 · 16.7 | 0.0 · 4.8 · 12.8 | 0.0 · 6.8 · 10.5 |
|
|
610
|
+
| MP3 | −2.0 · 7.1 · 11.7 | −2.2 · 3.5 · 9.2 | −2.2 · 5.2 · 9.5 |
|
|
611
|
+
| soft | −0.8 · 0.6 · 0.0 (level given: 1.6) | −0.7 · 0.2 · 0.0 (2.0) | −1.0 · 2.2 · 0.0 (5.1) |
|
|
533
612
|
|
|
534
|
-
|
|
613
|
+
Perceptually the same order: PEAQ ODG on the music, PESQ (wideband, 16 kHz) on speech, input · RX tuned · declip: 7 dB, SQAM −3.75 · −2.44 · −1.74, other music −3.65 · −2.72 · −1.85, speech 2.10 · 3.42 · 3.85; 20 dB −2.35 · −0.39 · −0.18, −1.29 · −0.23 · −0.12, 3.69 · 4.50 · 4.56; MP3 −3.49 · −3.27 · −2.78, −3.60 · −3.21 · −2.77, 2.10 · 3.05 · 3.74; soft, the level given, −2.86 · −2.84 · −2.75, −2.51 · −2.40 · −2.21, 3.12 · 3.41 · 3.85. RX at its defaults takes SDR off everywhere: its post-limiter holds the restored peaks to 0 dBFS, and its threshold finds nothing on rails under −1 dBFS (down). On the unclipped recordings peak-normalized to 0 dBFS, and through a lookahead limiter 12 dB over a −0.2 dBFS ceiling, declip changes no sample; RX changes them (SDR to its input, median: defaults 59–68 dB, 43–49 limited; tuned 77–94, 58–74). Soft saturation is the one condition where RX gains something by itself: declip finds no rail there and returns it untouched (0.0); given the level RX's tuned threshold sits at, `declip({ clipLevel })` gains more than RX on every set.
|
|
535
614
|
|
|
536
|
-
Rails are found at the 20 dB level clipped asymmetrically (with the 10 dB level below), on one side only, then turned down to 0.4, quantized to 16 bits plain or dithered, and on a 16-bit converter driven 2.5 dB over (rails at 32767 and −32768): 13 dB or more of SDR gained in each. The unclipped material through it, as it is, peak-normalized, at 16 bits and through a lookahead limiter 12 dB over its ceiling: not a sample changed; nor in any of VoiceBank+DEMAND's 824 clean test utterances.
|
|
615
|
+
Rails are found at the 20 dB level clipped asymmetrically (with the 10 dB level below), on one side only, then turned down to 0.4, quantized to 16 bits plain or dithered, and on a 16-bit converter driven 2.5 dB over (rails at 32767 and −32768): 13 dB or more of SDR gained in each; through MP3 and AAC at 128 kbit/s, bands: speech 18.0 → 25.2 and 19.9 → 31.6, "Vibe Ace" 18.3 → 25.1 and 19.8 → 28.7, Brahms 18.2 → 24.8 and 19.6 → 28.0, the trumpet 18.1 → 24.9 and 19.3 → 26.9 dB (0.3.0: untouched). The unclipped material through it, as it is, peak-normalized, at 16 bits and through a lookahead limiter 12 dB over its ceiling: not a sample changed; nor in any of VoiceBank+DEMAND's 824 clean test utterances. The third rebuild costs time: 1.2–2.1× 0.3.0's side by side (0.3.0: about 7 s per second of sound averaged over the six levels, most of it at 1–3 dB), the AR rebuild's early stop giving some back (speech clipped to 3 dB: 0.8×).
|
|
537
616
|
|
|
538
|
-
**Use when:** digital clipping: a converter overdriven, a mix bounced too hot, a plug-in's hard clip; at any level, on either side or both.<br>
|
|
539
|
-
**Not for:**
|
|
617
|
+
**Use when:** digital clipping: a converter overdriven, a mix bounced too hot, a plug-in's hard clip; at any level, on either side or both; also after it went through MP3, AAC or Opus.<br>
|
|
618
|
+
**Not for:** soft saturation, tape or tube, which has no rail: pass the level it bends at as `clipLevel`; clipping that has since been resampled or heavily filtered.
|
|
540
619
|
|
|
541
620
|
|
|
542
621
|
## Reverb
|
|
543
622
|
|
|
544
623
|
### `dereverb`
|
|
545
624
|
|
|
546
|
-
Late reverberation off a voice, one microphone, the whole take at once. First weighted prediction error, WPE (Nakatani et al. 2010): in each STFT bin, what the frames from 43 to 150 ms back predict of the current one (at 48 kHz: from the first frame that shares no sample with it) is the room's tail, and is subtracted; the prediction is fitted over the whole take, each frame weighted by its inverse power, three times. The room is one for the take and the voice is not, so the fit learns the room. One microphone cannot invert a room, and the prediction cancels a dB or two of the tail. The rest is taken in power, as Lebart et al. (2001) and Habets (2010) model the late reverberation: from the power of the frames before, here weighed by the shape of WPE's taps, the room's decay in that bin. Its scale is read off the take itself: where only the tail sounds, the power over its expectation is exponential, and a tenth of such cells fall under 0.105 of it, while the voice's cells lie above; so the 10th percentile of the power over the weighed past, per octave band, divided by 0.105, is the late reverberation's share. It reads a 3 s clip and a minute-long take alike (0.3 scaled the taps' own power, which on 3 s predicted about all the late power and on 30 s a quarter). A log-spectral-amplitude gain (Ephraim & Malah 1985) takes that power off what WPE left, floored at −14 dB, and no bin leaves louder than it came.
|
|
625
|
+
Late reverberation off a voice, one microphone, the whole take at once. First weighted prediction error, WPE (Nakatani et al. 2010): in each STFT bin, what the frames from 43 to 150 ms back predict of the current one (at 48 kHz: from the first frame that shares no sample with it) is the room's tail, and is subtracted; the prediction is fitted over the whole take, each frame weighted by its inverse power, three times. The room is one for the take and the voice is not, so the fit learns the room. One microphone cannot invert a room, and the prediction cancels a dB or two of the tail. The rest is taken in power, as Lebart et al. (2001) and Habets (2010) model the late reverberation: from the power of the frames before, here weighed by the shape of WPE's taps, the room's decay in that bin. Its scale is read off the take itself: where only the tail sounds, the power over its expectation is exponential, and a tenth of such cells fall under 0.105 of it, while the voice's cells lie above; so the 10th percentile of the power over the weighed past, per octave band, divided by 0.105, is the late reverberation's share. It reads a 3 s clip and a minute-long take alike (0.3 scaled the taps' own power, which on 3 s predicted about all the late power and on 30 s a quarter). A log-spectral-amplitude gain (Ephraim & Malah 1985) takes that power off what WPE left, floored at −14 dB, and no bin leaves louder than it came. Three checks on the whole take come first, and any returns it bit for bit: dry, when its fastest falls are faster than a room's tail lets a sound fall (90 % of dry VoiceBank takes); no diffuse tail, when its lowest cells do not fall as a room's tail does: a diffuse tail's power is exponential, its 2nd percentile 7.2 dB under its 10th (ln 0.98 / ln 0.9), while a dry sound's own decays, a voice's closures, a muted string, part them further (the training rooms 7.0–8.1 dB apart, dry VoiceBank 8.6–17.7, GuitarSet 8.3–12.6; over 9, the take passes); no pauses, when under half of its frames are under half its mean power (Scheirer & Slaney 1997): there a held note's sustain reads as a room's. A bin cut to digital silence (an edit, a gate) is left out of the fit, and the frames that reach into such a cut, or past the take's end, out of the checks and the scale: their fall is the cut's. About 0.1 s per second of 48 kHz sound (a 41 s take: 4.7 s, 0.3 4.0 s).
|
|
547
626
|
|
|
548
627
|
```js
|
|
549
628
|
dereverb(data, { fs: 48000 })
|
|
@@ -554,36 +633,44 @@ dereverb(data, { fs: 48000, strength: 0.5 }) // a lighter hand
|
|
|
554
633
|
|---|---|---|
|
|
555
634
|
| `strength` | `1` | Scale of the late-reverberation estimate (1: as the take's own decays read it): 0 is the linear prediction alone, 2 takes more of the tail and more of the voice |
|
|
556
635
|
|
|
557
|
-
Measured (`
|
|
636
|
+
Measured against iZotope RX 12 Advanced De-reverb (VST3 hosted by Pedalboard; [`audio`](https://github.com/audiojs/audio)'s `bench/rx/dereverb.mjs`, October 2026), through `audio`'s `dereverb()`, on the takes of `scripts/dereverb.py` (test set): 42 VoiceBank test utterances (1.6–5.9 s) and four 41–60 s takes of ten utterances by one speaker, in 19 MIT IR Survey rooms the tuning never heard (T60 0.38–1.85 s), each room's response split at direct + 50 ms: under it, the voice as the room colours it; over it, the tail to take. Voice lost: the output's power where the voice is 10 dB over the tail; tail taken: where the tail is 10 dB over the voice. PESQ against the dry take, DNSMOS OVRL at the input's loudness; noisy: the same takes with DEMAND noise 10 dB under them; dry: their dry takes, the share returned bit for bit and PESQ. RX at its defaults (reduction 10 dB, tail length 1 s, artifact smoothing 9, band strengths 6); after its Learn on each take (it learns a tail length and four band strengths); and at its best on reverberant VoiceBank training utterances by PESQ, searched over reduction, tail length, smoothing, the band strengths, enhance dry signal and Learn (tail length 0.5 s, band strengths 8, 4, 6, 4, the rest at defaults). RX Dialogue Isolate, a trained separator, with its reverb gain at −∞ and its noise kept, for reference:
|
|
558
637
|
|
|
559
|
-
| | voice lost dB | tail taken dB | PESQ |
|
|
560
|
-
|
|
561
|
-
|
|
|
562
|
-
|
|
|
563
|
-
|
|
|
564
|
-
|
|
|
565
|
-
|
|
|
566
|
-
|
|
|
638
|
+
| | short: voice lost, tail taken dB | PESQ | OVRL | long: voice lost, tail taken dB | PESQ | OVRL | noisy: PESQ | OVRL | dry: untouched, PESQ |
|
|
639
|
+
|---|---|---|---|---|---|---|---|---|---|
|
|
640
|
+
| takes in | | 1.39 | 2.19 | | 1.37 | 2.01 | 1.26 | 1.66 | 4.64 |
|
|
641
|
+
| RX De-reverb, defaults | −0.01, −1.1 | 1.45 | 2.36 | −0.02, −0.8 | 1.43 | 2.16 | 1.28 | 1.80 | 0, 4.07 |
|
|
642
|
+
| RX De-reverb, learned | −0.77, −3.1 | 1.47 | 2.35 | −1.07, −4.6 | 1.51 | 2.28 | 1.29 | 1.89 | 0, 4.30 |
|
|
643
|
+
| RX De-reverb, tuned | −0.18, −2.3 | 1.45 | 2.32 | −0.16, −1.5 | 1.43 | 2.09 | 1.27 | 1.75 | 0, 4.17 |
|
|
644
|
+
| RX Dialogue Isolate, reverb off | −3.18, −8.3 | **1.79** | **2.70** | −4.29, −6.2 | **1.77** | **2.57** | 1.34 | **2.18** | 0, 4.64 |
|
|
645
|
+
| `dereverb` 0.4 → 0.5 | −0.79, −6.3 | 1.53 | 2.49 | −0.61, −6.6 | 1.54 | 2.52 | **1.35** | 2.08 | 96 → **100 %**, 4.63 → **4.64** |
|
|
567
646
|
|
|
568
|
-
`
|
|
647
|
+
Take by take, `dereverb` over RX De-reverb tuned: PESQ +0.08 ± 0.02 (short), +0.10 ± 0.05 (long), +0.08 ± 0.02 (noisy), OVRL +0.17 ± 0.09, +0.43 ± 0.43, +0.33 ± 0.12 (95 % intervals); over its Learn, PESQ +0.06 ± 0.03, +0.02 ± 0.06, +0.06 ± 0.02. At the voice its Learn loses (−0.8 dB on the short takes) it takes 3.2 dB more of the tail; tuned, RX keeps more of the voice (−0.2 dB) and takes a third of the tail. On reverberant VoiceBank in 130 rooms (`vbreverb`, 206 test utterances; `audio`'s `bench/speech.mjs`): PESQ 2.33 in, RX defaults 2.42, tuned 2.46, `dereverb` 0.4 2.62, 0.5 2.61 (over RX tuned +0.14 ± 0.02), OVRL 2.82, 2.86, 2.87, 2.94, 2.94; the dry takes through it: RX 4.09 and 4.17, `dereverb` 4.63 → 4.64, untouched 94 → 100 %. On the training utterances RX's best setting gained PESQ 0.07 (2.42 → 2.49; on the half searched 2.37 → 2.44), its Learn 0.04 (2.37 → 2.41).
|
|
569
648
|
|
|
570
|
-
|
|
649
|
+
Where the rest lies: on the training rooms the take with its late part gone exactly scores PESQ 2.03 (short) and 2.12 (long), the ideal ratio mask (each cell's true voice and tail power) 1.98 and 2.11, `dereverb` 1.72 and 1.81. Its gain fed each cell's true late power, in place of the estimate, reaches 1.73 and 1.80 (1.75 and 1.83 at a −20 dB floor): the late power is estimated as well as it can be used. The floor (−10, −14, −20 dB), a Wiener gain for the LSA, the decision-directed memory (0.7–0.95) and the strength (0.7–1.5) all moved PESQ by under 0.02. What is missing is the voice's own power in each cell, which no model of the room gives and a trained model learns: RX Dialogue Isolate scores 0.26 over `dereverb` on the short takes, taking 3.2–4.3 dB of the voice's first 50 ms with the tail.
|
|
571
650
|
|
|
572
|
-
|
|
573
|
-
|---|---|---|
|
|
574
|
-
| VocalSet spoken, 20 | 0 → 85 % | −0.64 → −0.21 dB |
|
|
575
|
-
| VocalSet sung straight tones, 20 | 0 → 70 % | −1.38 → −0.92 dB |
|
|
576
|
-
| MUSDB18 previews, 25 | 0 → 76 % | −3.73 → −0.24 dB |
|
|
577
|
-
| GuitarSet, 20 | 0 → 75 % | −2.37 → −0.77 dB |
|
|
578
|
-
| Brahms, the Nutcracker, a trumpet | 0 → 100 % | −5.53 → 0 dB |
|
|
579
|
-
| Vibe Ace | 0 → 0 % | −4.26 → −3.68 dB |
|
|
651
|
+
Through it as it is, music at 44.1 kHz (untouched: the share returned bit for bit; level change per octave, the worst of 63 Hz–8 kHz; with pauses: the same music cut into 2–4 s phrases, 0.5–1.5 s apart, over a noise floor 50 dB under it; in a room: through the test rooms, music lost and tail taken as for the voice):
|
|
580
652
|
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
653
|
+
| | RX defaults | RX learned | RX tuned | `dereverb` 0.4 → 0.5 |
|
|
654
|
+
|---|---|---|---|---|
|
|
655
|
+
| MUSDB18 previews (25) | −0.32 dB | −5.66 | −1.27 | 80 → **92 %**, −0.47 → **−0.15** |
|
|
656
|
+
| … with pauses | −0.58 | −1.44 | −1.91 | 76 → **100 %**, −0.35 → **0** |
|
|
657
|
+
| GuitarSet (20) | −0.81 | −0.24 | −1.03 | 75 → **100 %**, −0.77 → **0** |
|
|
658
|
+
| … with pauses | −1.67 | −0.27 | −2.50 | 95 → **100 %**, 0 |
|
|
659
|
+
| VocalSet sung straight tones (10) | −0.34 | −2.29 | −0.14 | 70 → **100 %**, −0.65 → **0** |
|
|
660
|
+
| … with pauses | −0.59 | −0.25 | −2.68 | 100 %, 0 |
|
|
661
|
+
| Brahms, the Nutcracker, a trumpet, Vibe Ace | −0.53 | −5.58 | −1.74 | 50 %, −3.07 |
|
|
662
|
+
| … with pauses | −0.84 | −0.74 | −2.02 | 50 → **100 %**, −2.16 → **0** |
|
|
663
|
+
| in a room, music lost, tail taken dB: MUSDB18 | 0.0, −0.6 | −3.5, −8.6 | −0.3, −3.0 | −0.5, −0.1 |
|
|
664
|
+
| GuitarSet | −0.2, 0.0 | −0.4, −2.8 | −0.4, −0.7 | −1.6, −1.5 |
|
|
665
|
+
| the four pieces | −0.2, −0.4 | −3.0, −7.1 | −0.3, −2.5 | −1.1, −10.1 |
|
|
666
|
+
| VocalSet sung | +0.1, −0.2 | −1.3, −3.0 | +0.1, −0.1 | −2.9, −7.8 |
|
|
667
|
+
|
|
668
|
+
In a room the music's lowest cells are the room's tail, so it is processed, and the late power the past carries over-reads a held note: in steady state the estimate is the scale times the note itself, while a room with a strong direct sound adds less (Lebart's model over-estimates as the direct-to-reverberant ratio grows; Habets, IEEE SPL 16(9), 2009). The constants were chosen on `scripts/dereverb.py train` (training speakers in the even-numbered rooms), the 9 dB on those takes, the dry training takes and the even-numbered MUSDB18 previews, other GuitarSet takes and VocalSet singers; it passes 13 % of the reverberant VoiceBank training utterances that 0.4 processed (rooms with little tail, where the voice's own falls outnumber the tail's), which cost PESQ 0.03 there and 0.01 on the test set.
|
|
669
|
+
|
|
670
|
+
0.2 fitted the prediction recursively, over its last second, and learned some of the voice as room. 0.3 scaled the taps' power by a constant, so its estimate grew as the take shortened: on 3 s it took 2–3 dB more than on a minute, and a dry voice came out at PESQ 4.25. Late-reverb subtraction at each room's measured T60 (Lebart; Habets's κ, the T60 an oracle's) scored under the taps' shape scaled by the percentile (short training takes: PESQ 1.64 against 1.71), and an exponential decay at the measured T60 in place of the taps' shape scored the same. Refitting WPE on the gain's output (its weights from the voice estimate, as DNN-WPE takes them) changed nothing. Sparing a spectral peak that holds over 43 ms (a held partial) cost 1.5–2 dB of the tail; peaks held 0.3 s (as noise-estimate's partials guard holds them) hold in a long room's reverberant speech as in music (up to 95 % of the energy). Pitch steadiness, power steadiness over three frames and 4 Hz modulation overlapped between speech in a room and music. 0.4 judged a take dry on its fastest fall alone, and passed music only when it had no pauses: GuitarSet, sung tones and music with pauses were processed.
|
|
584
671
|
|
|
585
672
|
**Use when:** a voice in a room, one microphone, one room per take.<br>
|
|
586
|
-
**Not for:** music
|
|
673
|
+
**Not for:** music recorded in a room, or produced with reverb, is processed, and a held note loses 0.5–3 dB with the room (the four pieces −3.1 dB in their worst octave). Noise: denoise first.
|
|
587
674
|
|
|
588
675
|
|
|
589
676
|
## Bleed
|
|
@@ -696,6 +783,87 @@ Clean, every clip comes back bit-exact: 25 tuning and 19 held-out clips, the 504
|
|
|
696
783
|
**Not for:** random tape wow read from the music alone (left as it is); a solo voice or instrument without a tone to read; dropouts; azimuth/time-skew.
|
|
697
784
|
|
|
698
785
|
|
|
786
|
+
## Guitar
|
|
787
|
+
|
|
788
|
+
### `desqueak`
|
|
789
|
+
|
|
790
|
+
Guitar de-noise: string squeaks taken down where a finger slides on a wound string, the notes left as they ring; a pick's harsh attack softened, the amp's hiss and buzz taken down, on request.
|
|
791
|
+
|
|
792
|
+
```js
|
|
793
|
+
import { desqueak } from '@audio/denoise'
|
|
794
|
+
```
|
|
795
|
+
|
|
796
|
+
Three parts, as iZotope RX's Guitar De-noise has; squeak on by default, pick and amp when given a level. Where a part finds nothing, the take comes back sample for sample (the amp part, once on, reworks the whole take).
|
|
797
|
+
|
|
798
|
+
**Squeak.** A fingertip sliding along a wound string strikes each winding it crosses: a pulse train at v/d, the slide's speed over the winding's pitch, so a comb of harmonics that rises and falls with the hand's move, an RMS that grows with the speed, and static lines at the string's longitudinal modes (Pakarinen, Penttinen & Bank, JASA 122(6), EL197–EL202, 2007). It is told from the guitar by what a note is not. A note's partials hold their bins: harmonic in Driedger, Müller & Disch's split (ISMIR 2014), a cell's median over ±100 ms 6 dB over its median over ±350 Hz, read on frames four times as long as the squeak's (93 ms at 44.1 kHz, 10.8 Hz bins), where a bass note's partials 82 Hz apart stand apart and a sweeping comb smears; on the short frames they merged into what read as noise, and the cut took a bass note's upper partials. A squeak lifts the part of 1–10 kHz that is not harmonic and none of the harmonic part, so their ratio, which a note keeps as it decays, rises: a squeak's frames have it 14 dB or more over the least it reaches in the 200 ms before and in the 200 ms after, 70 % or more of the band not harmonic, 10 dB or more over the band's quiet. A note's start is not a squeak: three or more third-octave bands from 80 to 560 Hz staying 6 dB up for 30 ms, to within 15 dB of their loud frames (a pluck's click and low partials; a squeak's comb passes through a band and stays far under a note), or partials arriving that hold 50 ms (a chord struck again raises its own ringing partials 4.5 dB; a squeak's comb moves on, and its longitudinal lines are a few, where a chord brings 16 bins or more over 1 kHz). A region with a note starting in its first half is that note's attack. A squeak is a contact held while the hand moves, so a region stands 45 ms or more, its 1–10 kHz energy spread over 15 ms or more and never jumping 16 dB within a millisecond (a click rises at once, a squeak with the hand's speed): on the tuning takes real squeaks ran 46–134 ms, and the pick's touch before a pluck, which the other cues let through, 12–35 ms. A slow slide holds its comb still for tens of ms at a time, steps that read as partials even on short frames (a held note's partial and a still step are the same to any test of a cell; what differs is that the step is there only inside the squeak): a shorter run is widened over the band's rise, up to 30 ms either way, and kept if it is a comb, its 1–8 kHz spectrum peaky (spectral flatness 0.1 or under: real squeaks 0.063 on the tuning takes, the plucks, strums and touches 0.179). In a region every bin over 300 Hz goes down to what it holds just outside the region (the lesser side's mean over 4 frames), `squeak` dB at most; a harmonic cell is left, but in a comb's region cut to 6 dB over the greater side, which a note ringing through, starting or stopping keeps and a slide's still step does not; on 23 ms frames (1024 at 44.1 and 48 kHz); the edit is confined to the region with 2 ms edges, as the take is rebuilt as x − m·ISTFT((1 − G)·X), so everything else stays sample for sample.
|
|
799
|
+
|
|
800
|
+
**Pick.** A pluck's click: a 2–10 kHz millisecond 9 dB or more over the quietest 4 ms of the 40 ms before it (a strum's strings click one after another, each over the last), the loudest within 20 ms. Its attack, from 2 ms before to `attack` after (10 ms), is taken down on 5.8 ms frames, each bin over 1.5 kHz to the level the note holds 15–35 ms on, `pick` dB at most: the click goes, the partials that ring on stay.
|
|
801
|
+
|
|
802
|
+
**Amp.** OM-LSA (`@audio/denoise-omlsa`, the held-noise form: Gerkmann, Breithaupt & Martin 2008) on a print read from the take's quietest frames: those within 1 dB of its 1st-percentile frame (the amp alone before the playing, where the take has that, else the gaps), split in time into four groups, per bin their mean, or where the groups' means spread over 6 dB (a note rang into some), the least group's ×1.5. A spectral peak 10 dB or more over the print keeps its level, with its main lobe: a note ringing on is peaks well over the noise, where hiss peaks so high in one bin in 22 000 and a buzz's line sits at the print. OM-LSA alone took the last chord of a take, 22 dB over the hiss, 6 dB down.
|
|
803
|
+
|
|
804
|
+
```js
|
|
805
|
+
desqueak(data, { fs: 44100 }) // squeaks, up to 30 dB down
|
|
806
|
+
desqueak(data, { fs: 44100, pick: -9, amp: -20 }) // and harsh picks, and the amp's hiss and buzz
|
|
807
|
+
desqueak(data, { fs: 44100, squeak: 0, amp: -20 }) // the amp's noise alone
|
|
808
|
+
```
|
|
809
|
+
|
|
810
|
+
| Param | Default | |
|
|
811
|
+
|---|---|---|
|
|
812
|
+
| `squeak` | `-30` | dB, the most a squeak goes down; `0` leaves squeaks |
|
|
813
|
+
| `pick` | `0` | dB, the most a pick's attack goes down; `0` off; `-9` restores attacks made 6–12 dB harsher |
|
|
814
|
+
| `attack` | `0.01` | s, the pick's attack taken, from 2 ms before its click |
|
|
815
|
+
| `amp` | `0` | dB, how far the amp's hiss, hum and buzz go down; `0` off; `-20` typical |
|
|
816
|
+
|
|
817
|
+
The whole take is read at once (streaming: false); about 20× real time at 44.1 kHz on one core.
|
|
818
|
+
|
|
819
|
+
Measured against iZotope RX 12 Guitar De-noise (`node bench/rx/guitar.mjs test` in [audio](https://github.com/audiojs/audio), 2026-10): GuitarSet's mic takes (Xi et al., ISMIR 2018, CC BY 4.0), a solo acoustic guitar; every setting, ours and RX's, chosen on players 00–02 (30 takes), test on players 03–05 (30 takes, 12.1 min). RX through its plugin, at its defaults (Squeak on, sensitivity 3, reduction 4) and each part tuned by SNR on the tuning takes, the others bypassed. The takes hold squeaks of their own, so harm is read on the notes: per annotated note, its partials up to 10 kHz where they stand 10 dB clear, in its first 40 ms (attack) and after (sustain), the share changed by over 1 dB.
|
|
820
|
+
|
|
821
|
+
Squeaks synthesized from their physics and added to the takes (290 on test): a pulse per winding crossed (0.16–0.44 mm, the wrap wire of a light phosphor-bronze set), the hand's speed rising and falling as a minimum-jerk move (Flash & Hogan 1985) to 0.15–1.5 m/s over 40–300 ms, a resonator on the firing rate and the string's longitudinal modes (1.4–2.0 kHz) as Pakarinen, Välimäki & Puputti's slide guitar model has it (NIME 2008), ending 5–40 ms before a position shift's note or anywhere, peaking 10–30 dB under the take's loud frames. The error to the clean take gone over each squeak, pooled and median; its own time-frequency cells; SNR to the take (the input's 25.2 dB); on the clean takes, the samples moved and the notes' partials moved:
|
|
822
|
+
|
|
823
|
+
| | squeak gone, pooled · median (dB) | its cells (dB) | SNR (dB) | elsewhere (dB under) | clean: samples moved | attacks · sustains moved, over 1 kHz | under 1 kHz |
|
|
824
|
+
|---|---:|---:|---:|---:|---:|---:|---:|
|
|
825
|
+
| RX 12, defaults (= tuned) | 2.7 · 2.8 | 4.3 | 20.5 | 21.2 | 12.9 % | 1.4 % · 3.2 % | 0.1 % · 0.1 % |
|
|
826
|
+
| `desqueak()` | 3.3 · 2.6 | 4.9 | 23.2 | 24.4 | 2.4 % | 2.2 % · 2.8 % | 0.1 % · 0.0 % |
|
|
827
|
+
|
|
828
|
+
Squeaks as recorded: where RX's squeak detector and ours (0.1.0) both mark something on the takes, looked at on spectrograms; a squeak where a sweep shows (an arch, a stacked comb), not where a pluck, a strum or a click shows with partials after it. Per event, its 1–10 kHz energy taken, median and the share taken by 3 dB or more (squeaks) or by 1 dB or more (not squeaks):
|
|
829
|
+
|
|
830
|
+
| | tune: squeaks (14) | not (58) | test: squeaks (35) | not (47) |
|
|
831
|
+
|---|---:|---:|---:|---:|
|
|
832
|
+
| RX 12, defaults | 9.8 | 2.9 | 13.5 · 94 % | 3.7 · 96 % |
|
|
833
|
+
| `desqueak()` 0.1.0 | 10.9 | 0.0 | 9.0 · 74 % | 4.4 · 51 % |
|
|
834
|
+
| `desqueak()` | 11.1 | 0.0 | 12.8 · 86 % | 4.4 · 51 % |
|
|
835
|
+
|
|
836
|
+
0.1.0 took nothing from six of the test's 35 and under 3 dB from three more: slow slides (70–150 ms) whose comb holds still for tens of ms at a time, so their non-harmonic run fell under 45 ms and their still steps, read as partials, were spared (03_SS1 solo at 0.94 s: 100 ms, RX 25.6 dB, 0.1.0 0.0). 0.2.0 widens such a run over the band's rise and keeps it if a comb, and cuts a still step that exists only inside the squeak; the plucks and touches keep their row. RX still takes 0.7 dB more at the median, and five of the 35 lose under 3 dB to ours (a 23 ms one stays under the minimum). Ours touches half the plucks and clicks RX touches nearly all of, a little deeper where it does (4.4 against 3.7 dB median). Partials tried as tracks instead (peaks held within ±1 bin for 120 ms on 46 ms frames, or within 6 dB) read a slow slide's still steps, and the noise around them, as partials too, and missed the squeaks they were for (test 0.1 dB taken).
|
|
837
|
+
|
|
838
|
+
Picks made harsh: each attack's 2–10 kHz raised 6–12 dB over its first 10 ms (2224 on test), the take as played the target; the boost's error gone, pooled and median; the band left over the take's own; SNR (the input's 17.1 dB); on the clean takes, the notes' partials moved:
|
|
839
|
+
|
|
840
|
+
| | harshness gone, pooled · median (dB) | 2–10 kHz left (dB) | SNR (dB) | elsewhere (dB under) | clean: attacks under 1 kHz · sustains over · under |
|
|
841
|
+
|---|---:|---:|---:|---:|---:|
|
|
842
|
+
| RX 12, Pick on at its defaults | 1.6 · 1.3 | 5.1 | 16.9 | 20.1 | 3.2 % · 6.2 % · 0.9 % |
|
|
843
|
+
| RX 12, Pick tuned (sensitivity 2, attack 0.1, reduction 5) | 3.3 · 0.7 | 6.3 | 19.3 | 24.6 | 0.8 % · 2.3 % · 0.1 % |
|
|
844
|
+
| `desqueak({ squeak: 0, pick: -9 })` | 8.9 · 10.5 | 1.2 | 24.1 | 27.3 | 0.0 % · 3.8 % · 0.0 % |
|
|
845
|
+
|
|
846
|
+
Amp noise under the takes, from a second before them: hiss (white through a cabinet's 80 Hz–5 kHz) 40 dB under the take, buzz (60 Hz, odd-heavy to 8 kHz: Whitlock's ground-loop and rectifier buzz, as audio's dehum bench has it) 35 dB under, and both 40 dB under. By phase inversion (Hagerman & Olofsson 2004): the noise taken where it is heard (10 ms frames where the guitar stands under 6 dB over it) and over the take, the guitar's SDR, SNR, the notes' partials over 1 kHz moved. RX's Amp section learns from its Learn button alone, no plugin parameter: hosted, it passes the take bit for bit at every setting. RX 12 Spectral De-noise learned on the second of noise stands in for it, at its defaults and tuned (Extreme, 20 dB):
|
|
847
|
+
|
|
848
|
+
| | hiss: heard · over · SDR · SNR (dB) | sustains moved | buzz | sustains moved | both | sustains moved |
|
|
849
|
+
|---|---:|---:|---:|---:|---:|---:|
|
|
850
|
+
| RX 12 Guitar De-noise, Amp on | 0.0 · 0.0 · ∞ · 40.0 | 0.0 % | 0.0 · 0.0 · ∞ · 35.0 | 0.0 % | 0.0 · 0.0 · ∞ · 37.0 | 0.0 % |
|
|
851
|
+
| RX 12 Spectral De-noise, learned | 7.4 · 1.2 · 48.8 · 40.5 | 2.0 % | 6.3 · 1.1 · 48.0 · 35.8 | 2.5 % | 5.5 · 0.9 · 48.5 · 37.5 | 2.5 % |
|
|
852
|
+
| same, tuned | 10.3 · 2.0 · 47.9 · 41.0 | 3.7 % | 9.5 · 2.3 · 44.5 · 36.6 | 4.2 % | 8.0 · 1.6 · 46.7 · 38.0 | 4.6 % |
|
|
853
|
+
| `desqueak({ squeak: 0, amp: -20 })` | 11.8 · 2.5 · 49.2 · 41.7 | 1.6 % | 9.5 · 2.3 · 43.1 · 36.3 | 1.3 % | 8.6 · 1.9 · 42.6 · 37.3 | 1.9 % |
|
|
854
|
+
|
|
855
|
+
Under hiss ours is ahead on every count. Under buzz, and buzz with hiss, it takes as much or more of the noise and moves fewer sustains, but the guitar's SDR trails by 1.4 and 4.2 dB and the SNR by 0.3 and 0.7 (on the tuning takes it led on both: SDR 47.6 against 44.5, 46.6 against 45.7). Where the guitar goes under buzz: in the takes' quiet passages, where it plays 5–8 dB over the buzz (on 05_Funk1 solo, the take the pooled SDR hinges on, about 32 dB against 45–46 on the others, its SDR falls to about 1 dB in those seconds), and on the lines, where a gain cannot part a buzz harmonic from a partial in its bin: about half the guitar's error lies within ±10 Hz of the 60 Hz lines, a third by chance. Subtracting the buzz first (`@audio/denoise-dehum` 0.5.1, each line tracked and taken out, then OM-LSA on what is left) measured worse on the tuning takes: under buzz the guitar's SDR 47.6 → 39.3 dB and the noise taken where heard 10.0 → 5.6 (SNR 36.6 → 37.7), under both 46.6 → 41.1 (SNR 38.3 → 36.9); it is not used.
|
|
856
|
+
|
|
857
|
+
**Use when:** a guitar take with fret squeaks (position shifts, slides on the wound strings), attacks too sharp, or a steady amp hiss and buzz under it.<br>
|
|
858
|
+
**Not for:** a slide you want heard (a squeak and a slide's own comb are the same sound); noise that moves (`omlsa`, `deepfilter`).
|
|
859
|
+
|
|
860
|
+
---
|
|
861
|
+
|
|
862
|
+
Part of [@audio/denoise](https://github.com/audiojs/denoise), the denoise family umbrella.
|
|
863
|
+
|
|
864
|
+
MIT © [audiojs](https://github.com/audiojs)
|
|
865
|
+
|
|
866
|
+
|
|
699
867
|
## Gates & inter-word
|
|
700
868
|
|
|
701
869
|
### `gate`
|
|
@@ -712,41 +880,34 @@ gate(data, { threshold: -45, attack: 0.005, release: 0.1, hold: 0.05, lookahead:
|
|
|
712
880
|
|
|
713
881
|
### `debreath`
|
|
714
882
|
|
|
715
|
-
|
|
883
|
+
Takes the breaths between phrases down by `range`; the room around them, and the speech, stay. A breath is told by what an inhalation is (Ruinskiy & Lavner 2007): unvoiced, longer than a consonant, well under the speech, between phrases, its noise shaped by the open tract. Per frame of [`vad`](#lower-level-building-blocks), on the 0.3–8 kHz band: 10 dB or more over the room (the band's 10th-percentile frame), 12 dB or more under the speech (its 95th), under half of it over 4 kHz (no sibilant). Runs of such frames are a breath when they last 0.15–1 s, their median stands 15 dB over the room, under 60 % of their energy lies under 1 kHz (where a phrase's creaky end and murmur lie), at most half their frames are voiced (the VAD's periodicity reads a breath's formant-shaped noise as voiced now and then; a vowel is voiced throughout), and a room-level frame lies within 0.1 s on either side: a pause, which a word's own consonants have not. The cut works on the band over 300 Hz (split at zero phase: a room's rumble under a breath is the room's), ramps in over `attack` and out over `release` inside the breath, and never takes it under the room's level in that band, where it would leave a hole. `room` turns down what is neither speech nor breath, as 0.2 did. The whole clip is read at once (streaming: false).
|
|
716
884
|
|
|
717
885
|
```js
|
|
718
|
-
debreath(data, {
|
|
886
|
+
debreath(data, { fs: 48000 }) // breaths 12 dB down
|
|
887
|
+
debreath(data, { range: -20, room: -6 }) // deeper, and the room between phrases 6 dB down too
|
|
719
888
|
```
|
|
720
889
|
|
|
721
890
|
| Param | Default | |
|
|
722
891
|
|---|---|---|
|
|
723
|
-
| `range` | `-12` | dB
|
|
724
|
-
| `
|
|
725
|
-
| `
|
|
892
|
+
| `range` | `-12` | dB, how far a breath goes down |
|
|
893
|
+
| `room` | `0` | dB, how far what is neither speech nor breath goes down |
|
|
894
|
+
| `attack` | `0.005` | s, the cut's ramp in (with `room`: the gain's rise before speech) |
|
|
895
|
+
| `release` | `0.01` | s, its ramp out (with `room`: the gain's fall after speech) |
|
|
726
896
|
|
|
727
|
-
|
|
897
|
+
Against iZotope RX 12 Breath Control, `node bench/rx/debreath.mjs` in [audio](https://github.com/audiojs/audio) (2026-10): ten Spoken Wikipedia narrations, 3 minutes each, their 90 breaths labelled by the acoustics of an inhalation (most clear inhalations on spectrograms, the rest quiet noise in pauses), and VoiceBank test speech with 60 of those breaths put before its phrases (labels exact, the speech another). Every setting chosen on ten other narrations (55 breaths) and 28 other speakers (26), by Youden's J, breaths caught less speech frames harmed; RX at Gain −12 dB, `range`'s (its default 0 dB changes nothing), tuned: Offline, Gated, sensitivity 0 (defaults Real-time, Natural, 5). Per breath, its 0.3–8 kHz level change; per speech frame (voiced, or a word's edge within 0.1 s of voicing), turned down by over 3 dB or not:
|
|
728
898
|
|
|
729
|
-
| |
|
|
730
|
-
|
|
731
|
-
|
|
|
732
|
-
|
|
|
733
|
-
|
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
| G | −35 dB | −25 dB |
|
|
738
|
-
|---|---|---|
|
|
739
|
-
| 0.05 s | −6.6 dB, 53 % → **−11.1 dB, 55 %** | −0.2 dB, 45 % → 0.0 dB, 13 % |
|
|
740
|
-
| 0.15 s | −2.9 dB, 44 % → **−11.7 dB, 81 %** | −0.1 dB, 44 % → **−11.4 dB, 74 %** |
|
|
741
|
-
| 0.3 s | −4.0 dB, 50 % → **−11.8 dB, 75 %** | −3.2 dB, 50 % → **−11.8 dB, 69 %** |
|
|
742
|
-
| 0.5 s | −11.5 dB, 55 % → **−12.0 dB, 91 %** | −11.5 dB, 55 % → **−11.6 dB, 73 %** |
|
|
743
|
-
|
|
744
|
-
A breath within 0.3 s of a vowel, parted from it by less than 0.15 s, reads as the word's onset and stays: that is where consonants lie, parted from the vowel at most by a stop's closure. A loud breath that close to a phrase went down more often before (45 → 13 %), and so did a quarter of the word edges in noise.
|
|
899
|
+
| | narrations: breaths, median · down ≥ 6 dB | speech frames down > 3 dB | other frames, median | VoiceBank + breaths: median · down ≥ 6 dB | speech frames down > 3 dB |
|
|
900
|
+
|---|---:|---:|---:|---:|---:|
|
|
901
|
+
| RX 12 defaults (Gain 0 dB) | 0.0 dB · 0 % | 0.0 % | 0.0 dB | 0.0 dB · 0 % | 0.0 % |
|
|
902
|
+
| RX 12 defaults, Gain −12 dB | −9.7 dB · 81 % | 0.69 % | 0.0 dB | −6.6 dB · 52 % | 0.59 % |
|
|
903
|
+
| RX 12 tuned | **−12.0 dB · 88 %** | 1.96 % | −0.1 dB | −12.0 dB · 73 % | 0.99 % |
|
|
904
|
+
| 0.2.1 | 0.0 dB · 11 % | 0.11 % | 0.0 dB | 0.0 dB · 20 % | 0.19 % |
|
|
905
|
+
| **0.3.0** | −10.9 dB · 78 % | **0.49 %** | 0.0 dB | **−11.2 dB · 78 %** | **0.58 %** |
|
|
745
906
|
|
|
746
|
-
|
|
907
|
+
0.2.1 turned down what the VAD did not call speech; its speech reaches 0.3 s from a vowel across gaps of 0.15 s, which holds most breaths. Music and singing (Vibe Ace, Brahms, the Nutcracker, a trumpet, four VocalSet excerpts), frames within 30 dB of the loudest turned down by over 3 dB: none (0.2.1: Brahms 8.8 %, Vibe Ace 2.2 %). VoiceBank+DEMAND noisy test speech, every fourth utterance, speech frames turned down by over 3 dB: 0.03 % (0.2.1: 5.0 %).
|
|
747
908
|
|
|
748
|
-
**Use when:**
|
|
749
|
-
**Not for:** a breath that runs into a word;
|
|
909
|
+
**Use when:** breaths between phrases on a voiceover, a podcast, a narration.<br>
|
|
910
|
+
**Not for:** a breath that runs into a word (no pause on either side); hiss or room tone in pauses: `room`, `gate`, `omlsa`.
|
|
750
911
|
|
|
751
912
|
|
|
752
913
|
### `desilence`
|
|
@@ -772,7 +933,7 @@ splitSilence(data, { fs }) // → one Floa
|
|
|
772
933
|
|
|
773
934
|
Returns `{ data, segments, removed, map }`; `project(map, t)` re-times markers/subtitles (`@audio/subtitle` `project()` takes the same map).
|
|
774
935
|
|
|
775
|
-
0.1 read silence under 11 dB over the input's 10th-percentile frame energy: under noise that percentile is the noise, and whole words went. Measured with `python scripts/vad.py` (
|
|
936
|
+
0.1 read silence under 11 dB over the input's 10th-percentile frame energy: under noise that percentile is the noise, and whole words went. Measured with `python scripts/vad.py` (VoiceBank+DEMAND test set, ten Spoken Wikipedia narrations; defaults chosen on the training subset and ten other narrations), `shorten` at its defaults, 0.1.1 → 0.2.1, frames cut:
|
|
776
937
|
|
|
777
938
|
| | voiced | word edges | removed |
|
|
778
939
|
|---|---:|---:|---:|
|
|
@@ -833,7 +994,7 @@ import { noiseProfile, minStats, imcra } from '@audio/denoise'
|
|
|
833
994
|
|---|---:|---|---:|---:|---:|
|
|
834
995
|
| 60 Hz hum + harmonics | -5.2 dB | `dehum` | 40.4 dB | 6.4 dB | 65 |
|
|
835
996
|
| white noise (~13 dB SNR) | 13.3 dB | `wiener` | 20.5 dB | 0.3 dB | 82 |
|
|
836
|
-
| clicks (vinyl-style) | 24.1 dB | `declick` |
|
|
997
|
+
| clicks (vinyl-style) | 24.1 dB | `declick` | 65.2 dB | — | 450 |
|
|
837
998
|
| 7 kHz sibilance | 2.0 dB | `deesser` | 9.2 dB | 1.9 dB | 5 |
|
|
838
999
|
|
|
839
1000
|
Higher = better.
|
|
@@ -861,7 +1022,52 @@ In the rows above, `omlsa` 0.3 and `wiener` 0.3 take the decision-directed α pe
|
|
|
861
1022
|
|
|
862
1023
|
Tracking the noise, `omlsa` 0.5, `wiener` 0.4 and `specsub` 0.3 keep a program's held partials out of it (noise-estimate 2.3's `partials`, see [`omlsa`](#omlsa)). Chosen on the training subset (tracked `omlsa` PESQ 1.825 → 1.823, OVRL 2.543 → 2.542; `wiener` 1.819 → 1.820, 2.530 → 2.529; `specsub` 1.730 → 1.730, 2.459 → 2.462), music and VocalSet; on the test set, once, before → after: `omlsa` PESQ 2.364 → 2.361, STOI 0.920 → 0.920, SI-SDR 14.25 → 14.15 dB, SIG 3.384 → 3.383, BAK 3.467 → 3.466, OVRL 2.853 → 2.851, musical noise 0.48 → 0.49; `wiener` 2.355 → 2.359, 0.911 → 0.912, 14.29 → 14.29, 3.395 → 3.396, 3.431 → 3.430, 2.843 → 2.844, 0.49 → 0.50; `specsub` 2.264 → 2.270, 0.919 → 0.919, 12.80 → 12.76, 3.358 → 3.359, 3.363 → 3.362, 2.794 → 2.795, 0.35 → 0.36. The clean utterances in: PESQ 4.287 → 4.290, 4.03 → 4.07, 4.03 → 4.08; steady white and pink noise alone as before. Clean music, sung long tones and Slakh mixes cut by more than 3 dB: the table below. Tried and not taken: holding a partial from 54 ms on, not 0.3 s (more music kept, but the noise rising under a voice's harmonics was held down with them: PESQ −0.015 on the training speech); the spectral floor as the noise of a partial with no memory yet, at a take's start (the trumpet's first note kept, but DEMAND's low, peaked noises held as partials: PESQ −0.03); a 10 s window (a song's chords, repeated past it, were learned: Slakh mixes cut six times as much); the noise under a partial following the floor beside it (less music kept, more noise left under the voice). The trackers themselves: MCRA-2 (Rangachari & Loizou 2006; Loizou's `mcra2_estimation.m` constants per 10 ms) PESQ 1.72 against IMCRA's 1.83, music cut 1.7 times IMCRA's, steady noise alone 10–13 dB down with musical noise 1.0–1.1; Gerkmann & Hendriks's MMSE tracker (2012) with `partials` PESQ 1.849 (+0.024), but STOI −0.003, clean speech in 4.24 → 4.14, steady pink noise left with musical noise 0.33, and music hardly kept: it follows a held note within the 0.3 s before a partial is held. With the noise known exactly the learned form reaches PESQ 2.11 on the training subset: a tracker that gets there has to know the noise under the speech, which none of these do.
|
|
863
1024
|
|
|
864
|
-
The open classical denoisers on the same 824, each given the noise as ours is: noisereduce 3.0.3 (stationary spectral gating, the lead-in as its noise clip) at 12 dB (`prop_decrease` 0.75): PESQ 2.409, STOI 0.921, SI-SDR 12.8, SIG 3.37, BAK 3.51, OVRL 2.861, musical noise 0.03; at full reduction 2.357, 0.910, 12.4, 3.22, 3.72, 2.825, 0.74; logmmse 1.5 (a port of Loizou's `logmmse.m`, noise from the lead-in, updated by its VAD) 2.350, 0.900, 14.7, 3.29, 3.52, 2.799, 0.73; FFmpeg 8.0.1's `afftdn` learning the lead-in, 12 dB: 2.048, 0.920, 8.6, 3.25, 3.14, 2.657, 0.20 (`anlmdn` at its defaults leaves the input as it is). Neural, for scale: DeepFilterNet3 limited to 12 dB 2.670, 0.939, 16.2, 3.49, 3.69, 3.026, 0.06; RNNoise 2.109, 0.890, 12.3, 3.28, 3.85, 2.935, 0.90. iZotope RX
|
|
1025
|
+
The open classical denoisers on the same 824, each given the noise as ours is: noisereduce 3.0.3 (stationary spectral gating, the lead-in as its noise clip) at 12 dB (`prop_decrease` 0.75): PESQ 2.409, STOI 0.921, SI-SDR 12.8, SIG 3.37, BAK 3.51, OVRL 2.861, musical noise 0.03; at full reduction 2.357, 0.910, 12.4, 3.22, 3.72, 2.825, 0.74; logmmse 1.5 (a port of Loizou's `logmmse.m`, noise from the lead-in, updated by its VAD) 2.350, 0.900, 14.7, 3.29, 3.52, 2.799, 0.73; FFmpeg 8.0.1's `afftdn` learning the lead-in, 12 dB: 2.048, 0.920, 8.6, 3.25, 3.14, 2.657, 0.20 (`anlmdn` at its defaults leaves the input as it is). Neural, for scale: DeepFilterNet3 limited to 12 dB 2.670, 0.939, 16.2, 3.49, 3.69, 3.026, 0.06; RNNoise 2.109, 0.890, 12.3, 3.28, 3.85, 2.935, 0.90. iZotope RX 12, below.
|
|
1026
|
+
|
|
1027
|
+
iZotope RX 12 Advanced on the same buffers (2026-10; audio's `bench/rx/denoise.mjs` hosts the VST3 plug-ins through Pedalboard, their output aligned to the input): Voice De-noise (adaptive, 12 dB) and Spectral De-noise (adaptive learning, 12 dB) at their defaults, and at their best PESQ on the training subset over their main knobs (Voice De-noise: reduction 12, 16 or 20 dB, filter Surgical or Gentle, master threshold −12 to +10 dB, Dialogue or Music; best 20 dB at +10. Spectral De-noise: quality Simple, Advanced or Extreme at 12, 20 or 30 dB; best Extreme at 20). On a learned noise each holds the print its adaptive mode learns over the lead-in (Learn is no plug-in parameter; Spectral De-noise hears the lead-in looped to 2 s at its shortest learning time, 0.5 s). VoiceBank+DEMAND test set, 824 utterances; "clean in": PESQ of every second clean utterance (412) through the same system; MN: musical noise:
|
|
1028
|
+
|
|
1029
|
+
| | PESQ | STOI | SI-SDR dB | SIG | BAK | OVRL | MN | clean in |
|
|
1030
|
+
|---|---|---|---|---|---|---|---|---|
|
|
1031
|
+
| noisy input | 1.967 | 0.921 | 8.45 | 3.322 | 3.116 | 2.685 | 0 | |
|
|
1032
|
+
| `omlsa` | 2.361 | 0.920 | 14.15 | 3.382 | 3.474 | 2.854 | 0.49 | 4.29 |
|
|
1033
|
+
| `omlsa`, `threshold` 4 dB | 2.472 | 0.914 | 15.45 | 3.366 | 3.627 | 2.905 | 0.36 | 4.26 |
|
|
1034
|
+
| `wiener` | 2.359 | 0.912 | 14.29 | 3.398 | 3.440 | 2.848 | 0.50 | 4.07 |
|
|
1035
|
+
| `specsub` | 2.270 | 0.919 | 12.76 | 3.359 | 3.367 | 2.797 | 0.36 | 4.09 |
|
|
1036
|
+
| RX Voice De-noise | 2.367 | 0.918 | 7.30 | 3.332 | 3.468 | 2.818 | 0.31 | 4.42 |
|
|
1037
|
+
| RX Voice De-noise, 20 dB, threshold +10 | 2.500 | 0.899 | 3.72 | 3.211 | 3.657 | 2.798 | 0.66 | 4.09 |
|
|
1038
|
+
| RX Spectral De-noise | 2.216 | 0.917 | 13.94 | 3.328 | 3.378 | 2.800 | −0.02 | 4.26 |
|
|
1039
|
+
| RX Spectral De-noise, Extreme, 20 dB | 2.381 | 0.919 | 13.91 | 3.279 | 3.455 | 2.786 | 0.36 | 4.06 |
|
|
1040
|
+
| learned: audio's `denoise`, 12 dB | 2.455 | 0.920 | 15.13 | 3.369 | 3.559 | 2.881 | 0.32 | 4.28 |
|
|
1041
|
+
| RX Spectral De-noise, learned | 2.191 | 0.923 | 15.64 | 3.354 | 3.336 | 2.798 | 0.09 | 4.30 |
|
|
1042
|
+
| RX Spectral De-noise, learned, Extreme, 20 dB | 2.349 | 0.925 | 16.37 | 3.364 | 3.449 | 2.846 | 0.27 | |
|
|
1043
|
+
| RX Voice De-noise, learned | 2.368 | 0.918 | 7.13 | 3.335 | 3.465 | 2.819 | 0.20 | |
|
|
1044
|
+
| RX Voice De-noise, learned, 20 dB, threshold +10 | 2.528 | 0.901 | 3.55 | 3.224 | 3.666 | 2.812 | 0.50 | 4.20 |
|
|
1045
|
+
|
|
1046
|
+
At their defaults RX ties or trails: Voice De-noise's PESQ ties `omlsa`'s (+0.006 ± 0.011, paired 95 % interval) at OVRL −0.036 and SI-SDR −6.9 dB (it reports no latency and keeps six band thresholds; its output moves the waveform), Spectral De-noise trails on every measure, learned or adaptive. Tuned for PESQ, Voice De-noise leads, +0.139 ± 0.016 tracking and +0.073 ± 0.015 on the learned print: at 20 dB with its threshold at +10 dB it takes all within 10 dB of its noise estimate for noise, emptying the pauses PESQ marks down (BAK +0.18) at the voice's cost (SIG −0.17, STOI −0.022, SI-SDR −10.4 dB; clean speech in 4.29 → 4.09). Spectral De-noise's best, Extreme, looks 203 ms ahead (9727 samples of latency at 48 kHz, against a frame here) for +0.019 ± 0.016, OVRL −0.068. The same knob on `omlsa`, the noise read louder (`threshold`, 0.6), at its best on the training subset (+4 dB of 2 to 10; PESQ 1.823 → 1.858 there): 2.472, within 0.028 of Voice De-noise's best and over it on all else but BAK (3.627 against 3.657): OVRL +0.107, SIG +0.155, STOI +0.015, SI-SDR +11.7 dB, musical noise 0.36 against 0.66. It stays off by default: tracking clean music it cut 60 % of the music's time-frequency energy by more than 3 dB, not 42 % (below), clean speech in fell 4.285 → 4.256, and the training speech lost STOI 0.012. Voice De-noise passes clean speech higher at its defaults (4.42, against 4.29), where it differs most by leaving the clean takes' own room tone, which `omlsa` takes 15 dB down and PESQ counts as a change; RX leaves less musical noise at its defaults (0.31 and −0.02, against 0.49), at 12 dB of reduction against 15.
|
|
1047
|
+
|
|
1048
|
+
Ten Spoken Wikipedia narrations (raw OVRL 3.176): the noise floor (the quietest 500 ms, median over the takes) and the speech level (the loudest half of 50 ms frames) against the raw take:
|
|
1049
|
+
|
|
1050
|
+
| | SIG | BAK | OVRL | floor down | speech |
|
|
1051
|
+
|---|---|---|---|---|---|
|
|
1052
|
+
| `omlsa` | 3.473 | 4.089 | 3.204 | 14.7 dB | −0.03 dB |
|
|
1053
|
+
| RX Voice De-noise | 3.452 | 4.098 | 3.191 | 6.3 dB | −0.31 dB |
|
|
1054
|
+
| RX Voice De-noise, 20 dB, threshold +10 | 3.443 | 4.119 | 3.190 | 14.8 dB | −0.72 dB |
|
|
1055
|
+
| RX Spectral De-noise | 3.461 | 4.091 | 3.198 | 11.2 dB | −0.21 dB |
|
|
1056
|
+
| RX Spectral De-noise, Extreme, 20 dB | 3.455 | 4.109 | 3.202 | 17.2 dB | −0.28 dB |
|
|
1057
|
+
|
|
1058
|
+
Music under steady noise, Spectral De-noise's own ground: ten MUSDB18 test mixtures (Rafii et al. 2017), the strings and the jazz of `scripts/repair.js`, at 44.1 kHz, under white and pink noise and two DEMAND recordings (a hallway's room tone, a washing machine) 10 and 25 dB under the music's active level, 1.5 s of the noise alone before it (the learned systems learn there) and 1 s after: 96 takes. What a system does to the music and to the noise is read apart by phase inversion (Hagerman & Olofsson 2004: it hears music + noise and music − noise). SDR: the output against the clean music; NMR: its error's noise-to-mask ratio after ITU-R BS.1387's FFT ear model (under 0 dB, masked); cut: the music's time-frequency energy cut by more than 3 dB; HF: what is left of the music above 8 kHz; MN: musical noise of what is left of the noise, under the music and in the second after it stops. RX's settings were chosen by SDR on three MUSDB18 training mixtures (24 takes):
|
|
1059
|
+
|
|
1060
|
+
| | SDR dB | NMR dB | cut % | HF dB | MN, music | MN, after |
|
|
1061
|
+
|---|---|---|---|---|---|---|
|
|
1062
|
+
| input | 17.63 | −3.9 | 0 | 0 | 0 | 0 |
|
|
1063
|
+
| audio's `denoise`, `omlsa` 0.5 (1024 frames) | 20.16 | −9.6 | 2.2 | −2.8 | 0.44 | 0.38 |
|
|
1064
|
+
| audio's `denoise`, `omlsa` 0.6 (2048 frames) | 20.94 | −10.0 | 1.3 | −2.6 | 0.38 | 0.36 |
|
|
1065
|
+
| RX Spectral De-noise, learned | 19.37 | −8.2 | 1.3 | −2.4 | 0.30 | 0.68 |
|
|
1066
|
+
| RX Spectral De-noise, learned, Extreme, 20 dB | 20.23 | −10.6 | 2.9 | −3.5 | 0.43 | 1.00 |
|
|
1067
|
+
| `omlsa`, tracking | 12.05 | −3.6 | 17.1 | −4.0 | 1.74 | 1.46 |
|
|
1068
|
+
| RX Spectral De-noise, adaptive | 4.35 | −1.2 | 79.4 | −5.3 | 1.47 | 0.06 |
|
|
1069
|
+
|
|
1070
|
+
The learned `denoise` leads RX's SDR in each of the eight noises and levels (by 0.5 to 3.6 dB against its defaults, 0.1 to 1.7 against its best). RX's best reaches a lower NMR, on hiss 10 dB down above all (3.8 against 7.6 dB), by taking 20 dB where `denoise` takes its 12, and cuts more of the music for it (2.9 %, its top 3.5 dB down); at its defaults RX touches the music less under noise 25 dB down (its masking leaves the noise the music covers: SNR gained under the music 0.0 and 0.2 dB on the room tone and the machine, `denoise` 1.1 and 4.9). Adaptive, RX takes music for the noise: 79 % of it cut, against 17 % for `omlsa` tracking. The same music clean, nothing to remove (24 takes: the twenty MUSDB18 mixtures and the four recordings), cut by more than 3 dB: `omlsa` 42 %, `wiener` 43 %, `specsub` 33 %, RX Spectral De-noise adaptive 65 %, Voice De-noise 67 %: a tracker of any make learns what holds still as noise; the learned print is the way for music.
|
|
865
1071
|
|
|
866
1072
|
Tried on the training subset and not taken: the cepstral a priori SNR as the gain's ξ as well (tracked SIG −0.04, music cut 9.6 → 15.6 %); Gerkmann & Hendriks's MMSE noise tracker (2012) in place of IMCRA (tracked PESQ +0.04, OVRL +0.03, but STOI −0.008, clean speech in PESQ 4.24 → 4.08, music cut 9.6 → 28.5 %) or of minimum statistics in `wiener` (PESQ 1.82 → 1.87, steady-noise musical noise 0.53 → 0.79, music cut 14.5 → 28.5 %); that tracker started on a learned print (RX's "adaptive": OVRL −0.04, musical noise 0.40 on pink noise); the cepstral ξ in `wiener` (STOI +0.014, SIG −0.06); the averaged presence in the tracked gain (PESQ +0.015, a word's second frame after a pause 0.7 dB lower); the gain smoothed over frequency, in dB or linear, ±100 Hz (musical noise 0.46 → 0.22–0.29, speech cut by more than 3 dB 9.5 → 25–38 %). With the noise known exactly (the true noise's periodogram, recursively smoothed) the learned form scores PESQ 2.11 on the training subset (1.87 with the print) and leaves musical noise of 0.01 (0.46): what remains to be had is in the estimate of a noise that changes, not in the gain.
|
|
867
1073
|
|
|
@@ -896,16 +1102,16 @@ Frames follow the rate: the power of two nearest 32 ms, the papers' frame, where
|
|
|
896
1102
|
|
|
897
1103
|
STOI holds or rises for `wiener` and `specsub` and falls 0.001–0.002 for `omlsa`; SI-SDR falls 0.3–0.7 dB for `omlsa` and `wiener` at 22.05 and 44.1 kHz, and 0.8–1.2 dB for `specsub`, which alone prefers the longer frame there (so it did on the training subset).
|
|
898
1104
|
|
|
899
|
-
Reverberant speech (`vbreverb`): a quarter of the clean test utterances, 206, through 130 rooms of the MIT IR Survey (Traer & McDermott 2016), scored against the dry takes, DNSMOS at the input's loudness. `dereverb` 0.
|
|
1105
|
+
Reverberant speech (`vbreverb`): a quarter of the clean test utterances, 206, through 130 rooms of the MIT IR Survey (Traer & McDermott 2016), scored against the dry takes, DNSMOS at the input's loudness. `dereverb` 0.4 → 0.5; the rooms with a tail to hear, and iZotope RX 12, are in [`dereverb`](#dereverb)'s own section:
|
|
900
1106
|
|
|
901
1107
|
| | PESQ | STOI | SI-SDR dB | SIG | BAK | OVRL |
|
|
902
1108
|
|---|---|---|---|---|---|---|
|
|
903
1109
|
| reverberant input | 2.33 | 0.904 | −5.7 | 3.19 | 3.71 | 2.82 |
|
|
904
|
-
| `dereverb` | 2.
|
|
1110
|
+
| `dereverb` | 2.62 → 2.61 | 0.908 → 0.908 | −5.1 → −5.1 | 3.28 → 3.29 | 3.86 → 3.86 | 2.93 → **2.94** |
|
|
905
1111
|
| dry takes in (`vbreverb-dry`) | 4.64 | 1.000 | ∞ | 3.51 | 4.04 | 3.22 |
|
|
906
|
-
| dry, `dereverb` | 4.
|
|
1112
|
+
| dry, `dereverb` | 4.63 → **4.64** | 1.000 → 1.000 | ∞ (94 → **100 %** untouched) | 3.51 → 3.51 | 4.04 → 4.04 | 3.22 → 3.22 |
|
|
907
1113
|
|
|
908
|
-
On the training utterances (`vbreverb-train`, 126): PESQ 2.36 → 2.
|
|
1114
|
+
On the training utterances (`vbreverb-train`, 126): PESQ 2.36 → 2.64 → 2.61 (input, 0.4, 0.5). The constants were chosen on `scripts/dereverb.py train`: VoiceBank training speakers in the even-numbered rooms, 1.8–4.5 s utterances and 25–41 s takes. Of the 206 reverberant test utterances 18 % (0.4) and 25 % (0.5) come out untouched: rooms with little tail, which the dry and diffuse checks pass.
|
|
909
1115
|
|
|
910
1116
|
|
|
911
1117
|
## Demo
|
package/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export { default as denoise, classify, deesser } from '@audio/denoise-detect'
|
|
|
14
14
|
export { default as repair } from '@audio/denoise-repair'
|
|
15
15
|
export { default as desilence, segments as silenceSegments, split as splitSilence } from '@audio/denoise-desilence'
|
|
16
16
|
export { default as dewow, analyze as wowFlutter } from '@audio/denoise-dewow'
|
|
17
|
+
export { default as desqueak } from '@audio/denoise-desqueak'
|
|
17
18
|
export { snr, segSnr, lsd, nrr, speechAttenuation } from '@audio/quality'
|
|
18
19
|
export { vad, spp, ddSnr } from '@audio/vad'
|
|
19
20
|
export { noiseProfile, minStats, imcra, known } from '@audio/noise-estimate'
|
|
@@ -44,6 +45,7 @@ export type { DesilenceOptions, TimeSegment, MapPoint, DesilenceResult, Segments
|
|
|
44
45
|
export type { DenoiseMethod, ClassifyScores, Plan, DenoiseOptions, DenoiseResult, DeesserOptions } from '@audio/denoise-detect'
|
|
45
46
|
export type { DewindOptions } from '@audio/denoise-dewind'
|
|
46
47
|
export type { DewowOptions, DewowTrack, DewowLine, DewowAnalysis } from '@audio/denoise-dewow'
|
|
48
|
+
export type { DesqueakOptions } from '@audio/denoise-desqueak'
|
|
47
49
|
export type { OmlsaOptions } from '@audio/denoise-omlsa'
|
|
48
50
|
export type { RepairRegion, RepairOptions, RepairMethod } from '@audio/denoise-repair'
|
|
49
51
|
export type { SpecsubOptions } from '@audio/denoise-spectral'
|
package/index.js
CHANGED
|
@@ -19,6 +19,7 @@ export { default as denoise, classify, deesser } from '@audio/denoise-detect'
|
|
|
19
19
|
export { default as repair } from '@audio/denoise-repair'
|
|
20
20
|
export { default as desilence, segments as silenceSegments, split as splitSilence } from '@audio/denoise-desilence'
|
|
21
21
|
export { default as dewow, analyze as wowFlutter } from '@audio/denoise-dewow'
|
|
22
|
+
export { default as desqueak } from '@audio/denoise-desqueak'
|
|
22
23
|
|
|
23
24
|
export { snr, segSnr, lsd, nrr, speechAttenuation } from '@audio/quality'
|
|
24
25
|
export { vad, spp, ddSnr } from '@audio/vad'
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@audio/denoise",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "Noise reduction
|
|
5
|
+
"description": "Noise reduction and restoration: gate, spectral subtraction, Wiener, OM-LSA, dehum, declick, decrackle, declip, dewind, deplosive, deesser, debreath, dereverb, debleed, dewow, desqueak",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
@@ -54,23 +54,24 @@
|
|
|
54
54
|
"@audio/noise-estimate": "^2.3.0",
|
|
55
55
|
"@audio/denoise-spectral": "^0.3.0",
|
|
56
56
|
"@audio/denoise-wiener": "^0.4.0",
|
|
57
|
-
"@audio/denoise-omlsa": "^0.
|
|
58
|
-
"@audio/denoise-dehum": "^0.
|
|
59
|
-
"@audio/denoise-declick": "^0.
|
|
60
|
-
"@audio/denoise-decrackle": "^0.3.
|
|
61
|
-
"@audio/denoise-declip": "^0.
|
|
57
|
+
"@audio/denoise-omlsa": "^0.6.0",
|
|
58
|
+
"@audio/denoise-dehum": "^0.5.2",
|
|
59
|
+
"@audio/denoise-declick": "^0.4.0",
|
|
60
|
+
"@audio/denoise-decrackle": "^0.3.1",
|
|
61
|
+
"@audio/denoise-declip": "^0.4.0",
|
|
62
62
|
"@audio/denoise-dewind": "^0.4.0",
|
|
63
|
-
"@audio/denoise-deplosive": "^0.
|
|
64
|
-
"@audio/denoise-debreath": "^0.
|
|
65
|
-
"@audio/denoise-dereverb": "^0.
|
|
66
|
-
"@audio/denoise-detect": "^0.
|
|
63
|
+
"@audio/denoise-deplosive": "^0.3.0",
|
|
64
|
+
"@audio/denoise-debreath": "^0.3.0",
|
|
65
|
+
"@audio/denoise-dereverb": "^0.5.0",
|
|
66
|
+
"@audio/denoise-detect": "^0.6.0",
|
|
67
67
|
"@audio/dynamics-gate": "^0.1.4",
|
|
68
68
|
"@audio/denoise-repair": "^0.4.0",
|
|
69
69
|
"@audio/quality": "^1.0.0",
|
|
70
70
|
"@audio/stft": "^2.0.0",
|
|
71
71
|
"@audio/denoise-desilence": "^0.2.1",
|
|
72
|
-
"@audio/denoise-debleed": "^0.
|
|
73
|
-
"@audio/denoise-dewow": "^0.3.0"
|
|
72
|
+
"@audio/denoise-debleed": "^0.3.0",
|
|
73
|
+
"@audio/denoise-dewow": "^0.3.0",
|
|
74
|
+
"@audio/denoise-desqueak": "^0.2.0"
|
|
74
75
|
},
|
|
75
76
|
"devDependencies": {
|
|
76
77
|
"audio-lena": "^3.0.0",
|