@audio/denoise 0.2.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 +372 -0
- package/index.js +22 -0
- package/package.json +82 -0
package/README.md
ADDED
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
# @audio/denoise [](https://www.npmjs.com/package/@audio/denoise) [](LICENSE)
|
|
2
|
+
|
|
3
|
+
Single-pass noise reduction. 13 specialised methods + an auto-classifier.
|
|
4
|
+
|
|
5
|
+
| | Domain | Targets | Quality | CPU | Best for |
|
|
6
|
+
|---|---|---|---|---|---|
|
|
7
|
+
| [denoise](#denoise) | meta | auto | — | varies | "just clean it" |
|
|
8
|
+
| [gate](#gate) | time | silence | ★ | very low | hard cut at threshold |
|
|
9
|
+
| [dehum](#dehum) | time | mains hum | ★★★★ | very low | 50/60 Hz + harmonics |
|
|
10
|
+
| [specsub](#specsub) | freq | broadband stationary | ★★ | medium | baseline |
|
|
11
|
+
| [wiener](#wiener) | freq | broadband stationary | ★★★ | medium | general broadband |
|
|
12
|
+
| [omlsa](#omlsa) | freq | broadband non-stationary | ★★★★ | high | speech in changing noise |
|
|
13
|
+
| [declick](#declick) | time | impulses | ★★★★ | medium | vinyl pops, edit clicks |
|
|
14
|
+
| [decrackle](#decrackle) | time | dense impulses | ★★★ | medium | shellac crackle |
|
|
15
|
+
| [declip](#declip) | time | hard clipping | ★★★ | medium | restoration |
|
|
16
|
+
| [dewind](#dewind) | time | LF rumble | ★★★ | very low | wind, handling noise |
|
|
17
|
+
| [deplosive](#deplosive) | time | LF bursts | ★★★ | low | mic plosives (p, b) |
|
|
18
|
+
| [deesser](#deesser) | time | sibilance | ★★★★ | low | voice (s, sh) |
|
|
19
|
+
| [debreath](#debreath) | time | inter-word noise | ★★★ | low | breath / hiss in pauses |
|
|
20
|
+
| [dereverb](#dereverb) | freq | late reverb | ★★ | medium | moderate room reverb |
|
|
21
|
+
|
|
22
|
+
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).
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
npm install @audio/denoise
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```js
|
|
32
|
+
import { denoise, dehum, wiener, declick } from '@audio/denoise'
|
|
33
|
+
|
|
34
|
+
let cleaned = denoise(samples) // auto-classify + dispatch
|
|
35
|
+
let unhummed = dehum(samples, { freq: 60 }) // explicit method
|
|
36
|
+
let { out, plan } = denoise(samples, { returnPlan: true }) // see what was chosen
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```js
|
|
40
|
+
// Streaming — pass options first, then call repeatedly with chunks.
|
|
41
|
+
let write = wiener({ fs: 48000 })
|
|
42
|
+
write(block1)
|
|
43
|
+
write(block2)
|
|
44
|
+
write() // → flush remaining samples
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
> Mono `Float32Array` in/out. State lives on the `params` object; pass the same one across calls and biquad memory / spectral history persists. For stereo, process channels independently.
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## `denoise`
|
|
51
|
+
|
|
52
|
+
Content-aware auto-selector. Runs a single STFT classification sweep over the input and dispatches to the most suitable method.
|
|
53
|
+
|
|
54
|
+
```js
|
|
55
|
+
denoise(data) // → cleaned Float32Array
|
|
56
|
+
denoise(data, { returnPlan: true }) // → { out, plan }
|
|
57
|
+
denoise(data, { force: 'wiener' }) // skip classifier
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
| Param | Default | |
|
|
61
|
+
|---|---|---|
|
|
62
|
+
| `fs` | `44100` | Sample rate |
|
|
63
|
+
| `force` | — | One of `'dehum' \| 'declick' \| 'dewind' \| 'deesser' \| 'dereverb' \| 'omlsa' \| 'wiener'` |
|
|
64
|
+
| `returnPlan` | `false` | Return `{ out, plan }` with classifier scores + chosen method |
|
|
65
|
+
|
|
66
|
+
**Routing (in priority order):**
|
|
67
|
+
1. tonal hum (Goertzel — ≥2 of first 3 harmonics show 50× line/off-line ratio at 50 or 60 Hz)
|
|
68
|
+
2. impulses (excess kurtosis of AR residual > 12)
|
|
69
|
+
3. sibilance (high/mid band power ratio > 8)
|
|
70
|
+
4. LF rumble (low/mid band power ratio > 3)
|
|
71
|
+
5. non-stationary noise (frame-energy CV > 0.6) → omlsa
|
|
72
|
+
6. otherwise → wiener
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
## Tonal & narrowband
|
|
76
|
+
|
|
77
|
+
### `dehum`
|
|
78
|
+
|
|
79
|
+
Cascade of high-Q biquad notches at the fundamental + harmonics.
|
|
80
|
+
|
|
81
|
+
```js
|
|
82
|
+
dehum(data, { freq: 60, harmonics: 4 })
|
|
83
|
+
dehum(data, { freq: 50, adaptive: true, drift: 0.5 }) // tracks slow mains drift
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
| Param | Default | |
|
|
87
|
+
|---|---|---|
|
|
88
|
+
| `freq` | `50` | Fundamental (Hz) |
|
|
89
|
+
| `harmonics` | `4` | Number of notches placed |
|
|
90
|
+
| `Q` | `30` | Notch sharpness — higher = narrower |
|
|
91
|
+
| `adaptive` | `false` | Goertzel sweep refines `freq` ± `drift` Hz |
|
|
92
|
+
|
|
93
|
+
**Use when:** mains buzz, ground-loop hum, fixed tonal interference.<br>
|
|
94
|
+
**Not for:** broadband noise (use `wiener`/`omlsa`); shifting tones (use spectral methods).
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
### `dewind`
|
|
98
|
+
|
|
99
|
+
Adaptive high-pass. Cutoff slides between `cutoffMin` and `cutoffMax` based on the LF/MF energy ratio.
|
|
100
|
+
|
|
101
|
+
```js
|
|
102
|
+
dewind(data, { cutoffMin: 60, cutoffMax: 200 })
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
| Param | Default | |
|
|
106
|
+
|---|---|---|
|
|
107
|
+
| `cutoffMin` | `60` | Hz — minimum cutoff (LF mostly clean) |
|
|
108
|
+
| `cutoffMax` | `200` | Hz — maximum cutoff (heavy rumble) |
|
|
109
|
+
| `Q` | `0.707` | Butterworth-ish |
|
|
110
|
+
| `block` | `512` | Coefficient update interval (samples) |
|
|
111
|
+
|
|
112
|
+
**Use when:** wind buffeting, handheld-mic rumble, low-frequency room modes.
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
### `deplosive`
|
|
116
|
+
|
|
117
|
+
Splits the signal into LF (`<200 Hz`) and HF bands; ducks the LF band when it spikes relative to HF (a plosive signature).
|
|
118
|
+
|
|
119
|
+
```js
|
|
120
|
+
deplosive(data, { ratio: 0.2, attack: 0.005, release: 0.05 })
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Use when:** mic plosives (`p`, `b`, `t`) producing low-frequency thuds.
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
### `deesser`
|
|
127
|
+
|
|
128
|
+
Dynamic peaking EQ centred on the sibilance band. Detection runs on a HP side-chain; when the envelope exceeds threshold, a negative-gain peaking EQ at `freq` engages on the audio path. Re-computed every `block` samples for smooth gain riding.
|
|
129
|
+
|
|
130
|
+
```js
|
|
131
|
+
deesser(data, { freq: 6500, threshold: -28, ratio: 4 })
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
| Param | Default | |
|
|
135
|
+
|---|---|---|
|
|
136
|
+
| `freq` | `6000` | Sibilance centre (Hz) |
|
|
137
|
+
| `threshold` | `-30` | dBFS — engagement level |
|
|
138
|
+
| `ratio` | `4` | Compression ratio above threshold |
|
|
139
|
+
| `attack` | `0.001` | s |
|
|
140
|
+
| `release` | `0.05` | s |
|
|
141
|
+
| `Q` | `1.4` | Peaking EQ Q |
|
|
142
|
+
|
|
143
|
+
**Use when:** voice post-production with hot s/sh; vocal bus de-essing.
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
## Broadband & spectral
|
|
147
|
+
|
|
148
|
+
### `specsub`
|
|
149
|
+
|
|
150
|
+
Berouti spectral subtraction (1979). Estimates noise from the first `noiseFrames` and subtracts `α·N̂(k)` from each magnitude frame, with a `β·|Y(k)|` floor.
|
|
151
|
+
|
|
152
|
+
```js
|
|
153
|
+
specsub(data, { alpha: 2, beta: 0.01, noiseFrames: 6 })
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Use when:** quick baseline; offline cleanup with a known noise-only preamble.<br>
|
|
157
|
+
**Not for:** musical-noise-sensitive material — use `wiener` or `omlsa`.
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
### `wiener`
|
|
161
|
+
|
|
162
|
+
MMSE Wiener / log-MMSE (Ephraim-Malah 1984/1985) with decision-directed a-priori SNR.
|
|
163
|
+
|
|
164
|
+
```js
|
|
165
|
+
wiener(data, { rule: 'mmse-lsa', alpha: 0.98 })
|
|
166
|
+
wiener(data) // defaults: 'wiener' rule
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
| Param | Default | |
|
|
170
|
+
|---|---|---|
|
|
171
|
+
| `rule` | `'wiener'` | `'wiener'` or `'mmse-lsa'` (log-spectral, less musical noise) |
|
|
172
|
+
| `alpha` | `0.98` | Decision-directed smoothing |
|
|
173
|
+
| `frameSize` | `1024` | STFT frame |
|
|
174
|
+
| `hopSize` | `frameSize/4` | OLA hop |
|
|
175
|
+
| `noiseFrames` | `6` | Initial noise-only frames for PSD bootstrap |
|
|
176
|
+
|
|
177
|
+
**Use when:** transparent broadband denoise; the "safe default" for stationary noise.
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
### `omlsa`
|
|
181
|
+
|
|
182
|
+
Optimally-Modified Log-Spectral Amplitude estimator (Cohen 2002) driven by IMCRA noise tracking. Combines an LSA gain with a minimum-gain floor weighted by speech presence probability:
|
|
183
|
+
`G = G_LSA^p · G_min^(1-p)`.
|
|
184
|
+
|
|
185
|
+
```js
|
|
186
|
+
omlsa(data)
|
|
187
|
+
omlsa(data, { gMinDb: -25 }) // less aggressive floor
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
| Param | Default | |
|
|
191
|
+
|---|---|---|
|
|
192
|
+
| `gMinDb` | `-25` | dB floor for non-speech bins |
|
|
193
|
+
| `alpha` | `0.92` | Decision-directed smoothing |
|
|
194
|
+
| `frameSize` | `1024` | |
|
|
195
|
+
| `hopSize` | `frameSize/4` | |
|
|
196
|
+
|
|
197
|
+
**Use when:** speech in non-stationary noise (street, café, car); generally the highest-quality choice for noisy speech.
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
## Impulses
|
|
201
|
+
|
|
202
|
+
### `declick`
|
|
203
|
+
|
|
204
|
+
Detects impulses as AR-residual outliers (`> threshold·σ`); replaces each click region with an AR-LS interpolation (Janssen 1986 / Godsill-Rayner 1998).
|
|
205
|
+
|
|
206
|
+
```js
|
|
207
|
+
declick(data, { threshold: 4, order: 50 })
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
| Param | Default | |
|
|
211
|
+
|---|---|---|
|
|
212
|
+
| `threshold` | `4` | σ-multiple for click detection |
|
|
213
|
+
| `order` | `50` | AR model order |
|
|
214
|
+
| `pad` | `2` | Extra samples on each side of the detected click |
|
|
215
|
+
| `maxGap` | `order` | Maximum gap to interpolate (longer → skipped) |
|
|
216
|
+
|
|
217
|
+
**Use when:** vinyl pops, edit clicks, occasional impulse noise.<br>
|
|
218
|
+
**Not for:** dense crackle (use `decrackle`); long dropouts (use `arInterpolate` directly).
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
### `decrackle`
|
|
222
|
+
|
|
223
|
+
Continuous AR-residual outlier detection with MAD-based threshold. Suited to high-rate impulse noise.
|
|
224
|
+
|
|
225
|
+
```js
|
|
226
|
+
decrackle(data, { madThreshold: 4 })
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
**Use when:** shellac / 78 RPM crackle; persistent low-amplitude clicks.
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
### `declip`
|
|
233
|
+
|
|
234
|
+
Detects runs of samples at ±`clipLevel`, fits AR on the un-clipped neighbourhood, extrapolates a sign-constrained interpolation.
|
|
235
|
+
|
|
236
|
+
```js
|
|
237
|
+
declip(data, { clipLevel: 0.95 }) // explicit threshold
|
|
238
|
+
declip(data) // auto-detects clip level
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
| Param | Default | |
|
|
242
|
+
|---|---|---|
|
|
243
|
+
| `clipLevel` | auto | Detected from histogram of \|x\| > 0.5 |
|
|
244
|
+
| `order` | `100` | AR model order |
|
|
245
|
+
| `maxRun` | `order/2` | Longest run that gets restored |
|
|
246
|
+
|
|
247
|
+
**Use when:** hard digital clipping with short clip runs.<br>
|
|
248
|
+
**Not for:** sustained clipping covering many cycles (use sparsity-based methods).
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
## Reverb
|
|
252
|
+
|
|
253
|
+
### `dereverb`
|
|
254
|
+
|
|
255
|
+
Late-reverb spectral subtraction (Lebart, Boucher & Denbigh 2001). Models the late tail as exponentially decaying noise:
|
|
256
|
+
`|R̂(k)|² ≈ exp(-2·δ·t·hop) · |Y_prev(k)|²` and subtracts à la Berouti.
|
|
257
|
+
|
|
258
|
+
```js
|
|
259
|
+
dereverb(data, { t60: 0.6, predelay: 0.04 })
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
| Param | Default | |
|
|
263
|
+
|---|---|---|
|
|
264
|
+
| `t60` | `0.5` | Assumed reverberation time (s) |
|
|
265
|
+
| `predelay` | `0.04` | Direct-sound passthrough (s) |
|
|
266
|
+
| `alpha` | `1.5` | Over-subtraction factor |
|
|
267
|
+
| `beta` | `0.05` | Spectral floor |
|
|
268
|
+
|
|
269
|
+
**Use when:** moderate room reverb (RT60 ≤ 1 s) on a single channel.<br>
|
|
270
|
+
**Not for:** heavy reverb or convolutive distortion — use multi-channel WPE (out of scope).
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
## Gates & inter-word
|
|
274
|
+
|
|
275
|
+
### `gate`
|
|
276
|
+
|
|
277
|
+
Look-ahead noise gate with hysteresis.
|
|
278
|
+
|
|
279
|
+
```js
|
|
280
|
+
gate(data, { threshold: -45, attack: 0.005, release: 0.1, hold: 0.05, lookahead: 0.005 })
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
**Use when:** silence enforcement; aggressive cut between phrases.<br>
|
|
284
|
+
**Not for:** continuous denoise — use `wiener`/`omlsa`.
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
### `debreath`
|
|
288
|
+
|
|
289
|
+
VAD-driven inverse gate. Uses energy + spectral flatness with a percentile-based noise floor; attenuates frames classified as non-speech with smooth attack/release.
|
|
290
|
+
|
|
291
|
+
```js
|
|
292
|
+
debreath(data, { reduction: 0.3 }) // -10 dB on non-speech
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
**Use when:** breath, mouth noise, hiss in pauses on a voiceover.
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
## Quality measurement
|
|
299
|
+
|
|
300
|
+
```js
|
|
301
|
+
import { snr, segSnr, lsd, nrr, speechAttenuation } from '@audio/denoise'
|
|
302
|
+
|
|
303
|
+
snr(reference, processed) // global SNR (dB)
|
|
304
|
+
segSnr(reference, processed) // segmental SNR (dB)
|
|
305
|
+
lsd(reference, processed) // log-spectral distance
|
|
306
|
+
nrr(noisyInput, processed) // noise reduction ratio
|
|
307
|
+
speechAttenuation(reference, processed) // dB lost on speech segments
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
| Metric | Higher is better | What it captures |
|
|
311
|
+
|---|---|---|
|
|
312
|
+
| `snr` | ✓ | Energy ratio reference / error |
|
|
313
|
+
| `segSnr` | ✓ | Time-localised SNR — better correlates with perception |
|
|
314
|
+
| `lsd` | ✗ | Mean log-magnitude error per bin |
|
|
315
|
+
| `nrr` | ✓ | Floor reduction in non-speech regions |
|
|
316
|
+
| `speechAttenuation` | ✗ | Loss of speech energy (over-aggressive denoising) |
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
## Lower-level building blocks
|
|
320
|
+
|
|
321
|
+
```js
|
|
322
|
+
import { stftBatch, stftStream, stftAnalyse } from '@audio/denoise'
|
|
323
|
+
import { vad, spp, ddSnr } from '@audio/denoise'
|
|
324
|
+
import { noiseProfile, minStats, imcra } from '@audio/denoise'
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
- **`stft*`** — analysis-modification-synthesis with Hann + ∑win² OLA reconstruction. Visit `(mag, phase, state, ctx) => { mag, phase }`.
|
|
328
|
+
- **`vad`** — frame-level activity (energy + spectral flatness, percentile floor).
|
|
329
|
+
- **`spp`** — per-bin Speech Presence Probability under Gaussian model.
|
|
330
|
+
- **`ddSnr`** — decision-directed a-priori SNR (Ephraim-Malah).
|
|
331
|
+
- **`noiseProfile`** — average PSD over leading frames.
|
|
332
|
+
- **`minStats`** — Martin (2001) minimum-statistics noise PSD tracker.
|
|
333
|
+
- **`imcra`** — Cohen (2003) Improved Minima-Controlled Recursive Averaging — drives `omlsa`.
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
## Measurements
|
|
337
|
+
|
|
338
|
+
`npm run measure` produces a Markdown table of SNR / segSNR / LSD / NRR per method on canonical scenarios. Headline numbers on the included `audio-lena` fixture (8 s mono speech, 44.1 kHz):
|
|
339
|
+
|
|
340
|
+
| scenario | SNR-in | best method | SNR-out | NRR | ms |
|
|
341
|
+
|---|---:|---|---:|---:|---:|
|
|
342
|
+
| 60 Hz hum + harmonics | -5.2 dB | `dehum` | 15.0 dB | 6.3 dB | 5 |
|
|
343
|
+
| white noise (~13 dB SNR) | 13.2 dB | `wiener` | 19.8 dB | 0.3 dB | 82 |
|
|
344
|
+
| clicks (vinyl-style) | 24.1 dB | `declick` | 44.1 dB | — | 462 |
|
|
345
|
+
| 7 kHz sibilance | 2.0 dB | `deesser` | 9.5 dB | 1.9 dB | 5 |
|
|
346
|
+
|
|
347
|
+
Higher = better.
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
## Demo
|
|
351
|
+
|
|
352
|
+
`demo.html` is a self-contained browser demo: pick a noise scenario, pick a method (or `auto`), inspect input/output waveforms, hear the difference, and read the live classifier scores.
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
## References
|
|
356
|
+
|
|
357
|
+
- Boll, *Suppression of Acoustic Noise in Speech Using Spectral Subtraction*, IEEE TASSP 1979.
|
|
358
|
+
- Berouti, Schwartz, Makhoul, *Enhancement of Speech Corrupted by Acoustic Noise*, ICASSP 1979.
|
|
359
|
+
- Ephraim & Malah, *Speech Enhancement Using a Minimum Mean-Square Error Short-Time Spectral Amplitude Estimator*, IEEE TASSP 1984.
|
|
360
|
+
- Ephraim & Malah, *Speech Enhancement Using a Minimum Mean-Square Error Log-Spectral Amplitude Estimator*, IEEE TASSP 1985.
|
|
361
|
+
- Martin, *Noise Power Spectral Density Estimation Based on Optimal Smoothing and Minimum Statistics*, IEEE TSAP 2001.
|
|
362
|
+
- Cohen, *Optimal Speech Enhancement Under Signal Presence Uncertainty Using Log-Spectral Amplitude Estimator*, IEEE SPL 2002.
|
|
363
|
+
- Cohen, *Noise Spectrum Estimation in Adverse Environments: Improved Minima Controlled Recursive Averaging*, IEEE TSAP 2003.
|
|
364
|
+
- Janssen, Veldhuis & Vries, *Adaptive Interpolation of Discrete-Time Signals That Can Be Modeled as Autoregressive Processes*, IEEE TASSP 1986.
|
|
365
|
+
- Godsill & Rayner, *Digital Audio Restoration*, Springer 1998.
|
|
366
|
+
- Lebart, Boucher & Denbigh, *A New Method Based on Spectral Subtraction for Speech Dereverberation*, Acta Acustica 2001.
|
|
367
|
+
- RBJ Audio EQ Cookbook (biquad coefficients).
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
## License
|
|
371
|
+
|
|
372
|
+
MIT
|
package/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// @audio/denoise — noise reduction & restoration umbrella re-exporting every @audio/denoise-* atom.
|
|
2
|
+
// For smaller bundles, depend directly on the individual atom.
|
|
3
|
+
|
|
4
|
+
export { default as gate } from '@audio/denoise-gate'
|
|
5
|
+
export { default as dehum } from '@audio/denoise-dehum'
|
|
6
|
+
export { default as specsub } from '@audio/denoise-spectral'
|
|
7
|
+
export { default as wiener } from '@audio/denoise-wiener'
|
|
8
|
+
export { default as omlsa } from '@audio/denoise-omlsa'
|
|
9
|
+
export { default as declick } from '@audio/denoise-declick'
|
|
10
|
+
export { default as decrackle } from '@audio/denoise-decrackle'
|
|
11
|
+
export { default as declip } from '@audio/denoise-declip'
|
|
12
|
+
export { default as dewind } from '@audio/denoise-dewind'
|
|
13
|
+
export { default as deplosive } from '@audio/denoise-deplosive'
|
|
14
|
+
export { default as deesser } from '@audio/denoise-deesser'
|
|
15
|
+
export { default as debreath } from '@audio/denoise-debreath'
|
|
16
|
+
export { default as dereverb } from '@audio/denoise-dereverb'
|
|
17
|
+
export { default as denoise, classify } from '@audio/denoise-detect'
|
|
18
|
+
|
|
19
|
+
export { snr, segSnr, lsd, nrr, speechAttenuation } from '@audio/denoise-core'
|
|
20
|
+
export { vad, spp, ddSnr } from '@audio/denoise-core'
|
|
21
|
+
export { noiseProfile, minStats, imcra } from '@audio/denoise-core'
|
|
22
|
+
export { stftBatch, stftStream, stftAnalyse } from '@audio/denoise-core'
|
package/package.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@audio/denoise",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Noise reduction — gate, spectral subtraction, Wiener, OM-LSA, dehum, declick, decrackle, declip, deesser, dereverb",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./index.js",
|
|
9
|
+
"./package.json": "./package.json"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"index.js"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"test": "node test.js",
|
|
16
|
+
"test:all": "npm test --workspaces --if-present && npm test",
|
|
17
|
+
"measure": "node scripts/measure.js",
|
|
18
|
+
"compare": "node scripts/compare.js",
|
|
19
|
+
"publish:all": "npm publish --workspaces && npm publish"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/audiojs/denoise.git"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"noise-reduction",
|
|
27
|
+
"denoise",
|
|
28
|
+
"dehum",
|
|
29
|
+
"declick",
|
|
30
|
+
"decrackle",
|
|
31
|
+
"declip",
|
|
32
|
+
"deesser",
|
|
33
|
+
"dereverb",
|
|
34
|
+
"spectral-subtraction",
|
|
35
|
+
"wiener",
|
|
36
|
+
"om-lsa",
|
|
37
|
+
"imcra",
|
|
38
|
+
"audio",
|
|
39
|
+
"audiojs",
|
|
40
|
+
"dsp",
|
|
41
|
+
"speech-enhancement",
|
|
42
|
+
"signal-processing"
|
|
43
|
+
],
|
|
44
|
+
"author": "Dmitry Iv. <dfcreative@gmail.com>",
|
|
45
|
+
"license": "MIT",
|
|
46
|
+
"engines": {
|
|
47
|
+
"node": ">=18"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@audio/denoise-core": "^0.1.0",
|
|
51
|
+
"@audio/denoise-spectral": "^0.1.0",
|
|
52
|
+
"@audio/denoise-wiener": "^0.1.0",
|
|
53
|
+
"@audio/denoise-omlsa": "^0.1.0",
|
|
54
|
+
"@audio/denoise-dehum": "^0.1.0",
|
|
55
|
+
"@audio/denoise-declick": "^0.1.0",
|
|
56
|
+
"@audio/denoise-decrackle": "^0.1.0",
|
|
57
|
+
"@audio/denoise-declip": "^0.1.0",
|
|
58
|
+
"@audio/denoise-dewind": "^0.1.0",
|
|
59
|
+
"@audio/denoise-deplosive": "^0.1.0",
|
|
60
|
+
"@audio/denoise-deesser": "^0.1.0",
|
|
61
|
+
"@audio/denoise-debreath": "^0.1.0",
|
|
62
|
+
"@audio/denoise-dereverb": "^0.1.0",
|
|
63
|
+
"@audio/denoise-gate": "^0.1.0",
|
|
64
|
+
"@audio/denoise-detect": "^0.1.0"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"audio-lena": "^3.0.0",
|
|
68
|
+
"playwright": "^1.59.1",
|
|
69
|
+
"tst": "^9.4.0"
|
|
70
|
+
},
|
|
71
|
+
"workspaces": [
|
|
72
|
+
"packages/*"
|
|
73
|
+
],
|
|
74
|
+
"publishConfig": {
|
|
75
|
+
"access": "public"
|
|
76
|
+
},
|
|
77
|
+
"bugs": {
|
|
78
|
+
"url": "https://github.com/audiojs/denoise/issues"
|
|
79
|
+
},
|
|
80
|
+
"homepage": "https://github.com/audiojs/denoise#readme",
|
|
81
|
+
"main": "index.js"
|
|
82
|
+
}
|