@audio/denoise 0.3.11 → 0.4.1
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 +102 -39
- package/index.d.ts +3 -3
- package/index.js +1 -1
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ Single-pass noise reduction. 13 specialised methods + an auto-classifier.
|
|
|
20
20
|
| [deesser](#deesser) | time | sibilance | ★★★★ | low | voice (s, sh) |
|
|
21
21
|
| [debreath](#debreath) | time | inter-word noise | ★★★ | low | breath / hiss in pauses |
|
|
22
22
|
| [desilence](#desilence) | time | pauses | ★★★ | low | remove / shorten / trim silence, split by pause |
|
|
23
|
-
| [dereverb](#dereverb) | freq | late reverb |
|
|
23
|
+
| [dereverb](#dereverb) | freq | late reverb | ★★★ | high | speech in a room |
|
|
24
24
|
| [dewow](#dewow) | time + freq | pitch drift | ★★★ | medium | tape / vinyl / cassette wow & flutter |
|
|
25
25
|
|
|
26
26
|
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).
|
|
@@ -69,7 +69,7 @@ denoise(data, { force: 'wiener' }) // skip classifie
|
|
|
69
69
|
|
|
70
70
|
**Routing (in priority order):**
|
|
71
71
|
1. tonal hum (Goertzel — ≥2 of first 3 harmonics show 50× line/off-line ratio at 50 or 60 Hz)
|
|
72
|
-
2. impulses (
|
|
72
|
+
2. impulses: AR(30) residual samples over 12× the residual RMS within ±10 ms and 2× every residual 2.5–15 ms away (a glottal pulse has its like one pitch period off), more than 1 a second (`CLICK_RATE`)
|
|
73
73
|
3. sibilance (high/mid band power ratio > 8)
|
|
74
74
|
4. LF rumble (low/mid band power ratio > 3)
|
|
75
75
|
5. non-stationary noise (CV of the rolling-minimum frame-energy floor > 0.3) → omlsa
|
|
@@ -80,19 +80,22 @@ denoise(data, { force: 'wiener' }) // skip classifie
|
|
|
80
80
|
|
|
81
81
|
### `dehum`
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
Measures the hum, then notches it: biquad notches at the harmonics of the mains frequency that stand out, at the frequency measured. Without hum the audio comes back untouched. Notches cost speech wherever there is no hum to remove: a voice's harmonics sweep through them and each notch rings on what it takes out (the old default, four notches at 50–200 Hz, took clean VoiceBank speech from PESQ 4.64 to 3.2).
|
|
84
84
|
|
|
85
85
|
```js
|
|
86
|
-
dehum(data, {
|
|
87
|
-
dehum(data, {
|
|
86
|
+
dehum(data, { fs }) // 50 or 60 Hz, measured; nothing without hum
|
|
87
|
+
dehum(data, { fs, freq: 60 }) // the 60 Hz series, its exact frequency measured
|
|
88
|
+
dehum(data, { fs, freq: 60, harmonics: 4 }) // notch 60–240 Hz whatever is there
|
|
89
|
+
measure(data, fs) // → { f0, harmonics } or null (import from @audio/denoise-dehum)
|
|
88
90
|
```
|
|
89
91
|
|
|
90
92
|
| Param | Default | |
|
|
91
93
|
|---|---|---|
|
|
92
|
-
| `freq` |
|
|
93
|
-
| `harmonics` |
|
|
94
|
+
| `freq` | measured | Fundamental, Hz. Omitted: the 50 or 60 Hz series, whichever stands out. Given: its exact frequency within ±0.4 % (±`drift` Hz with `adaptive`) |
|
|
95
|
+
| `harmonics` | those present | Notch h = 1…`harmonics`, present or not. Omitted: the harmonics up to 1 kHz that stand out |
|
|
94
96
|
| `Q` | `30` | Notch sharpness — higher = narrower |
|
|
95
|
-
|
|
97
|
+
|
|
98
|
+
The measurement is 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. Each line is judged by its peak over the median power of the ±8 Hz around it: hum is there when the fundamental stands out by 20 dB or two of the first six harmonics by 15 dB (searched within ±0.4 %, the mains tolerance); the fundamental is the least-squares fit f0 = Σh·p<sub>h</sub>/Σh² to the interpolated peaks, and each harmonic up to 1 kHz found within ±0.05 % of h·f0 at 13 dB is notched. It needs a second of signal: in blocks, pass the same `params` object and give the first call a second or more. As an `audio` op it is whole-clip (`streaming: false`).
|
|
96
99
|
|
|
97
100
|
**Use when:** mains buzz, ground-loop hum, fixed tonal interference.<br>
|
|
98
101
|
**Not for:** broadband noise (use `wiener`/`omlsa`); shifting tones (use spectral methods).
|
|
@@ -162,18 +165,22 @@ deesser(data, { fc: 6500, threshold: -28, ratio: 4 })
|
|
|
162
165
|
|
|
163
166
|
### `specsub`
|
|
164
167
|
|
|
165
|
-
|
|
168
|
+
Power spectral subtraction with over-subtraction and a spectral floor (Berouti, Schwartz & Makhoul 1979): |Ŝ|² = |Y|² − α·N̂ where that stays above β·N̂, else β·N̂. Over-subtraction takes out the noise's peaks that plain subtraction leaves as musical tones; the floor, a fraction of the noise estimate, fills the valleys with a steady bed that masks what is left. α follows the frame's SNR (4 − 3/20·SNR: 4.75 at −5 dB down to 1 at 20 dB) unless fixed. The noise PSD is tracked by minimum statistics (Martin 2001) over a 1.5 s window, in batch and stream alike, unless a profile or a noise-only stretch is given.
|
|
166
169
|
|
|
167
170
|
```js
|
|
168
|
-
specsub(data, {
|
|
169
|
-
specsub(data, { alpha: 2
|
|
171
|
+
specsub(data, { fs }) // α(SNR), β 0.05, noise tracked
|
|
172
|
+
specsub(data, { fs, alpha: 2 }) // fixed over-subtraction
|
|
173
|
+
specsub(data, { fs, noiseFrames: 6 }) // noise from the first 6 frames
|
|
170
174
|
```
|
|
171
175
|
|
|
172
176
|
| Param | Default | |
|
|
173
177
|
|---|---|---|
|
|
174
|
-
| `alpha` |
|
|
175
|
-
| `beta` | `0.
|
|
176
|
-
| `
|
|
178
|
+
| `alpha` | α(SNR) | Fixed over-subtraction factor; omitted (or 0): Berouti's α(SNR) |
|
|
179
|
+
| `beta` | `0.05` | Spectral floor, a fraction of the noise estimate: higher leaves less musical noise and more noise |
|
|
180
|
+
| `frameSize` | power of two nearest 32 ms | STFT frame: 512 at 16 and 22.05 kHz, 1024 at 44.1, 2048 at 48 (`frame(fs)`) |
|
|
181
|
+
| `hopSize` | `frameSize/4` | OLA hop |
|
|
182
|
+
| `profile` | tracked | Noise PSD (`Float64Array`, `frameSize/2+1` bins) |
|
|
183
|
+
| `noiseFrames` / `profileFrom` / `profileTo` | | A noise-only stretch to average for the profile |
|
|
177
184
|
|
|
178
185
|
**Use when:** quick baseline; offline cleanup with a known noise-only preamble.<br>
|
|
179
186
|
**Not for:** musical-noise-sensitive material — use `wiener` or `omlsa`.
|
|
@@ -181,42 +188,51 @@ specsub(data, { alpha: 2, beta: 0.02 }) // fixed over-subt
|
|
|
181
188
|
|
|
182
189
|
### `wiener`
|
|
183
190
|
|
|
184
|
-
MMSE
|
|
191
|
+
MMSE log-spectral amplitude (Ephraim & Malah 1985) or Wiener (Scalart & Filho 1996) gain on the decision-directed a priori SNR ξ = α·Â²(l−1)/λ(l−1) + (1−α)·max(γ−1, 0) (Ephraim & Malah 1984, eq. 51). The noise PSD λ is tracked by minimum statistics (Martin 2001) over a 1.5 s window, in batch and stream alike, unless a profile or a noise-only stretch is given.
|
|
185
192
|
|
|
186
193
|
```js
|
|
187
|
-
wiener(data, {
|
|
188
|
-
wiener(data
|
|
194
|
+
wiener(data, { fs }) // LSA gain, noise tracked
|
|
195
|
+
wiener(data, { fs, rule: 'wiener' }) // Wiener gain
|
|
196
|
+
wiener(data, { fs, noiseFrames: 6 }) // noise from the first 6 frames
|
|
189
197
|
```
|
|
190
198
|
|
|
191
199
|
| Param | Default | |
|
|
192
200
|
|---|---|---|
|
|
193
201
|
| `rule` | `'mmse-lsa'` | `'wiener'` or `'mmse-lsa'` (log-spectral, less musical noise) |
|
|
194
202
|
| `alpha` | `0.98` | Decision-directed smoothing (alias of `alphaDD`) |
|
|
195
|
-
| `
|
|
203
|
+
| `xiMin` | `10^−1.5` | A priori SNR floor (−15 dB) |
|
|
204
|
+
| `frameSize` | power of two nearest 32 ms | STFT frame: 512 at 16 and 22.05 kHz, 1024 at 44.1, 2048 at 48 (`frame(fs)`) |
|
|
196
205
|
| `hopSize` | `frameSize/4` | OLA hop |
|
|
197
|
-
| `
|
|
206
|
+
| `profile` | tracked | Noise PSD (`Float64Array`, `frameSize/2+1` bins) |
|
|
207
|
+
| `noiseFrames` / `profileFrom` / `profileTo` | | A noise-only stretch to average for the profile |
|
|
198
208
|
|
|
199
209
|
**Use when:** transparent broadband denoise; the "safe default" for stationary noise.
|
|
200
210
|
|
|
201
211
|
|
|
202
212
|
### `omlsa`
|
|
203
213
|
|
|
204
|
-
Optimally-Modified Log-Spectral Amplitude estimator (Cohen
|
|
205
|
-
|
|
214
|
+
Optimally-Modified Log-Spectral Amplitude estimator (Cohen & Berdugo 2001) with IMCRA noise estimation (Cohen 2003). The log-spectral amplitude gain when speech is present, weighed against a floor by the speech presence probability p: `G = G_H1^p · G_min^(1−p)` (eq. 16). The a priori SNR is decision-directed on G<sub>H1</sub> (eq. 18), the a priori speech absence is estimated from its spread over time and neighbouring bins (§4), the noise spectrum comes from IMCRA. As Cohen's own `omlsa.m`, a bin whose speech absence reaches 0.9 counts as noise: noise that happens to peak keeps G<sub>min</sub> and leaves no musical tone, so what remains of the noise is the noise, G<sub>min</sub> quieter. Time constants are set for 8 ms frames and rescaled to the actual frame step (`omlsa.m` rescales by the reciprocal, which lengthens them at 48 kHz). `scripts/reference.py` holds a numpy version written from the papers; on 16 kHz VoiceBank frames it gives `omlsa.m`'s noise track, speech absence and gains to the last bit (but for near-empty bins, where `omlsa.m`'s absolute 1e-10 floors bind), and test.js holds this code to it.
|
|
215
|
+
|
|
216
|
+
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 alone: (9) at the a priori SNR of speech ξ<sub>H1</sub> = 15 dB and q = 0.5 (Gerkmann & Hendriks 2012), and 0 where the estimated q reaches 0.9, as before. The decision-directed ξ lags a word's onset; a known noise need not wait for it. On the VoiceBank+DEMAND test set, the noise learned from the half second before each speaker starts and G<sub>min</sub> −12 dB: PESQ 2.48, SI-SDR 15.2 dB, OVRL 2.89, against 2.40, 14.5 and 2.86 tracked; on steady noise under speech and music the noise 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.06 at −12 dB and 0.46 at −20). `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.
|
|
206
217
|
|
|
207
218
|
```js
|
|
208
|
-
omlsa(data)
|
|
209
|
-
omlsa(data, {
|
|
219
|
+
omlsa(data, { fs })
|
|
220
|
+
omlsa(data, { fs, gMin: -10 }) // gentler: more room tone left
|
|
221
|
+
omlsa(data, { fs, profileFrom: 0, profileTo: fs / 2, gMin: -12 }) // the noise learned from the first half second
|
|
210
222
|
```
|
|
211
223
|
|
|
212
224
|
| Param | Default | |
|
|
213
225
|
|---|---|---|
|
|
214
|
-
| `
|
|
215
|
-
| `alpha` | `0.
|
|
216
|
-
| `
|
|
226
|
+
| `gMin` | `-15` | dB: what noise-only bins keep (alias `gMinDb`) |
|
|
227
|
+
| `alpha` | `0.98` | Decision-directed smoothing (alias of `alphaDD`) |
|
|
228
|
+
| `xiMin` | `10^−2.5` | A priori SNR floor (−25 dB) |
|
|
229
|
+
| `qPrior` | estimated | A fixed a priori speech absence instead of the estimate |
|
|
230
|
+
| `frameSize` | power of two nearest 32 ms | STFT frame: 512 at 16 and 22.05 kHz, 1024 at 44.1, 2048 at 48 (`frame(fs)`) |
|
|
217
231
|
| `hopSize` | `frameSize/4` | |
|
|
232
|
+
| `profile` | tracked | A known noise PSD (`frameSize/2+1` bins), held |
|
|
233
|
+
| `noiseFrames` / `profileFrom` / `profileTo` | | A noise-only stretch to learn the profile from (batch) |
|
|
218
234
|
|
|
219
|
-
**Use when:** speech in non-stationary noise (street, café, car); generally the highest-quality choice for noisy speech.
|
|
235
|
+
**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`.
|
|
220
236
|
|
|
221
237
|
|
|
222
238
|
## Impulses
|
|
@@ -274,22 +290,18 @@ declip(data) // auto-detects c
|
|
|
274
290
|
|
|
275
291
|
### `dereverb`
|
|
276
292
|
|
|
277
|
-
Late
|
|
293
|
+
Late reverberation off speech by weighted prediction error, WPE (Nakatani et al. 2010), in its recursive form (Yoshioka & Nakatani 2012). In each STFT bin, what the frames 30 to 130 ms back predict of the current one is the room's tail, and is subtracted. The prediction is fitted with each frame weighted by its inverse power, so it takes what the room adds, not the speech's own correlation. A linear filter per bin: no decay time to estimate, no gain floor, no musical noise. It adapts within about a second; each frame leaves through the filter a quarter second later has learned (`lookahead`), so a take's first words are cleaned too.
|
|
278
294
|
|
|
279
295
|
```js
|
|
280
|
-
dereverb(data, {
|
|
296
|
+
dereverb(data, { fs: 48000 })
|
|
281
297
|
```
|
|
282
298
|
|
|
283
299
|
| Param | Default | |
|
|
284
300
|
|---|---|---|
|
|
285
|
-
| `
|
|
286
|
-
| `predelay` | `0.04` | Direct-sound passthrough (s) |
|
|
287
|
-
| `alpha` | `1.5` | Reverb-PSD over-estimation factor |
|
|
288
|
-
| `alphaDD` | `0.98` | Decision-directed SIR smoothing |
|
|
289
|
-
| `gMin` | `0.05` | Gain floor for reverb-dominated bins |
|
|
301
|
+
| `lookahead` | `0.25` | s the filter learns past each frame before it leaves; the latency grows by it (0: the frame's alone, 32 to 46 ms) |
|
|
290
302
|
|
|
291
|
-
**Use when:**
|
|
292
|
-
**Not for:**
|
|
303
|
+
**Use when:** speech in a room, one microphone.<br>
|
|
304
|
+
**Not for:** music or anything holding a steady pitch: a steady tone is predictable, and taken (a held note with vibrato loses 13 dB). Noise: denoise first.
|
|
293
305
|
|
|
294
306
|
|
|
295
307
|
## Pitch drift
|
|
@@ -416,13 +428,53 @@ import { noiseProfile, minStats, imcra } from '@audio/denoise'
|
|
|
416
428
|
|
|
417
429
|
| scenario | SNR-in | best method | SNR-out | NRR | ms |
|
|
418
430
|
|---|---:|---|---:|---:|---:|
|
|
419
|
-
| 60 Hz hum + harmonics | -5.2 dB | `dehum` | 15.
|
|
420
|
-
| white noise (~13 dB SNR) | 13.
|
|
431
|
+
| 60 Hz hum + harmonics | -5.2 dB | `dehum` | 15.3 dB | 6.3 dB | 5 |
|
|
432
|
+
| white noise (~13 dB SNR) | 13.3 dB | `wiener` | 20.5 dB | 0.3 dB | 82 |
|
|
421
433
|
| clicks (vinyl-style) | 24.1 dB | `declick` | 44.1 dB | — | 462 |
|
|
422
|
-
| 7 kHz sibilance | 2.0 dB | `deesser` | 9.
|
|
434
|
+
| 7 kHz sibilance | 2.0 dB | `deesser` | 9.2 dB | 1.9 dB | 5 |
|
|
423
435
|
|
|
424
436
|
Higher = better.
|
|
425
437
|
|
|
438
|
+
### Speech
|
|
439
|
+
|
|
440
|
+
`node scripts/speech.mjs SET SYSTEMS` runs each op through its `audio.js` manifest, as `audio` does, and `python scripts/speech.py score SET SYSTEMS` scores the outputs as `@audio/neural-denoise`'s accuracy.py does: at 16 kHz, PESQ (P.862.2), STOI, SI-SDR, DNSMOS P.835 (SIG speech, BAK background, OVRL overall). Musical noise is the log kurtosis ratio of the power spectral values, output over input (Uemura et al. 2008): 0 when the noise is only scaled, higher when isolated peaks survive. Defaults were chosen on 168 utterances of a VoiceBank+DEMAND training subset that shares no speaker or noise with the test set (`python scripts/speech.py fetch`); the test set was scored once. Before: 0.3.11.
|
|
441
|
+
|
|
442
|
+
VoiceBank+DEMAND test set (Valentini-Botinhao 2017, CC BY 4.0), 824 utterances; noisy input PESQ 1.97, STOI 0.921, SI-SDR 8.45 dB, OVRL 2.68:
|
|
443
|
+
|
|
444
|
+
| op, before → after | PESQ | STOI | SI-SDR dB | SIG | BAK | OVRL |
|
|
445
|
+
|---|---|---|---|---|---|---|
|
|
446
|
+
| `omlsa` | 1.88 → **2.40** | 0.870 → 0.916 | 5.4 → **14.5** | 3.07 → 3.38 | 3.15 → **3.49** | 2.51 → **2.86** |
|
|
447
|
+
| `wiener` | 2.19 → 2.34 | 0.916 → 0.910 | 11.9 → 14.0 | 3.34 → 3.38 | 3.26 → 3.38 | 2.73 → 2.81 |
|
|
448
|
+
| `specsub` | 2.11 → 2.24 | 0.921 → 0.920 | 10.4 → 12.5 | 3.29 → 3.35 | 3.12 → 3.32 | 2.66 → 2.77 |
|
|
449
|
+
| `dehum` (no hum here) | 1.78 → 1.97 | 0.907 → 0.921 | 6.5 → 8.4 | 3.29 → 3.32 | 3.08 → 3.11 | 2.65 → 2.68 |
|
|
450
|
+
|
|
451
|
+
The same clean utterances in: PESQ 3.06 → 4.27 (`omlsa`), 3.97 → 4.03 (`wiener`), 4.30 → 4.05 (`specsub`, which now subtracts an unbiased noise estimate), 3.20 → 4.64 (`dehum`: no hum found, output equals input). Stationary white and pink noise alone, 8 s: `omlsa` takes it 15 dB down with log kurtosis ratio 0.00 (was +0.53 and +0.30), `wiener` 16 dB at +0.33 and +0.79 (was 10 dB at +0.93 and +1.35), `specsub` 12 dB at +0.65 and +1.36 (was 4 dB at +0.48 and +0.58). With mains hum 20 dB under the clean utterances (12 harmonics at −6 dB per octave, 0.05 Hz off nominal), `dehum` takes PESQ from 2.64 to 2.88 at 50 Hz and from 2.48 to 2.76 at 60 Hz (before: 2.54 and 2.19); alone, that hum goes 44.6 and 50.0 dB down (before: 10.3 dB at 50 Hz, nothing at 60).
|
|
452
|
+
|
|
453
|
+
Ten Spoken Wikipedia narrations, 60 s each (volunteers at home; raw OVRL 3.17): `omlsa` SIG 3.25 → 3.46 (raw 3.45), BAK 4.00 → 4.09, OVRL 2.96 → 3.19, speech level −1.1 → −0.04 dB, noise floor median −76 → −75 dBFS. Room tone stays: G<sub>min</sub> is 15 dB, so only a room already under −75 dBFS ends under −90 (one of the nine, raw −83).
|
|
454
|
+
|
|
455
|
+
Frames follow the rate: the power of two nearest 32 ms, the papers' frame, where they were 2048 samples at every rate (128 ms at 16 kHz). The same test set resampled (`python scripts/speech.py resample vbdemand RATE`, then `vbdemand@RATE`), PESQ and OVRL, 2048 → rate's frame; 48 kHz keeps 2048:
|
|
456
|
+
|
|
457
|
+
| op | 16 kHz (512) | 22.05 kHz (512) | 44.1 kHz (1024) |
|
|
458
|
+
|---|---|---|---|
|
|
459
|
+
| `omlsa` | 2.25 → 2.42, 2.80 → 2.87 | 2.29 → 2.42, 2.81 → 2.86 | 2.39 → 2.42, 2.86 → 2.86 |
|
|
460
|
+
| `wiener` | 2.20 → 2.36, 2.75 → 2.82 | 2.24 → 2.37, 2.76 → 2.82 | 2.33 → 2.37, 2.81 → 2.82 |
|
|
461
|
+
| `specsub` | 2.16 → 2.25, 2.77 → 2.75 | 2.20 → 2.23, 2.78 → 2.74 | 2.24 → 2.23, 2.77 → 2.74 |
|
|
462
|
+
|
|
463
|
+
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).
|
|
464
|
+
|
|
465
|
+
Reverberant speech (`vbreverb`): a quarter of the clean test utterances, 206, through 130 rooms of the MIT IR Survey (Traer & McDermott 2016; T60 from each response's decay, 500 Hz and 1 kHz: median 0.40 s, 55 utterances at 0.6 s or more), scored against the dry takes, DNSMOS at the input's loudness. `dereverb` before (0.1.10: late-reverb subtraction at an assumed T60 of 0.5 s) → now:
|
|
466
|
+
|
|
467
|
+
| | PESQ | STOI | SI-SDR dB | SIG | BAK | OVRL |
|
|
468
|
+
|---|---|---|---|---|---|---|
|
|
469
|
+
| reverberant input | 2.33 | 0.904 | −5.7 | 3.19 | 3.71 | 2.82 |
|
|
470
|
+
| `dereverb` | 1.55 → **2.52** | 0.758 → **0.914** | −7.7 → **−5.2** | 2.27 → **3.22** | 3.85 → 3.73 | 2.08 → **2.85** |
|
|
471
|
+
| T60 ≥ 0.6 s (55), input | 1.65 | 0.838 | −10.7 | 2.81 | 3.28 | 2.38 |
|
|
472
|
+
| T60 ≥ 0.6 s, `dereverb` | 1.48 → **1.76** | 0.724 → **0.855** | −10.5 → **−10.0** | 2.25 → **2.88** | 3.76 → 3.37 | 2.03 → **2.45** |
|
|
473
|
+
| dry takes in (`vbreverb-dry`) | 4.64 | 1.000 | ∞ | 3.51 | 4.04 | 3.22 |
|
|
474
|
+
| dry, `dereverb` | 1.60 → 4.37 | 0.812 → 0.999 | 2.6 → 27.5 | 2.46 → 3.50 | 3.92 → 4.03 | 2.27 → 3.21 |
|
|
475
|
+
|
|
476
|
+
The old estimate summed every past frame's power though each already holds its own tail (about 6 dB over, then ×1.5), at a fixed T60, with a −26 dB floor: it took the direct sound itself. The prediction's length, delay, memory and look-ahead were chosen on the training utterances in the even-numbered rooms (`vbreverb-train`, 126: PESQ 2.36 → 2.56); longer prediction (160 ms) gained 0.04 PESQ there and cost 0.09 on dry takes. Late-reverb subtraction (Lebart et al. 2001) at each room's measured T60, the best a blind T60 estimator could do, scored below WPE there (PESQ 2.38–2.51, STOI down), and after it lowered WPE's scores: no T60 is estimated.
|
|
477
|
+
|
|
426
478
|
|
|
427
479
|
## Demo
|
|
428
480
|
|
|
@@ -436,11 +488,22 @@ Higher = better.
|
|
|
436
488
|
- Ephraim & Malah, *Speech Enhancement Using a Minimum Mean-Square Error Short-Time Spectral Amplitude Estimator*, IEEE TASSP 1984.
|
|
437
489
|
- Ephraim & Malah, *Speech Enhancement Using a Minimum Mean-Square Error Log-Spectral Amplitude Estimator*, IEEE TASSP 1985.
|
|
438
490
|
- Martin, *Noise Power Spectral Density Estimation Based on Optimal Smoothing and Minimum Statistics*, IEEE TSAP 2001.
|
|
491
|
+
- Martin, *Bias Compensation Methods for Minimum Statistics Noise Power Spectral Density Estimation*, Signal Processing 2006.
|
|
492
|
+
- Scalart & Vieira Filho, *Speech Enhancement Based on a Priori Signal to Noise Estimation*, ICASSP 1996.
|
|
493
|
+
- Cohen & Berdugo, *Speech Enhancement for Non-Stationary Noise Environments*, Signal Processing 2001.
|
|
439
494
|
- Cohen, *Optimal Speech Enhancement Under Signal Presence Uncertainty Using Log-Spectral Amplitude Estimator*, IEEE SPL 2002.
|
|
440
495
|
- Cohen, *Noise Spectrum Estimation in Adverse Environments: Improved Minima Controlled Recursive Averaging*, IEEE TSAP 2003.
|
|
496
|
+
- Cohen, `omlsa.m` (OM-LSA with IMCRA), [israelcohen.com/software](https://israelcohen.com/software/).
|
|
497
|
+
- Uemura, Takahashi, Saruwatari, Shikano & Kondo, *Automatic Optimization Scheme of Spectral Subtraction Based on Musical Noise Assessment via Higher-Order Statistics*, IWAENC 2008.
|
|
498
|
+
- Valentini-Botinhao, *Noisy Speech Database for Training Speech Enhancement Algorithms and TTS Models*, University of Edinburgh 2017, [doi:10.7488/ds/2117](https://doi.org/10.7488/ds/2117).
|
|
499
|
+
- Reddy, Gopal & Cutler, *DNSMOS P.835*, ICASSP 2022.
|
|
441
500
|
- Janssen, Veldhuis & Vries, *Adaptive Interpolation of Discrete-Time Signals That Can Be Modeled as Autoregressive Processes*, IEEE TASSP 1986.
|
|
442
501
|
- Godsill & Rayner, *Digital Audio Restoration*, Springer 1998.
|
|
443
502
|
- Lebart, Boucher & Denbigh, *A New Method Based on Spectral Subtraction for Speech Dereverberation*, Acta Acustica 2001.
|
|
503
|
+
- Nakatani, Yoshioka, Kinoshita, Miyoshi & Juang, *Speech Dereverberation Based on Variance-Normalized Delayed Linear Prediction*, IEEE TASLP 2010.
|
|
504
|
+
- Yoshioka & Nakatani, *Generalization of Multi-Channel Linear Prediction Methods for Blind MIMO Impulse Response Shortening*, IEEE TASLP 2012.
|
|
505
|
+
- Caroselli, Shafran, Narayanan & Rose, *Adaptive Multichannel Dereverberation for Automatic Speech Recognition*, Interspeech 2017.
|
|
506
|
+
- Traer & McDermott, *Statistics of Natural Reverberation Enable Perceptual Separation of Sound and Space*, PNAS 2016 (MIT IR Survey).
|
|
444
507
|
- RBJ Audio EQ Cookbook (biquad coefficients).
|
|
445
508
|
|
|
446
509
|
|
package/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export { default as desilence, segments as silenceSegments, split as splitSilenc
|
|
|
15
15
|
export { default as dewow, analyze as wowFlutter } from '@audio/denoise-dewow'
|
|
16
16
|
export { snr, segSnr, lsd, nrr, speechAttenuation } from '@audio/quality'
|
|
17
17
|
export { vad, spp, ddSnr } from '@audio/vad'
|
|
18
|
-
export { noiseProfile, minStats, imcra } from '@audio/noise-estimate'
|
|
18
|
+
export { noiseProfile, minStats, imcra, known } from '@audio/noise-estimate'
|
|
19
19
|
export { stftBatch, stftStream, stftAnalyse } from '@audio/stft'
|
|
20
20
|
|
|
21
21
|
export interface GateOptions {
|
|
@@ -43,9 +43,9 @@ export type { DenoiseMethod, ClassifyScores, Plan, DenoiseOptions, DenoiseResult
|
|
|
43
43
|
export type { DewindOptions } from '@audio/denoise-dewind'
|
|
44
44
|
export type { DewowOptions, DewowTrack, DewowAnalysis } from '@audio/denoise-dewow'
|
|
45
45
|
export type { OmlsaOptions } from '@audio/denoise-omlsa'
|
|
46
|
-
export type { RepairRegion, RepairOptions } from '@audio/denoise-repair'
|
|
46
|
+
export type { RepairRegion, RepairOptions, RepairMethod } from '@audio/denoise-repair'
|
|
47
47
|
export type { SpecsubOptions } from '@audio/denoise-spectral'
|
|
48
48
|
export type { WienerOptions } from '@audio/denoise-wiener'
|
|
49
|
-
export type { NoiseProfileOptions, MinStatsOptions, Estimator, ImcraOptions, ImcraEstimator } from '@audio/noise-estimate'
|
|
49
|
+
export type { NoiseProfileOptions, MinStatsOptions, Estimator, ImcraOptions, ImcraEstimator, KnownOptions } from '@audio/noise-estimate'
|
|
50
50
|
export type { SegSnrOptions, LsdOptions, SpectralSimOptions, ModulationDepthOptions } from '@audio/quality'
|
|
51
51
|
export type { VadOptions, VadResult, SppOptions } from '@audio/vad'
|
package/index.js
CHANGED
|
@@ -21,7 +21,7 @@ export { default as dewow, analyze as wowFlutter } from '@audio/denoise-dewow'
|
|
|
21
21
|
|
|
22
22
|
export { snr, segSnr, lsd, nrr, speechAttenuation } from '@audio/quality'
|
|
23
23
|
export { vad, spp, ddSnr } from '@audio/vad'
|
|
24
|
-
export { noiseProfile, minStats, imcra } from '@audio/noise-estimate'
|
|
24
|
+
export { noiseProfile, minStats, imcra, known } from '@audio/noise-estimate'
|
|
25
25
|
export { stftBatch, stftStream, stftAnalyse } from '@audio/stft'
|
|
26
26
|
|
|
27
27
|
// gate — @audio/dynamics-gate behind this family's seconds-based, in-place API
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@audio/denoise",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Noise reduction — gate, spectral subtraction, Wiener, OM-LSA, dehum, declick, decrackle, declip, deesser, dereverb",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -51,23 +51,23 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@audio/vad": "^1.0.0",
|
|
54
|
-
"@audio/noise-estimate": "^
|
|
55
|
-
"@audio/denoise-spectral": "^0.
|
|
56
|
-
"@audio/denoise-wiener": "^0.
|
|
57
|
-
"@audio/denoise-omlsa": "^0.
|
|
58
|
-
"@audio/denoise-dehum": "^0.
|
|
54
|
+
"@audio/noise-estimate": "^2.0.0",
|
|
55
|
+
"@audio/denoise-spectral": "^0.2.0",
|
|
56
|
+
"@audio/denoise-wiener": "^0.2.0",
|
|
57
|
+
"@audio/denoise-omlsa": "^0.2.0",
|
|
58
|
+
"@audio/denoise-dehum": "^0.2.0",
|
|
59
59
|
"@audio/denoise-declick": "^0.1.0",
|
|
60
60
|
"@audio/denoise-decrackle": "^0.1.0",
|
|
61
61
|
"@audio/denoise-declip": "^0.1.0",
|
|
62
62
|
"@audio/denoise-dewind": "^0.1.0",
|
|
63
63
|
"@audio/denoise-deplosive": "^0.1.0",
|
|
64
64
|
"@audio/denoise-debreath": "^0.1.0",
|
|
65
|
-
"@audio/denoise-dereverb": "^0.
|
|
66
|
-
"@audio/denoise-detect": "^0.
|
|
65
|
+
"@audio/denoise-dereverb": "^0.2.0",
|
|
66
|
+
"@audio/denoise-detect": "^0.3.0",
|
|
67
67
|
"@audio/dynamics-gate": "^0.1.4",
|
|
68
|
-
"@audio/denoise-repair": "^0.
|
|
68
|
+
"@audio/denoise-repair": "^0.2.0",
|
|
69
69
|
"@audio/quality": "^1.0.0",
|
|
70
|
-
"@audio/stft": "^
|
|
70
|
+
"@audio/stft": "^2.0.0",
|
|
71
71
|
"@audio/denoise-desilence": "^0.1.0",
|
|
72
72
|
"@audio/denoise-dewow": "^0.1.0"
|
|
73
73
|
},
|