@ai-coustics/aic-sdk 0.13.0 → 0.15.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.
Files changed (3) hide show
  1. package/README.md +3 -4
  2. package/index.js +15 -21
  3. package/package.json +8 -8
package/README.md CHANGED
@@ -5,7 +5,7 @@ Node.js wrapper for the ai-coustics Speech Enhancement SDK.
5
5
  For comprehensive documentation, visit [docs.ai-coustics.com](https://docs.ai-coustics.com).
6
6
 
7
7
  > [!NOTE]
8
- > This SDK requires a license key. Generate your key at [developers.ai-coustics.io](https://developers.ai-coustics.io).
8
+ > This SDK requires a license key. Generate your key at [developers.ai-coustics.com](https://developers.ai-coustics.com).
9
9
 
10
10
  ## Installation
11
11
 
@@ -22,7 +22,7 @@ const { Model, Processor } = require("@ai-coustics/aic-sdk");
22
22
  const licenseKey = process.env.AIC_SDK_LICENSE;
23
23
 
24
24
  // Download and load a model (or download manually at https://artifacts.ai-coustics.io/)
25
- const modelPath = Model.download("sparrow-xxs-48khz", "./models");
25
+ const modelPath = Model.download("quail-vf-2.0-l-16khz", "./models");
26
26
  const model = Model.fromFile(modelPath);
27
27
 
28
28
  // Get optimal configuration
@@ -64,7 +64,7 @@ const model = Model.fromFile("path/to/model.aicmodel");
64
64
 
65
65
  #### Download from CDN
66
66
  ```javascript
67
- const modelPath = Model.download("sparrow-xxs-48khz", "./models");
67
+ const modelPath = Model.download("quail-vf-2.0-l-16khz", "./models");
68
68
  const model = Model.fromFile(modelPath);
69
69
  ```
70
70
 
@@ -128,7 +128,6 @@ procCtx.reset();
128
128
 
129
129
  // Set enhancement parameters
130
130
  procCtx.setParameter(ProcessorParameter.EnhancementLevel, 0.8);
131
- procCtx.setParameter(ProcessorParameter.VoiceGain, 1.5);
132
131
  procCtx.setParameter(ProcessorParameter.Bypass, 0.0);
133
132
 
134
133
  // Get parameter values
package/index.js CHANGED
@@ -63,21 +63,6 @@ const ProcessorParameter = {
63
63
  * Default: 1.0
64
64
  */
65
65
  EnhancementLevel: native.PROCESSOR_PARAM_ENHANCEMENT_LEVEL,
66
-
67
- /**
68
- * Compensates for perceived volume reduction after noise removal.
69
- *
70
- * Range: 0.1 to 4.0 (linear amplitude multiplier)
71
- * - 0.1: Significant volume reduction (-20 dB)
72
- * - 1.0: No gain change (0 dB, default)
73
- * - 2.0: Double amplitude (+6 dB)
74
- * - 4.0: Maximum boost (+12 dB)
75
- *
76
- * Formula: Gain (dB) = 20 × log₁₀(value)
77
- *
78
- * Default: 1.0
79
- */
80
- VoiceGain: native.PROCESSOR_PARAM_VOICE_GAIN,
81
66
  };
82
67
 
83
68
  /**
@@ -89,16 +74,25 @@ const VadParameter = {
89
74
  * Controls for how long the VAD continues to detect speech after the audio signal
90
75
  * no longer contains speech.
91
76
  *
77
+ * This affects the stability of speech detected -> not detected transitions.
78
+ *
92
79
  * The VAD reports speech detected if the audio signal contained speech in at least 50%
93
- * of the frames processed in the last speech_hold_duration seconds.
80
+ * of the frames processed in the last `speech_hold_duration * 2` seconds.
94
81
  *
95
- * This affects the stability of speech detected -> not detected transitions.
82
+ * For example, if `speech_hold_duration` is set to 0.5 seconds and the VAD stops detecting speech
83
+ * in the audio signal, the VAD will continue to report speech for 0.5 seconds assuming the
84
+ * VAD does not detect speech again during that period. If a few frames of speech are detected
85
+ * during that period, those frames will be included in the 50% calculation, which will extend
86
+ * the speech detection period until the 50% threshold is no longer met.
96
87
  *
97
- * Note: The VAD returns a value per processed buffer, so this duration is rounded
98
- * to the closest model window length.
88
+ * NOTE: The VAD returns a value per processed buffer, so this duration is rounded
89
+ * to the closest model window length. For example, if the model has a processing window
90
+ * length of 10 ms, the VAD will round up/down to the closest multiple of 10 ms.
91
+ * Because of this, this parameter may return a different value than the one it was last set to.
92
+ *
93
+ * **Range:** 0.0 to 100x model window length (value in seconds)
99
94
  *
100
- * Range: 0.0 to 20x model window length (value in seconds)
101
- * Default: 0.05 (50 ms)
95
+ * **Default:** 0.03 (30 ms)
102
96
  */
103
97
  SpeechHoldDuration: native.VAD_PARAM_SPEECH_HOLD_DURATION,
104
98
 
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@ai-coustics/aic-sdk",
3
- "version": "0.13.0",
3
+ "version": "0.15.0",
4
4
  "description": "Node.js package of ai-coustics SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
- "test": "node examples/basic.js",
7
+ "test": "node tests/end2end.test.js",
8
8
  "build": "cargo build --release && cp target/release/libaic_sdk_node.so index.node 2>/dev/null || cp target/release/libaic_sdk_node.dylib index.node 2>/dev/null || cp target/release/aic_sdk_node.dll index.node 2>/dev/null || true",
9
9
  "debug": "cargo build && cp target/debug/libaic_sdk_node.so index.node 2>/dev/null || cp target/debug/libaic_sdk_node.dylib index.node 2>/dev/null || cp target/debug/aic_sdk_node.dll index.node 2>/dev/null || true",
10
10
  "version:update": "bash scripts/update-version.sh"
@@ -34,12 +34,12 @@
34
34
  "LICENSE"
35
35
  ],
36
36
  "optionalDependencies": {
37
- "@ai-coustics/aic-sdk-darwin-arm64": "0.13.0",
38
- "@ai-coustics/aic-sdk-darwin-x64": "0.13.0",
39
- "@ai-coustics/aic-sdk-linux-arm64-gnu": "0.13.0",
40
- "@ai-coustics/aic-sdk-linux-x64-gnu": "0.13.0",
41
- "@ai-coustics/aic-sdk-win32-arm64-msvc": "0.13.0",
42
- "@ai-coustics/aic-sdk-win32-x64-msvc": "0.13.0"
37
+ "@ai-coustics/aic-sdk-darwin-arm64": "0.15.0",
38
+ "@ai-coustics/aic-sdk-darwin-x64": "0.15.0",
39
+ "@ai-coustics/aic-sdk-linux-arm64-gnu": "0.15.0",
40
+ "@ai-coustics/aic-sdk-linux-x64-gnu": "0.15.0",
41
+ "@ai-coustics/aic-sdk-win32-arm64-msvc": "0.15.0",
42
+ "@ai-coustics/aic-sdk-win32-x64-msvc": "0.15.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@neon-rs/cli": "0.1.82",