@audio/denoise 0.3.4 → 0.3.5

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 (3) hide show
  1. package/README.md +2 -2
  2. package/index.js +37 -2
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -135,7 +135,7 @@ deplosive(data, { triggerRatio: 4, attack: 0.005, release: 0.08 })
135
135
 
136
136
  ### `deesser`
137
137
 
138
- 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.
138
+ 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. Backed by [`@audio/dynamics-deesser`](https://github.com/audiojs/dynamics) `mode: 'band'` since the 2026-07 near-dupe merge — same seconds-based options here.
139
139
 
140
140
  ```js
141
141
  deesser(data, { freq: 6500, threshold: -28, ratio: 4 })
@@ -292,7 +292,7 @@ dereverb(data, { t60: 0.6, predelay: 0.04 })
292
292
 
293
293
  ### `gate`
294
294
 
295
- Look-ahead noise gate with hysteresis.
295
+ Look-ahead noise gate with hysteresis. Backed by [`@audio/dynamics-gate`](https://github.com/audiojs/dynamics) since the 2026-07 near-dupe merge — same seconds-based options here; `closeThreshold` (default `threshold − 6` dB) sets the hysteresis close level.
296
296
 
297
297
  ```js
298
298
  gate(data, { threshold: -45, attack: 0.005, release: 0.1, hold: 0.05, lookahead: 0.005 })
package/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  // @audio/denoise — noise reduction & restoration umbrella re-exporting every @audio/denoise-* atom.
2
2
  // For smaller bundles, depend directly on the individual atom.
3
3
 
4
- export { default as gate } from '@audio/denoise-gate'
4
+ import gate_ from '@audio/dynamics-gate'
5
+ import deesser_ from '@audio/dynamics-deesser'
6
+
5
7
  export { default as dehum } from '@audio/denoise-dehum'
6
8
  export { default as specsub } from '@audio/denoise-spectral'
7
9
  export { default as wiener } from '@audio/denoise-wiener'
@@ -11,7 +13,6 @@ export { default as decrackle } from '@audio/denoise-decrackle'
11
13
  export { default as declip } from '@audio/denoise-declip'
12
14
  export { default as dewind } from '@audio/denoise-dewind'
13
15
  export { default as deplosive } from '@audio/denoise-deplosive'
14
- export { default as deesser } from '@audio/denoise-deesser'
15
16
  export { default as debreath } from '@audio/denoise-debreath'
16
17
  export { default as dereverb } from '@audio/denoise-dereverb'
17
18
  export { default as denoise, classify } from '@audio/denoise-detect'
@@ -21,3 +22,37 @@ export { snr, segSnr, lsd, nrr, speechAttenuation } from '@audio/quality'
21
22
  export { vad, spp, ddSnr } from '@audio/vad'
22
23
  export { noiseProfile, minStats, imcra } from '@audio/noise-estimate'
23
24
  export { stftBatch, stftStream, stftAnalyse } from '@audio/stft'
25
+
26
+ // gate/deesser — @audio/dynamics-{gate,deesser} behind this family's seconds-based,
27
+ // in-place API (2026-07 near-dupe merge: the hysteresis + look-ahead gate lives in
28
+ // dynamics-gate; deesser mode 'band' is the dynamic peaking-EQ architecture this
29
+ // family shipped). Batch shape — for chunked streaming use the dynamics streams.
30
+ export const gate = (data, params = {}) => {
31
+ let th = params.threshold ?? -40
32
+ data.set(gate_(data, {
33
+ sampleRate: params.fs || 44100,
34
+ threshold: th,
35
+ closeThreshold: params.closeThreshold ?? th - 6,
36
+ attack: (params.attack ?? 0.001) * 1000,
37
+ release: (params.release ?? 0.05) * 1000,
38
+ hold: (params.hold ?? 0.01) * 1000,
39
+ range: params.range ?? -80,
40
+ lookahead: (params.lookahead ?? 0.005) * 1000,
41
+ }))
42
+ return data
43
+ }
44
+
45
+ export const deesser = (data, params = {}) => {
46
+ data.set(deesser_(data, {
47
+ sampleRate: params.fs || 44100,
48
+ mode: 'band',
49
+ freq: params.freq ?? 6000,
50
+ q: params.Q ?? 1.4,
51
+ threshold: params.threshold ?? -30,
52
+ ratio: params.ratio ?? 4,
53
+ attack: (params.attack ?? 0.001) * 1000,
54
+ release: (params.release ?? 0.05) * 1000,
55
+ block: params.block,
56
+ }))
57
+ return data
58
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@audio/denoise",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
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,
@@ -57,11 +57,11 @@
57
57
  "@audio/denoise-declip": "^0.1.0",
58
58
  "@audio/denoise-dewind": "^0.1.0",
59
59
  "@audio/denoise-deplosive": "^0.1.0",
60
- "@audio/denoise-deesser": "^0.1.0",
61
60
  "@audio/denoise-debreath": "^0.1.0",
62
61
  "@audio/denoise-dereverb": "^0.1.0",
63
- "@audio/denoise-gate": "^0.1.0",
64
62
  "@audio/denoise-detect": "^0.1.0",
63
+ "@audio/dynamics-gate": "^0.1.4",
64
+ "@audio/dynamics-deesser": "^0.2.3",
65
65
  "@audio/denoise-repair": "^0.1.0",
66
66
  "@audio/quality": "^1.0.0",
67
67
  "@audio/stft": "^1.0.3"