@audio/denoise 0.11.0 → 0.11.2
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 +5 -4
- package/members/debleed/audio.d.ts +1 -0
- package/members/debleed/audio.js +1 -0
- package/members/debleed.d.ts +2 -0
- package/members/debleed.js +2 -0
- package/members/debreath/audio.d.ts +1 -0
- package/members/debreath/audio.js +1 -0
- package/members/debreath.d.ts +2 -0
- package/members/debreath.js +2 -0
- package/members/declick/audio.d.ts +1 -0
- package/members/declick/audio.js +1 -0
- package/members/declick.d.ts +2 -0
- package/members/declick.js +2 -0
- package/members/declip/audio.d.ts +1 -0
- package/members/declip/audio.js +1 -0
- package/members/declip.d.ts +2 -0
- package/members/declip.js +2 -0
- package/members/decrackle/audio.d.ts +1 -0
- package/members/decrackle/audio.js +1 -0
- package/members/decrackle.d.ts +2 -0
- package/members/decrackle.js +2 -0
- package/members/dehum/audio.d.ts +1 -0
- package/members/dehum/audio.js +1 -0
- package/members/dehum.d.ts +2 -0
- package/members/dehum.js +2 -0
- package/members/deplosive/audio.d.ts +1 -0
- package/members/deplosive/audio.js +1 -0
- package/members/deplosive.d.ts +2 -0
- package/members/deplosive.js +2 -0
- package/members/dereverb/audio.d.ts +1 -0
- package/members/dereverb/audio.js +1 -0
- package/members/dereverb.d.ts +2 -0
- package/members/dereverb.js +2 -0
- package/members/desilence/audio.d.ts +1 -0
- package/members/desilence/audio.js +1 -0
- package/members/desilence.d.ts +2 -0
- package/members/desilence.js +2 -0
- package/members/desqueak/audio.d.ts +1 -0
- package/members/desqueak/audio.js +1 -0
- package/members/desqueak.d.ts +2 -0
- package/members/desqueak.js +2 -0
- package/members/detect.d.ts +2 -0
- package/members/detect.js +2 -0
- package/members/dewind/audio.d.ts +1 -0
- package/members/dewind/audio.js +1 -0
- package/members/dewind.d.ts +2 -0
- package/members/dewind.js +2 -0
- package/members/dewow/audio.d.ts +1 -0
- package/members/dewow/audio.js +1 -0
- package/members/dewow.d.ts +2 -0
- package/members/dewow.js +2 -0
- package/members/omlsa/audio.d.ts +1 -0
- package/members/omlsa/audio.js +1 -0
- package/members/omlsa.d.ts +2 -0
- package/members/omlsa.js +2 -0
- package/members/repair.d.ts +2 -0
- package/members/repair.js +2 -0
- package/members/spectral/audio.d.ts +1 -0
- package/members/spectral/audio.js +1 -0
- package/members/spectral.d.ts +2 -0
- package/members/spectral.js +2 -0
- package/members/wiener/audio.d.ts +1 -0
- package/members/wiener/audio.js +1 -0
- package/members/wiener.d.ts +2 -0
- package/members/wiener.js +2 -0
- package/package.json +14 -7
package/README.md
CHANGED
|
@@ -71,7 +71,7 @@ classify(data, fs) // → { method,
|
|
|
71
71
|
| `returnPlan` | `false` | Return `{ out, plan }` with classifier scores + chosen method |
|
|
72
72
|
|
|
73
73
|
**Routing, in priority order** (one STFT sweep, frames ≈ 46 ms, hop ¼; over 6 min, 16 spans of it spread across):
|
|
74
|
-
1. **hum → `dehum`**: dehum's own measurement finds a mains series, and the lines it finds, A-weighted (IEC 61672-1), lie within 50 dB of the program's A-weighted level. A lone 60 Hz line 30 dB under a voice is there, and the ear hears 60 Hz 26 dB less than 1 kHz.
|
|
74
|
+
1. **hum → `dehum`**: dehum's own measurement finds a mains series, and the lines it finds, A-weighted (IEC 61672-1), lie within 50 dB of the program's A-weighted level (`HUM_LEVEL`, −50; a series further under goes unheard and is left). A lone 60 Hz line 30 dB under a voice is there, and the ear hears 60 Hz 26 dB less than 1 kHz.
|
|
75
75
|
2. **clicks → `declick`**: over 1 a second (`CLICK_RATE`) of impulses standing 32× out of the AR(30) error's local scale (the median of its 1.5 ms block RMS over ±12 ms, as declick judges), alone: no like of half its size 2.5–40 ms either side (a voice's pulses, creak down to 25 Hz), and no sound 10 dB louder after it than before (a plosive's burst, a note's attack).
|
|
76
76
|
3. **sibilance → `deesser`**: 5–9 kHz over 0.2–2 kHz power over 8.
|
|
77
77
|
4. **noise bed → `omlsa`**: a floor within 25 dB of the program (`BED_SNR`; the program: frames within 40 dB of the loudest), shown in its *pauses* or in *steady bands*. The pauses are runs of 0.15 s or more within 6 dB of the frame level's 10th percentile that hold noise or hold the floor; the bed is their median level. *Noise*: flat and without lines in the bands from 300 Hz. *The floor*: a bed lies under the program all the time, so in each band the pauses sit where the band sinks to over the whole take (its 5th percentile), no further over it than Gaussian noise's own spread puts them (1.645 · 4.34/√(n/1.5) dB over n bins) plus 3 dB for the bed's slow wander (the bands' median), and they hold no partials that come and go (median persistence under 0.1; babble reads 0.04–0.08). A line held through every pause and across the notes, an engine's, a fan's, a mains-like tone, is part of the floor; a quiet passage of music isn't: its notes come and go, and its pauses stand over the floors other passages sink to. *Steady bands*: a band whose quieter half varies no more than twice what Gaussian noise over its bins would, without lines. A line is a band's fine structure (log power less its ±4-bin mean) correlated with the frame N back, which shares no sample: a partial holds its bins, noise draws them anew.
|
|
@@ -184,9 +184,10 @@ Where the hum itself jumps (an edit's splice turns its phase, a level step, hum
|
|
|
184
184
|
- **holds through the pauses**: the frames where all but the lines sits within 6 dB of its 10th percentile, half a second of them at least; it stands 6 dB over its bins' floor in 95 % of them, its level there within 3 dB (90th over 10th percentile). A take whose program never moves 10 dB (90th over 10th percentile) is left: nothing passes over its lines to tell them from notes;
|
|
185
185
|
- **is never gone under the program**: its five bins hold a quarter of its power in the pauses in 90 % of all frames. In a mix the quietest frames can be where the bass plays alone: in the MUSDB18 preview of Grants' "PunchDrunk" a 220 Hz line held 92 % of the pauses, its level within 1.6 dB and its turns' mean resultant length 0.994, and was there in 32 % of the frames;
|
|
186
186
|
- **turns as one line**: between consecutive pauses holding it, the mean resultant length of its phasor's turns is 0.9 at least (their spread under ~0.8 Hz), and its phase breaks off the turn (by over π/3) in 2 % of the transitions at most, across up to a second of the program too. A note struck again on the same pitch starts at a new phase, a kick tuned to it too (van Waterschoot & Moonen's interframe peak persistence, Proc. IEEE 99(2), 2011, a feedback detector's mark, read on the phase rather than the magnitude);
|
|
187
|
-
- stands within 60 dB of the take; under a found mains series, off its harmonics (±0.5 %)
|
|
187
|
+
- stands within 60 dB of the take; under a found mains series, off its harmonics (±0.5 %);
|
|
188
|
+
- **is one source** (0.7.1), the lines kept together one harmonic series: each a whole multiple of a fundamental at the lowest line or an octave under it (a fundamental too faint to stand is missed), within 0.5 cents plus the lines' turn spread. One interference makes one line, or one periodic wave's series (a whine, a fan, a scan); lines off one series held alike through the take are the notes of a held chord, and none goes (equal temperament's fifth sits 1.96 cents off 3:2, its major third 13.7 off 5:4). A chord held under percussion passes every mark above: the hits never pass over its lines, so they hold through every pause, are never gone and turn as lines. 0.7.0 took @audio/chain's triad (220, 277.18, 329.63 Hz at 0.55 peak, a marimba-like hit once a second) whole once the take was tilted +3 dB/octave or more, the tilt lifting the hits until the program came and went 12–30 dB; of 1344 such takes (2–4 notes, sines or partials 1–6, under that hit, a snare or a kick 24 dB under the chord's peak to level with it, tilted 0–9 dB/octave, 4–16 s), 0.7.0 found lines in 938, 0.7.1 in none. A whine found in part still reads as one: under speech its fundamental can be missed while its 2nd–4th harmonics stand, a fundamental an octave under the 2nd; one whose 3rd and 4th alone stand would be left (of 120 takes of a whine with harmonics 1–4, at 180.3, 1234.5 and 4100 Hz, 10–50 dB under VoiceBank speech, every set of lines found reads as one series).
|
|
188
189
|
|
|
189
|
-
Each is subtracted as a harmonic is: its frequency read from its turn, its phasor per 80 ms Hann frame, weighted by the program's power around it, bridged through the program by Rauch–Tung–Striebel at the likeliest rate of drift (up to a turn of ~0.1 rad a frame: a whine wandering ±0.3 Hz), resynthesized and taken out. What goes of the program is what lies within a fraction of a hertz of the line. A note held through the whole take, struck before it starts and released after it ends, under a melody, is a tone by every mark the take offers and goes (the synthetic drone below); a tone switched on or off inside the take is left, as is one that glides.
|
|
190
|
+
Each is subtracted as a harmonic is: its frequency read from its turn, its phasor per 80 ms Hann frame, weighted by the program's power around it, bridged through the program by Rauch–Tung–Striebel at the likeliest rate of drift (up to a turn of ~0.1 rad a frame: a whine wandering ±0.3 Hz), resynthesized and taken out. What goes of the program is what lies within a fraction of a hertz of the line. A note held through the whole take, struck before it starts and released after it ends, under a melody, is a tone by every mark the take offers and goes (the synthetic drone below), as do two notes an octave apart or a just fifth, one series; a chord in equal temperament is left; a tone switched on or off inside the take is left, as is one that glides, and two unrelated tones found together (off one series, as a chord's notes are).
|
|
190
191
|
|
|
191
192
|
Measured by `node scripts/tones.mjs` (`case`, `synth`, `music`, `speech`; thresholds chosen on its tune split: VoiceBank's training speakers, the odd-numbered VocalSet singers, every third MUSDB18 training preview, odd BabySlakh mixes, GuitarSet; then read once on the test split, below). Test.js's steady line, audio-lena's first 4 s with a 7 kHz sine at 0.3 and white noise at 0.01: speech SNR −3.8 dB as 0.6 leaves it (and `denoise()` routed it to `none`); 22.8 dB through `dehum` (with the line gone exactly, the noise alone leaves 22.8); 24.2 then through `wiener`, where a notch at 7 kHz, told, then `wiener` reaches 23.8. Tones under VoiceBank+DEMAND's test speakers (4 clips of 4 utterances, ~10–14 s), by phase inversion; tone down / speech SDR, dB, the mean over the clips where found, against a notch (Q 30) told each frequency:
|
|
192
193
|
|
|
@@ -200,7 +201,7 @@ Measured by `node scripts/tones.mjs` (`case`, `synth`, `music`, `speech`; thresh
|
|
|
200
201
|
| 12 kHz | 57.8 / 79.1 (4) | 76.9 / 84.8 (4) | 76.5 / 92.9 (4) | 41.8 / 41.9 |
|
|
201
202
|
| 15.734 kHz | 57.5 / 82.7 (4) | 72.3 / 86.0 (4) | 81.0 / 92.6 (4) | 41.2 / 47.4 |
|
|
202
203
|
|
|
203
|
-
A whine at 1234.5 Hz with harmonics 2–4, 20 dB under: 84.9 / 66.8 (notch 34.6 / 21.6); a 3 kHz tone wandering ±0.3 Hz: 33.5 / 55.2 (36.7 / 31.3); a 2 kHz tone switched on halfway: left. Held notes, nothing added: 15 synthetic takes (organ chords with rests, held sines, a pedal held 85 % of the take under a melody, strings with vibrato, piano), 62 VocalSet long tones (straight, messa, pp, forte, trill, trillo, inhaled), 50 MUSDB18 test previews, 10 BabySlakh mixes, 7 GuitarSet takes and the four pieces: none changed by the tones (one VocalSet take, `f8_long_inhaled_a`, changed by the hum lines as 0.6 changes it, bit for bit); on the tune split, 142 takes, none. A drone held from the first sample to the last under a melody goes, 56 dB of it. VoiceBank+DEMAND test set: of 824 clean utterances none changed, of 824 noisy one (`p232_381`, the bus noise's 38.2 Hz engine line, PESQ 2.211 → 2.204); `denoise()` routes every utterance as before, PESQ 2.30 → 2.30 (that utterance 2.292 → 2.290). Tune split, of 504: one changed (`p228_229`, the metro noise's 2374.6 Hz whine; through `denoise()` 2.472 → 2.491).
|
|
204
|
+
A whine at 1234.5 Hz with harmonics 2–4, 20 dB under: 84.9 / 66.8 (notch 34.6 / 21.6); a 3 kHz tone wandering ±0.3 Hz: 33.5 / 55.2 (36.7 / 31.3); a 2 kHz tone switched on halfway: left. Held notes, nothing added: 15 synthetic takes (organ chords with rests, held sines, a pedal held 85 % of the take under a melody, strings with vibrato, piano), 62 VocalSet long tones (straight, messa, pp, forte, trill, trillo, inhaled), 50 MUSDB18 test previews, 10 BabySlakh mixes, 7 GuitarSet takes and the four pieces: none changed by the tones (one VocalSet take, `f8_long_inhaled_a`, changed by the hum lines as 0.6 changes it, bit for bit); on the tune split, 142 takes, none. A drone held from the first sample to the last under a melody goes, 56 dB of it. Held chords under percussion (24 a split since 0.7.1: 2–4 notes, sines or partials 1–6, under a tonal hit, a snare or a kick, tilted 0–9 dB/octave, 4–16 s): 0.7.0's tones changed 20 of the test split's and 21 of the tune split's, 0.7.1's none; 3 and 2 change by the hum lines as 0.6 changes them, bit for bit, a partial on a mains harmonic in a take with no pause (F at 349.23 Hz, 7 × 49.89; A2's fifth partial, 550 Hz, 11 × 50). VoiceBank+DEMAND test set: of 824 clean utterances none changed, of 824 noisy one (`p232_381`, the bus noise's 38.2 Hz engine line, PESQ 2.211 → 2.204); `denoise()` routes every utterance as before, PESQ 2.30 → 2.30 (that utterance 2.292 → 2.290). Tune split, of 504: one changed (`p228_229`, the metro noise's 2374.6 Hz whine; through `denoise()` 2.472 → 2.491).
|
|
204
205
|
|
|
205
206
|
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:
|
|
206
207
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-debleed/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-debleed/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-debreath/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-debreath/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-declick/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-declick/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-declip/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-declip/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-decrackle/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-decrackle/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-dehum/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-dehum/audio'
|
package/members/dehum.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-deplosive/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-deplosive/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-dereverb/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-dereverb/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-desilence/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-desilence/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-desqueak/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-desqueak/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-dewind/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-dewind/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-dewow/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-dewow/audio'
|
package/members/dewow.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-omlsa/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-omlsa/audio'
|
package/members/omlsa.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-spectral/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-spectral/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-wiener/audio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@audio/denoise-wiener/audio'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@audio/denoise",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"type": "module",
|
|
5
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,
|
|
@@ -9,17 +9,24 @@
|
|
|
9
9
|
"types": "./index.d.ts",
|
|
10
10
|
"default": "./index.js"
|
|
11
11
|
},
|
|
12
|
-
"./package.json": "./package.json"
|
|
12
|
+
"./package.json": "./package.json",
|
|
13
|
+
"./*": {
|
|
14
|
+
"types": "./members/*.d.ts",
|
|
15
|
+
"default": "./members/*.js"
|
|
16
|
+
}
|
|
13
17
|
},
|
|
14
18
|
"files": [
|
|
15
19
|
"index.js",
|
|
16
|
-
"*.d.ts"
|
|
20
|
+
"*.d.ts",
|
|
21
|
+
"members/"
|
|
17
22
|
],
|
|
18
23
|
"scripts": {
|
|
19
24
|
"test": "node test.js",
|
|
20
25
|
"test:all": "npm test --workspaces --if-present && npm test",
|
|
21
26
|
"measure": "node scripts/measure.js",
|
|
22
|
-
"publish:all": "npm publish --workspaces && npm publish"
|
|
27
|
+
"publish:all": "npm publish --workspaces && npm publish",
|
|
28
|
+
"members": "node scripts/members.js",
|
|
29
|
+
"prepublishOnly": "node scripts/members.js --check"
|
|
23
30
|
},
|
|
24
31
|
"repository": {
|
|
25
32
|
"type": "git",
|
|
@@ -55,15 +62,15 @@
|
|
|
55
62
|
"@audio/denoise-spectral": "^0.3.0",
|
|
56
63
|
"@audio/denoise-wiener": "^0.4.0",
|
|
57
64
|
"@audio/denoise-omlsa": "^0.6.0",
|
|
58
|
-
"@audio/denoise-dehum": "^0.7.
|
|
65
|
+
"@audio/denoise-dehum": "^0.7.1",
|
|
59
66
|
"@audio/denoise-declick": "^0.4.0",
|
|
60
67
|
"@audio/denoise-decrackle": "^0.4.0",
|
|
61
|
-
"@audio/denoise-declip": "^0.5.
|
|
68
|
+
"@audio/denoise-declip": "^0.5.1",
|
|
62
69
|
"@audio/denoise-dewind": "^0.4.0",
|
|
63
70
|
"@audio/denoise-deplosive": "^0.3.0",
|
|
64
71
|
"@audio/denoise-debreath": "^0.4.0",
|
|
65
72
|
"@audio/denoise-dereverb": "^0.6.0",
|
|
66
|
-
"@audio/denoise-detect": "^0.7.
|
|
73
|
+
"@audio/denoise-detect": "^0.7.1",
|
|
67
74
|
"@audio/dynamics-gate": "^0.1.4",
|
|
68
75
|
"@audio/denoise-repair": "^0.4.0",
|
|
69
76
|
"@audio/quality": "^1.0.0",
|