@audio/denoise 0.3.9 → 0.3.11

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 +4 -4
  2. package/index.d.ts +51 -0
  3. package/package.json +11 -6
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @audio/denoise [![npm](https://img.shields.io/npm/v/@audio/denoise)](https://www.npmjs.com/package/@audio/denoise) [![license](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
1
+ # @audio/denoise [![npm](https://img.shields.io/npm/v/@audio/denoise)](https://www.npmjs.com/package/@audio/denoise) [![license](https://img.shields.io/badge/license-MIT-green.svg)](https://spdx.org/licenses/MIT.html)
2
2
 
3
3
  Try it in the browser: [Noise remover](https://audiojs.dev/util/denoise/). Runs on this package, nothing is uploaded.
4
4
 
@@ -139,15 +139,15 @@ deplosive(data, { triggerRatio: 4, attack: 0.005, release: 0.08 })
139
139
 
140
140
  ### `deesser`
141
141
 
142
- 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.
142
+ 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 `fc` 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.
143
143
 
144
144
  ```js
145
- deesser(data, { freq: 6500, threshold: -28, ratio: 4 })
145
+ deesser(data, { fc: 6500, threshold: -28, ratio: 4 })
146
146
  ```
147
147
 
148
148
  | Param | Default | |
149
149
  |---|---|---|
150
- | `freq` | `6000` | Sibilance centre (Hz) |
150
+ | `fc` | `6000` | Sibilance centre (Hz; `freq` still accepted) |
151
151
  | `threshold` | `-30` | dBFS — engagement level |
152
152
  | `ratio` | `4` | Compression ratio above threshold |
153
153
  | `attack` | `0.001` | s — how fast the cut engages |
package/index.d.ts ADDED
@@ -0,0 +1,51 @@
1
+ export { default as dehum } from '@audio/denoise-dehum'
2
+ export { default as specsub } from '@audio/denoise-spectral'
3
+ export { default as wiener } from '@audio/denoise-wiener'
4
+ export { default as omlsa } from '@audio/denoise-omlsa'
5
+ export { default as declick } from '@audio/denoise-declick'
6
+ export { default as decrackle } from '@audio/denoise-decrackle'
7
+ export { default as declip } from '@audio/denoise-declip'
8
+ export { default as dewind } from '@audio/denoise-dewind'
9
+ export { default as deplosive } from '@audio/denoise-deplosive'
10
+ export { default as debreath } from '@audio/denoise-debreath'
11
+ export { default as dereverb } from '@audio/denoise-dereverb'
12
+ export { default as denoise, classify, deesser } from '@audio/denoise-detect'
13
+ export { default as repair } from '@audio/denoise-repair'
14
+ export { default as desilence, segments as silenceSegments, split as splitSilence } from '@audio/denoise-desilence'
15
+ export { default as dewow, analyze as wowFlutter } from '@audio/denoise-dewow'
16
+ export { snr, segSnr, lsd, nrr, speechAttenuation } from '@audio/quality'
17
+ export { vad, spp, ddSnr } from '@audio/vad'
18
+ export { noiseProfile, minStats, imcra } from '@audio/noise-estimate'
19
+ export { stftBatch, stftStream, stftAnalyse } from '@audio/stft'
20
+
21
+ export interface GateOptions {
22
+ fs?: number
23
+ /** Threshold and range are in dB; times are in seconds. */
24
+ threshold?: number
25
+ closeThreshold?: number
26
+ attack?: number
27
+ release?: number
28
+ hold?: number
29
+ range?: number
30
+ lookahead?: number
31
+ }
32
+ /** Whole-buffer, in-place adapter; use @audio/dynamics-gate for streaming. */
33
+ export function gate<T extends Float32Array | Float64Array>(data: T, params?: GateOptions): T
34
+ export type { DebreathOptions } from '@audio/denoise-debreath'
35
+ export type { DeclickOptions } from '@audio/denoise-declick'
36
+ export type { DeclipOptions } from '@audio/denoise-declip'
37
+ export type { DecrackleOptions } from '@audio/denoise-decrackle'
38
+ export type { DehumOptions } from '@audio/denoise-dehum'
39
+ export type { DeplosiveOptions } from '@audio/denoise-deplosive'
40
+ export type { DereverbOptions } from '@audio/denoise-dereverb'
41
+ export type { DesilenceOptions, TimeSegment, MapPoint, DesilenceResult, SegmentsResult } from '@audio/denoise-desilence'
42
+ export type { DenoiseMethod, ClassifyScores, Plan, DenoiseOptions, DenoiseResult, DeesserOptions } from '@audio/denoise-detect'
43
+ export type { DewindOptions } from '@audio/denoise-dewind'
44
+ export type { DewowOptions, DewowTrack, DewowAnalysis } from '@audio/denoise-dewow'
45
+ export type { OmlsaOptions } from '@audio/denoise-omlsa'
46
+ export type { RepairRegion, RepairOptions } from '@audio/denoise-repair'
47
+ export type { SpecsubOptions } from '@audio/denoise-spectral'
48
+ export type { WienerOptions } from '@audio/denoise-wiener'
49
+ export type { NoiseProfileOptions, MinStatsOptions, Estimator, ImcraOptions, ImcraEstimator } from '@audio/noise-estimate'
50
+ export type { SegSnrOptions, LsdOptions, SpectralSimOptions, ModulationDepthOptions } from '@audio/quality'
51
+ export type { VadOptions, VadResult, SppOptions } from '@audio/vad'
package/package.json CHANGED
@@ -1,15 +1,19 @@
1
1
  {
2
2
  "name": "@audio/denoise",
3
- "version": "0.3.9",
3
+ "version": "0.3.11",
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,
7
7
  "exports": {
8
- ".": "./index.js",
8
+ ".": {
9
+ "types": "./index.d.ts",
10
+ "default": "./index.js"
11
+ },
9
12
  "./package.json": "./package.json"
10
13
  },
11
14
  "files": [
12
- "index.js"
15
+ "index.js",
16
+ "*.d.ts"
13
17
  ],
14
18
  "scripts": {
15
19
  "test": "node test.js",
@@ -47,7 +51,7 @@
47
51
  },
48
52
  "dependencies": {
49
53
  "@audio/vad": "^1.0.0",
50
- "@audio/noise-estimate": "^1.0.0",
54
+ "@audio/noise-estimate": "^1.0.2",
51
55
  "@audio/denoise-spectral": "^0.1.0",
52
56
  "@audio/denoise-wiener": "^0.1.0",
53
57
  "@audio/denoise-omlsa": "^0.1.0",
@@ -59,7 +63,7 @@
59
63
  "@audio/denoise-deplosive": "^0.1.0",
60
64
  "@audio/denoise-debreath": "^0.1.0",
61
65
  "@audio/denoise-dereverb": "^0.1.0",
62
- "@audio/denoise-detect": "^0.1.0",
66
+ "@audio/denoise-detect": "^0.2.0",
63
67
  "@audio/dynamics-gate": "^0.1.4",
64
68
  "@audio/denoise-repair": "^0.1.0",
65
69
  "@audio/quality": "^1.0.0",
@@ -83,5 +87,6 @@
83
87
  },
84
88
  "homepage": "https://github.com/audiojs/denoise#readme",
85
89
  "main": "index.js",
86
- "funding": "https://github.com/sponsors/audiojs"
90
+ "funding": "https://github.com/sponsors/audiojs",
91
+ "types": "./index.d.ts"
87
92
  }