@audio/denoise-detect 0.2.0 → 0.3.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 +1 -1
- package/denoise.js +3 -1
- package/index.d.ts +4 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ denoise(data, { force: 'wiener' }) // skip classifie
|
|
|
29
29
|
2. impulses: AR(30) residual samples over 12× the residual RMS within ±10 ms and 2× every residual 2.5–15 ms away (a glottal pulse has its like one pitch period off), more than 1 a second (`CLICK_RATE`)
|
|
30
30
|
3. sibilance (high/mid band power ratio > 8)
|
|
31
31
|
4. LF rumble (low/mid band power ratio > 3)
|
|
32
|
-
5. non-stationary noise (frame-energy
|
|
32
|
+
5. non-stationary noise (CV of the rolling-minimum frame-energy floor > 0.3) → omlsa
|
|
33
33
|
6. otherwise → wiener
|
|
34
34
|
|
|
35
35
|
---
|
package/denoise.js
CHANGED
|
@@ -48,7 +48,9 @@ export default function denoise(data, params = {}) {
|
|
|
48
48
|
let opts = { fs, ...params }
|
|
49
49
|
let out
|
|
50
50
|
switch (plan.method) {
|
|
51
|
-
|
|
51
|
+
// the series classify heard; dehum measures its exact frequency and harmonics. Forced without `freq`,
|
|
52
|
+
// dehum measures 50 and 60 Hz itself (a fixed 50 missed 60 Hz mains)
|
|
53
|
+
case 'dehum': out = dehum(new Float32Array(data), { ...opts, freq: params.freq ?? plan.humFreq }); break
|
|
52
54
|
case 'declick': out = declick(new Float32Array(data), opts); break
|
|
53
55
|
case 'dewind': out = dewind(new Float32Array(data), opts); break
|
|
54
56
|
case 'deesser': out = deesser(new Float32Array(data), opts); break
|
package/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export interface ClassifyScores {
|
|
|
6
6
|
hum: number
|
|
7
7
|
/** 50 or 60 */
|
|
8
8
|
humFreq: number
|
|
9
|
-
/**
|
|
9
|
+
/** impulses per second standing out of the AR(30) residual; declick above `CLICK_RATE` */
|
|
10
10
|
click: number
|
|
11
11
|
/** low/mid band power ratio */
|
|
12
12
|
lf: number
|
|
@@ -47,6 +47,9 @@ export default function denoise(data: Float32Array, params: DenoiseOptions & { r
|
|
|
47
47
|
/** Run the classification sweep only (no cleaning). */
|
|
48
48
|
export function classify(data: Float32Array, fs?: number): Plan
|
|
49
49
|
|
|
50
|
+
/** Impulses per second above which classify() routes to declick. */
|
|
51
|
+
export const CLICK_RATE: number
|
|
52
|
+
|
|
50
53
|
export interface DeesserOptions {
|
|
51
54
|
/** sample rate (Hz), default 44100 */
|
|
52
55
|
fs?: number
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@audio/denoise-detect",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "denoise — content-aware auto-selector that classifies the dominant noise type",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
],
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@audio/denoise-wiener": "^0.
|
|
22
|
-
"@audio/denoise-omlsa": "^0.
|
|
23
|
-
"@audio/denoise-dehum": "^0.
|
|
21
|
+
"@audio/denoise-wiener": "^0.2.0",
|
|
22
|
+
"@audio/denoise-omlsa": "^0.2.0",
|
|
23
|
+
"@audio/denoise-dehum": "^0.2.0",
|
|
24
24
|
"@audio/denoise-declick": "^0.1.0",
|
|
25
25
|
"@audio/denoise-dewind": "^0.1.0",
|
|
26
26
|
"@audio/dynamics-deesser": "^0.2.7",
|
|
27
|
-
"@audio/denoise-dereverb": "^0.
|
|
27
|
+
"@audio/denoise-dereverb": "^0.2.0",
|
|
28
28
|
"@audio/lpc": "^1.0.0",
|
|
29
|
-
"@audio/stft": "^
|
|
29
|
+
"@audio/stft": "^2.0.0"
|
|
30
30
|
},
|
|
31
31
|
"keywords": [
|
|
32
32
|
"audio",
|