@audio/denoise 0.12.1 → 0.12.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.
Files changed (2) hide show
  1. package/README.md +3 -1
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -74,13 +74,15 @@ classify(data, fs) // → { method,
74
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
- 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.
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. A take has pauses where it stops: one whose loudest frame stands less than 6 dB over its quietest tenth (the pause band's own 6 dB) never stops, and its quietest frames are its program (a test tone, a chord held through, a sweep, a noise alone), so the steady bands alone read its bed. Digital silence beside the program (a lead-in of zeros, zeros between phrases, a gate's closed stretches) is no pause of it: frames 80 dB under the loudest count for nothing, and the pauses that hold the bed read it as they do without the zeros. *Noise*: flat, in the bands from 300 Hz, and without lines but those it holds through the take: a band's persistence less its persistence a second on, between pause frames that far apart, where the band draws the rest of its bins anew. A bed's own lines (radio static's, a carrier's, a fan's) hold their bins a second on as from frame to frame; a voice's or a passage's partials have moved, and a held note's pauses are its partials, not flat. A band held within 0.05 of 1, as noise is within 0.05 of 0 (the bound set by that symmetry alone), draws nothing anew: it holds a line alone and its leakage, no bed. An archival radio transmission, its static 7 dB under the voice with lines at 345, 517 and 861 Hz, read no bed while every line counted against it; a tone stepping 20 dB down over nothing read one 17 dB under while a line alone passed for noise with its own lines. *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; held through the take, it correlates as well with the frame a second back.
78
78
  5. **wind → `dewind`**: in over a tenth of the 0.15 s blocks, the low end (< 200 Hz) within 20 dB of the program, 6 dB over the 300–2000 Hz band, and without lines, where no bed shows. Wind is turbulence at the microphone, without a period (Nelke & Vary, IWAENC 2014); a bass line or a voice's low end repeats at its pitch.
79
79
  6. **steady tones → `dehum`**: dehum's `tones()` finds lines held through the program's pauses and under it, their phase turning as one line's (a whine, a test tone; see [dehum](#dehum)), A-weighted within 50 dB of the program, as hum is.
80
80
  7. otherwise **`none`**.
81
81
 
82
82
  Where `tones()` finds steady tones and another route is taken (clicks, sibilance, a bed, wind), `dehum` runs first: a gain floored per bin takes a line standing over the bed down by its floor at most (speech, a 7 kHz line at 0.3 and white noise at 0.01: `wiener` alone 10.5 dB SNR, `dehum` then `wiener` 24.2). `force` runs the forced method alone.
83
83
 
84
+ A line alone is no bed. Over 576 takes that hold nothing but lines (`node scripts/tonebed.mjs lines`: sines from 100 Hz to 7 kHz, a chord, a reed; in bursts, at two levels, stepping 20 dB down, fading 30 dB, held, held at −40 dBFS; over digital silence and over a 16-bit file's dither; at 8 to 96 kHz) a bed reads in 138, where 0.7.1 read one in 260 and 0.8.0 in 450, each of the 138 a take both read one in: a line at two levels, stepping down or fading over dither, or fading over digital silence (12), whose quiet end sits at every band's floor and reads as the floor, a fan's lines and all; and 3150 Hz at 8 kHz or 7 kHz at 16 kHz held over dither, past the top band's edge (the bands stop short of fs/2 by up to half an octave), where the program is out of their sight. Under the tones of `matrix` (1 kHz, a chord, a sweep, a reed), white Gaussian noise 20, 30 and 40 dB down reads within 1.7 dB of its level, a bed at 20 dB and none at 30 or 40, as before (under 300 Hz bursts 1.3 to 2.7 dB under at 20 and 30 dB: their program holds the bed between them). On `scripts/detect.js`'s material (`compare`: 2121 tuning items, 3110 test) no method changes and no bed reading moves.
85
+
84
86
  Every bed goes to `omlsa`, and a bed outranks wind, by what each reducer made of the noisy speech the router sends them (`node scripts/detect.js tune reduce`, `python scripts/detect.py score tune`; PESQ wideband, STOI, DNSMOS SIG at 16 kHz as `scripts/speech.py` scores):
85
87
 
86
88
  | noise (takes) | PESQ: noisy · `wiener` · `omlsa` · `dewind` | STOI, the same | SIG, the same |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@audio/denoise",
3
- "version": "0.12.1",
3
+ "version": "0.12.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,
@@ -70,7 +70,7 @@
70
70
  "@audio/denoise-deplosive": "^0.4.0",
71
71
  "@audio/denoise-debreath": "^0.4.0",
72
72
  "@audio/denoise-dereverb": "^0.6.0",
73
- "@audio/denoise-detect": "^0.8.0",
73
+ "@audio/denoise-detect": "^0.8.1",
74
74
  "@audio/dynamics-gate": "^0.1.4",
75
75
  "@audio/denoise-repair": "^0.4.0",
76
76
  "@audio/quality": "^1.0.0",