@buffered-audio/nodes 0.18.2 → 0.20.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 +47 -59
- package/dist/chunk-YJWZP2OD.js +2067 -0
- package/dist/cli.js +18 -19
- package/dist/index.d.ts +143 -221
- package/dist/index.js +1067 -3243
- package/dist/nlm-worker.d.ts +2 -0
- package/dist/nlm-worker.js +13 -0
- package/package.json +7 -6
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { applyNlmSmoothingRange } from './chunk-YJWZP2OD.js';
|
|
2
|
+
import { parentPort } from 'worker_threads';
|
|
3
|
+
|
|
4
|
+
var port = parentPort;
|
|
5
|
+
if (port) {
|
|
6
|
+
port.on("message", (message) => {
|
|
7
|
+
const { maskSab, outputSab, numFrames, numBins, options, blockFrameStart, blockFrameEnd } = message;
|
|
8
|
+
const mask = new Float32Array(maskSab, 0, numFrames * numBins);
|
|
9
|
+
const output = new Float32Array(outputSab, 0, numFrames * numBins);
|
|
10
|
+
applyNlmSmoothingRange(mask, numFrames, numBins, options, output, blockFrameStart, blockFrameEnd);
|
|
11
|
+
port.postMessage(null);
|
|
12
|
+
});
|
|
13
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buffered-audio/nodes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -33,9 +33,10 @@
|
|
|
33
33
|
"lint:fix": "eslint . --fix",
|
|
34
34
|
"build": "tsup",
|
|
35
35
|
"docs": "tsx scripts/generate-docs.ts",
|
|
36
|
-
"unit": "vitest run unit",
|
|
37
|
-
"integration": "vitest run integration
|
|
38
|
-
"
|
|
36
|
+
"unit": "vitest run --project unit",
|
|
37
|
+
"integration": "vitest run --project integration",
|
|
38
|
+
"integration:heavy": "vitest run -c vitest.heavy.config.ts",
|
|
39
|
+
"benchmark": "vitest run -c vitest.benchmark.config.ts"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
42
|
"@types/node": "^25.3.5",
|
|
@@ -45,8 +46,8 @@
|
|
|
45
46
|
"vitest": "^3.0.0"
|
|
46
47
|
},
|
|
47
48
|
"dependencies": {
|
|
48
|
-
"@buffered-audio/core": "0.
|
|
49
|
-
"@buffered-audio/utils": "0.6.
|
|
49
|
+
"@buffered-audio/core": "0.9.0",
|
|
50
|
+
"@buffered-audio/utils": "0.6.4",
|
|
50
51
|
"bufferfy": "^4.0.3",
|
|
51
52
|
"commander": "^14.0.3",
|
|
52
53
|
"tsx": "^4.21.0",
|