decibri 3.4.1 → 3.4.2

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 +167 -115
  2. package/index.js +52 -52
  3. package/package.json +5 -5
package/README.md CHANGED
@@ -1,182 +1,234 @@
1
- <!-- markdownlint-disable MD033 MD041 MD059 -->
2
- <div align="center">
3
- <img width="100" height="100" alt="decibri" src="https://github.com/user-attachments/assets/a1a7aa23-6954-4cac-9490-76354f0865ee" />
4
-
5
1
  # decibri
6
2
 
7
- Cross-platform audio capture, playback, and voice activity detection for Python, Rust, and Node.js.
3
+ Cross-platform audio capture, output, and voice activity detection for Node.js and browsers.
8
4
 
9
- <a href="https://pypi.org/project/decibri/"><img src="https://img.shields.io/pypi/v/decibri" alt="PyPI version"></a>&nbsp;
10
- <a href="https://www.npmjs.com/package/decibri"><img src="https://img.shields.io/npm/v/decibri" alt="npm version"></a>&nbsp;
11
- <a href="https://crates.io/crates/decibri"><img src="https://img.shields.io/crates/v/decibri" alt="crates.io version"></a>&nbsp;
12
- <a href="https://github.com/decibri/decibri/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg" alt="Apache 2.0 License"></a>&nbsp;
13
- <a href="https://decibri.com"><img src="https://img.shields.io/badge/Website-decibri.com-blue" alt="decibri.com"></a>&nbsp;
14
- <a href="https://decibri.com/docs/"><img src="https://img.shields.io/badge/docs-passing-brightgreen" alt="Docs"></a>
5
+ ## Installation
15
6
 
16
- </div>
7
+ ```bash
8
+ npm install decibri
9
+ ```
17
10
 
18
- ---
11
+ One package for Node.js and browsers. Node.js gets a native addon (Rust via napi-rs). Browsers get a JavaScript AudioWorklet implementation. Platform-specific binaries are installed automatically.
19
12
 
20
- ## What is decibri?
13
+ Requires Node.js >= 18. TypeScript definitions are bundled.
21
14
 
22
- Decibri is a cross-platform audio engine for real-time speech and voice applications. One unified API across Python, Rust, Node.js, and browsers.
15
+ ## Quick Start
23
16
 
24
- Key features:
17
+ ### Capture audio
25
18
 
26
- - Microphone capture and speaker playback
27
- - Voice activity detection (Silero or energy modes)
28
- - Async and streaming APIs
29
- - Cross-platform: Windows, macOS, Linux, browsers
30
- - Available in Python, Node.js, and Rust
31
- - Cloud and local speech-to-text integrations
19
+ ```javascript
20
+ const Decibri = require('decibri');
32
21
 
33
- To learn more, visit [decibri.com/docs/](https://decibri.com/docs/).
22
+ const mic = new Decibri({ sampleRate: 16000, channels: 1 });
23
+ mic.on('data', (chunk) => { /* Buffer of Int16 PCM samples */ });
24
+ setTimeout(() => mic.stop(), 5000);
25
+ ```
34
26
 
35
- ## Installation
27
+ ### Play audio
36
28
 
37
- **Python** (recommended with [uv](https://docs.astral.sh/uv/)):
29
+ ```javascript
30
+ const { DecibriOutput } = require('decibri');
38
31
 
39
- ```bash
40
- uv pip install decibri
32
+ const speaker = new DecibriOutput({ sampleRate: 16000, channels: 1 });
33
+ speaker.write(pcmBuffer);
34
+ speaker.end();
41
35
  ```
42
36
 
43
- Or with pip:
37
+ ### Browser capture
44
38
 
45
- ```bash
46
- pip install decibri
47
- ```
39
+ ```javascript
40
+ import { Decibri } from 'decibri'; // browser entry via conditional export
48
41
 
49
- <br/>
42
+ const mic = new Decibri({ sampleRate: 16000 });
43
+ mic.on('data', (chunk) => { /* Int16Array of PCM samples */ });
44
+ await mic.start(); // requires user gesture in Safari
45
+ ```
50
46
 
51
- **Node.js:**
47
+ ### Pipe capture to playback (echo)
52
48
 
53
- ```bash
54
- npm install decibri
49
+ ```javascript
50
+ const mic = new Decibri({ sampleRate: 16000, channels: 1 });
51
+ const speaker = new DecibriOutput({ sampleRate: 16000, channels: 1 });
52
+ mic.pipe(speaker);
55
53
  ```
56
54
 
57
- <br/>
55
+ ## API: Decibri (Capture)
58
56
 
59
- **Rust:**
57
+ ### `new Decibri(options?)`
60
58
 
61
- ```bash
62
- cargo add decibri
63
- ```
59
+ Creates a Readable stream that captures from the microphone.
64
60
 
65
- <br/>
61
+ | Option | Type | Default | Description |
62
+ | --- | --- | --- | --- |
63
+ | `sampleRate` | number | 16000 | Samples per second (1000 to 384000) |
64
+ | `channels` | number | 1 | Input channels (1 to 32) |
65
+ | `framesPerBuffer` | number | 1600 | Frames per chunk (64 to 65536). At 16kHz mono, 1600 = 100ms = 3200 bytes |
66
+ | `device` | number, string, or `{ id: string }` | system default | Device index, case-insensitive name substring, or stable per-host ID |
67
+ | `format` | `'int16'` \| `'float32'` | `'int16'` | Sample encoding |
68
+ | `vad` | boolean | false | Enable voice activity detection |
69
+ | `vadMode` | `'energy'` \| `'silero'` | `'energy'` | VAD engine: RMS threshold or Silero ML model |
70
+ | `vadThreshold` | number | 0.01 / 0.5 | Speech threshold. Default depends on `vadMode` |
71
+ | `vadHoldoff` | number | 300 | Silence holdoff in ms |
66
72
 
67
- ## Quick Start
73
+ Standard `ReadableOptions` (e.g. `highWaterMark`) are also accepted.
68
74
 
69
- ### Python
75
+ ### Methods
70
76
 
71
- ```python
72
- import decibri
77
+ | Method | Description |
78
+ | --- | --- |
79
+ | `mic.stop()` | Stop capture and end stream. Safe to call multiple times |
80
+ | `Decibri.devices()` | List available input devices |
81
+ | `Decibri.version()` | Version info |
73
82
 
74
- with decibri.Microphone(sample_rate=16000) as mic:
75
- for chunk in mic:
76
- print(f"Got {len(chunk)} bytes")
77
- break
78
- ```
83
+ ### Properties
79
84
 
80
- Full Python guide: [here](bindings/python/README.md).
85
+ | Property | Type | Description |
86
+ | --- | --- | --- |
87
+ | `mic.isOpen` | boolean | `true` while capturing |
81
88
 
82
- <br/>
89
+ ### Events
83
90
 
84
- ### Node.js
91
+ | Event | Payload | Description |
92
+ | --- | --- | --- |
93
+ | `'data'` | Buffer | Audio chunk (Int16 LE or Float32 LE) |
94
+ | `'backpressure'` | - | Internal buffer full, consumer too slow |
95
+ | `'speech'` | - | VAD: audio crosses threshold |
96
+ | `'silence'` | - | VAD: audio below threshold for `vadHoldoff` ms |
97
+ | `'end'` | - | Stream ended |
98
+ | `'error'` | Error | An error occurred |
85
99
 
86
- ```javascript
87
- const Decibri = require('decibri');
100
+ ## API: DecibriOutput (Playback)
88
101
 
89
- const mic = new Decibri({ sampleRate: 16000 });
90
- mic.on('data', (chunk) => console.log(`Got ${chunk.length} bytes`));
91
- setTimeout(() => mic.stop(), 5000);
92
- ```
102
+ ### `new DecibriOutput(options?)`
93
103
 
94
- Full Node.js and browser guide: [here](npm/decibri/README.md).
104
+ Creates a Writable stream for speaker playback.
95
105
 
96
- <br/>
106
+ | Option | Type | Default | Description |
107
+ | --- | --- | --- | --- |
108
+ | `sampleRate` | number | 16000 | Playback sample rate (1000 to 384000) |
109
+ | `channels` | number | 1 | Output channels (1 to 32) |
110
+ | `format` | `'int16'` \| `'float32'` | `'int16'` | Sample encoding of incoming data |
111
+ | `device` | number, string, or `{ id: string }` | system default | Output device index, case-insensitive name substring, or stable per-host ID |
97
112
 
98
- ### Rust
113
+ Standard `WritableOptions` (e.g. `highWaterMark`) are also accepted.
99
114
 
100
- ```rust
101
- use decibri::capture::{AudioCapture, CaptureConfig};
115
+ | Method / Property | Description |
116
+ | --- | --- |
117
+ | `speaker.write(chunk)` | Write PCM data for playback |
118
+ | `speaker.end()` | Signal end. Drains remaining audio, then emits `'finish'` |
119
+ | `speaker.stop()` | Immediate stop. Discards remaining audio |
120
+ | `speaker.isPlaying` | `true` while audio is being output |
121
+ | `DecibriOutput.devices()` | List available output devices |
122
+ | `DecibriOutput.version()` | Same as `Decibri.version()` |
102
123
 
103
- fn main() -> Result<(), Box<dyn std::error::Error>> {
104
- let capture = AudioCapture::new(CaptureConfig::default())?;
105
- let stream = capture.start()?;
106
- while let Ok(Some(chunk)) = stream.next_chunk(None) {
107
- println!("Got {} bytes", chunk.data.len());
108
- }
109
- Ok(())
110
- }
111
- ```
124
+ ## API: Browser
112
125
 
113
- Full Rust guide: [here](crates/decibri/README.md).
126
+ The browser API uses `getUserMedia` and `AudioWorklet`. It differs from the Node.js API because browser audio is fundamentally async.
114
127
 
115
- <br/>
128
+ ### `new Decibri(options?)` (browser)
116
129
 
117
- ## Platform Support
130
+ Same options as Node.js, plus:
118
131
 
119
- Supports:
132
+ | Option | Type | Default | Description |
133
+ | --- | --- | --- | --- |
134
+ | `device` | string | system default | Device ID from `Decibri.devices()` (not index) |
135
+ | `echoCancellation` | boolean | true | Browser echo cancellation |
136
+ | `noiseSuppression` | boolean | true | Browser noise suppression |
137
+ | `workletUrl` | string | inline blob | Custom worklet URL for strict CSP |
120
138
 
121
- - Windows x64
122
- - macOS arm64
123
- - Linux x64
124
- - Linux arm64
139
+ ### Key differences from Node.js
125
140
 
126
- <br/>
141
+ | Aspect | Node.js | Browser |
142
+ | --- | --- | --- |
143
+ | Start | Automatic on first read | `await mic.start()` |
144
+ | Base class | Readable stream | Custom Emitter |
145
+ | Data type | Buffer | Int16Array / Float32Array |
146
+ | `devices()` | Sync, returns array | Async, returns Promise |
147
+ | Sample rate | Direct via cpal | Resampled from native rate |
127
148
 
128
149
  ## Voice Activity Detection
129
150
 
130
- Decibri ships two VAD modes:
151
+ ### Energy mode (default)
152
+
153
+ Lightweight RMS energy threshold. No model required.
154
+
155
+ ```javascript
156
+ const mic = new Decibri({ vad: true, vadThreshold: 0.01 });
157
+ mic.on('speech', () => console.log('speaking'));
158
+ mic.on('silence', () => console.log('silent'));
159
+ ```
131
160
 
132
- - **Energy mode**: lightweight RMS threshold.
133
- - **Silero mode**: ML-based detection using the Silero VAD v5 ONNX model. More accurate, especially in noisy environments. The model (~2.3 MB) is bundled; no downloads or API keys required.
161
+ ### Silero mode
134
162
 
135
- ```python
136
- import decibri
163
+ ML-based detection using the Silero VAD v5 ONNX model. More accurate than energy mode, especially in noisy environments.
137
164
 
138
- with decibri.Microphone(sample_rate=16000, vad="silero", vad_threshold=0.5) as mic:
139
- for chunk in mic:
140
- print(f"VAD score {mic.vad_score}; speaking={mic.is_speaking}")
141
- break
165
+ ```javascript
166
+ const mic = new Decibri({ vad: true, vadMode: 'silero', vadThreshold: 0.5 });
167
+ mic.on('speech', () => console.log('speaking'));
168
+ mic.on('silence', () => console.log('silent'));
142
169
  ```
143
170
 
144
- The same VAD API is available in Node.js and Rust. Language-specific examples and tuning advice live in each binding's README.
171
+ The Silero model (~2MB) ships inside the npm package. No downloads or API keys required.
172
+
173
+ ## Device Selection
174
+
175
+ ```javascript
176
+ // System default
177
+ const mic = new Decibri();
178
+
179
+ // By name (case-insensitive substring match)
180
+ const mic = new Decibri({ device: 'USB' });
181
+
182
+ // By index
183
+ const devices = Decibri.devices();
184
+ const mic = new Decibri({ device: devices[1].index });
145
185
 
146
- <br/>
186
+ // By stable per-host ID (survives across enumerations)
187
+ const mic = new Decibri({ device: { id: devices[1].id } });
147
188
 
148
- ## Integrations
189
+ Decibri.devices();
190
+ // [
191
+ // { index: 0, name: 'Microphone', id: '{0.0.1.00000000}.{...}', maxInputChannels: 2, defaultSampleRate: 48000, isDefault: true },
192
+ // { index: 1, name: 'USB Headset', id: '{0.0.1.00000000}.{...}', maxInputChannels: 1, defaultSampleRate: 44100, isDefault: false }
193
+ // ]
194
+ ```
195
+
196
+ ## Examples
149
197
 
150
- Decibri pipes microphone audio directly into cloud and local speech services. Full guides at [decibri.com/docs/integrations](https://decibri.com/docs/integrations).
198
+ Runnable examples ship with the package. After `npm install decibri`, find them under `node_modules/decibri/examples/`. From a clone of the repo they live at `npm/decibri/examples/`.
151
199
 
152
- | Provider | Environment | STT | TTS | VAD | KWS |
153
- | :--- | :---: | :---: | :---: | :---: | :---: |
154
- | OpenAI Realtime | Cloud | ✅ | ✅ | | |
155
- | Deepgram | Cloud | ✅ | ✅ | | |
156
- | AssemblyAI | Cloud | ✅ | | | |
157
- | Mistral Voxtral | Cloud | ✅ | | | |
158
- | AWS Transcribe | Cloud | ✅ | | | |
159
- | Google Speech | Cloud | ✅ | ✅ | | |
160
- | Azure Speech | Cloud | ✅ | ✅ | | |
161
- | Sherpa-ONNX | Local | ✅ | ✅ | ✅ | ✅ |
162
- | Whisper.cpp | Local | ✅ | | | |
200
+ ```bash
201
+ # Capture to WAV file (no extra dependencies)
202
+ node node_modules/decibri/examples/wav-capture.js
163
203
 
164
- <br/>
204
+ # Stream to WebSocket (requires: npm install ws)
205
+ node node_modules/decibri/examples/websocket-server.js # terminal 1
206
+ node node_modules/decibri/examples/websocket-stream.js # terminal 2
207
+ ```
165
208
 
166
- ## Architecture
209
+ ## Platform Support
167
210
 
168
- Decibri is built on a single Rust core. The same audio engine powers all three language bindings, ensuring consistent behavior regardless of which language you use.
211
+ | Platform | Architecture | Audio Backend |
212
+ | --- | --- | --- |
213
+ | Windows | x64 | WASAPI |
214
+ | macOS | arm64 | CoreAudio |
215
+ | Linux | x64 | ALSA |
216
+ | Linux | arm64 | ALSA |
217
+ | Browser | - | Web Audio API (AudioWorklet) |
169
218
 
170
- Python and Node.js install pre-built native binaries for your platform. Browsers run the same API via a JavaScript implementation that ships inside the npm package.
219
+ ## How It Works
171
220
 
172
- <br/>
221
+ decibri is a Rust library using cpal for cross-platform audio I/O. The Rust core compiles to a Node.js native addon via napi-rs and ships pre-built binaries for each platform. Browser support uses a JavaScript AudioWorklet implementation with the same event-driven API.
173
222
 
174
- ## Contributing
223
+ Audio flows from the OS audio device through cpal's callback, into a crossbeam channel, through frame-exact buffering (guarantees consistent chunk sizes), and into Node.js via a threadsafe function. The JavaScript layer wraps this in a standard Readable stream.
175
224
 
176
- [Issues](https://github.com/decibri/decibri/issues) and PRs welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup.
225
+ ## Documentation
177
226
 
178
- <br/>
227
+ - **Source code & issues**: [github.com/decibri/decibri](https://github.com/decibri/decibri)
228
+ - **Provider integrations** (OpenAI, Deepgram, AssemblyAI): [decibri.com/docs](https://decibri.com/docs)
179
229
 
180
230
  ## License
181
231
 
182
- Apache-2.0 © 2026 [Decibri](https://github.com/decibri).
232
+ Apache-2.0. See [LICENSE](https://github.com/decibri/decibri/blob/main/LICENSE) for details.
233
+
234
+ Copyright (c) 2026 Decibri.
package/index.js CHANGED
@@ -77,8 +77,8 @@ function requireNative() {
77
77
  try {
78
78
  const binding = require('@decibri/decibri-android-arm64')
79
79
  const bindingPackageVersion = require('@decibri/decibri-android-arm64/package.json').version
80
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
81
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
80
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
81
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
82
82
  }
83
83
  return binding
84
84
  } catch (e) {
@@ -93,8 +93,8 @@ function requireNative() {
93
93
  try {
94
94
  const binding = require('@decibri/decibri-android-arm-eabi')
95
95
  const bindingPackageVersion = require('@decibri/decibri-android-arm-eabi/package.json').version
96
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
97
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
96
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
97
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
98
98
  }
99
99
  return binding
100
100
  } catch (e) {
@@ -114,8 +114,8 @@ function requireNative() {
114
114
  try {
115
115
  const binding = require('@decibri/decibri-win32-x64-gnu')
116
116
  const bindingPackageVersion = require('@decibri/decibri-win32-x64-gnu/package.json').version
117
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
118
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
117
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
118
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
119
119
  }
120
120
  return binding
121
121
  } catch (e) {
@@ -130,8 +130,8 @@ function requireNative() {
130
130
  try {
131
131
  const binding = require('@decibri/decibri-win32-x64-msvc')
132
132
  const bindingPackageVersion = require('@decibri/decibri-win32-x64-msvc/package.json').version
133
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
134
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
133
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
134
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
135
135
  }
136
136
  return binding
137
137
  } catch (e) {
@@ -147,8 +147,8 @@ function requireNative() {
147
147
  try {
148
148
  const binding = require('@decibri/decibri-win32-ia32-msvc')
149
149
  const bindingPackageVersion = require('@decibri/decibri-win32-ia32-msvc/package.json').version
150
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
150
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
152
152
  }
153
153
  return binding
154
154
  } catch (e) {
@@ -163,8 +163,8 @@ function requireNative() {
163
163
  try {
164
164
  const binding = require('@decibri/decibri-win32-arm64-msvc')
165
165
  const bindingPackageVersion = require('@decibri/decibri-win32-arm64-msvc/package.json').version
166
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
167
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
166
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
167
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
168
168
  }
169
169
  return binding
170
170
  } catch (e) {
@@ -182,8 +182,8 @@ function requireNative() {
182
182
  try {
183
183
  const binding = require('@decibri/decibri-darwin-universal')
184
184
  const bindingPackageVersion = require('@decibri/decibri-darwin-universal/package.json').version
185
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
186
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
185
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
186
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
187
187
  }
188
188
  return binding
189
189
  } catch (e) {
@@ -198,8 +198,8 @@ function requireNative() {
198
198
  try {
199
199
  const binding = require('@decibri/decibri-darwin-x64')
200
200
  const bindingPackageVersion = require('@decibri/decibri-darwin-x64/package.json').version
201
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
202
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
201
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
202
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
203
203
  }
204
204
  return binding
205
205
  } catch (e) {
@@ -214,8 +214,8 @@ function requireNative() {
214
214
  try {
215
215
  const binding = require('@decibri/decibri-darwin-arm64')
216
216
  const bindingPackageVersion = require('@decibri/decibri-darwin-arm64/package.json').version
217
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
218
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
217
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
218
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
219
219
  }
220
220
  return binding
221
221
  } catch (e) {
@@ -234,8 +234,8 @@ function requireNative() {
234
234
  try {
235
235
  const binding = require('@decibri/decibri-freebsd-x64')
236
236
  const bindingPackageVersion = require('@decibri/decibri-freebsd-x64/package.json').version
237
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
238
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
237
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
238
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
239
239
  }
240
240
  return binding
241
241
  } catch (e) {
@@ -250,8 +250,8 @@ function requireNative() {
250
250
  try {
251
251
  const binding = require('@decibri/decibri-freebsd-arm64')
252
252
  const bindingPackageVersion = require('@decibri/decibri-freebsd-arm64/package.json').version
253
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
254
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
253
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
254
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
255
255
  }
256
256
  return binding
257
257
  } catch (e) {
@@ -271,8 +271,8 @@ function requireNative() {
271
271
  try {
272
272
  const binding = require('@decibri/decibri-linux-x64-musl')
273
273
  const bindingPackageVersion = require('@decibri/decibri-linux-x64-musl/package.json').version
274
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
275
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
274
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
275
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
276
276
  }
277
277
  return binding
278
278
  } catch (e) {
@@ -287,8 +287,8 @@ function requireNative() {
287
287
  try {
288
288
  const binding = require('@decibri/decibri-linux-x64-gnu')
289
289
  const bindingPackageVersion = require('@decibri/decibri-linux-x64-gnu/package.json').version
290
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
291
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
290
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
291
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
292
292
  }
293
293
  return binding
294
294
  } catch (e) {
@@ -305,8 +305,8 @@ function requireNative() {
305
305
  try {
306
306
  const binding = require('@decibri/decibri-linux-arm64-musl')
307
307
  const bindingPackageVersion = require('@decibri/decibri-linux-arm64-musl/package.json').version
308
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
309
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
308
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
309
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
310
310
  }
311
311
  return binding
312
312
  } catch (e) {
@@ -321,8 +321,8 @@ function requireNative() {
321
321
  try {
322
322
  const binding = require('@decibri/decibri-linux-arm64-gnu')
323
323
  const bindingPackageVersion = require('@decibri/decibri-linux-arm64-gnu/package.json').version
324
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
325
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
324
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
325
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
326
326
  }
327
327
  return binding
328
328
  } catch (e) {
@@ -339,8 +339,8 @@ function requireNative() {
339
339
  try {
340
340
  const binding = require('@decibri/decibri-linux-arm-musleabihf')
341
341
  const bindingPackageVersion = require('@decibri/decibri-linux-arm-musleabihf/package.json').version
342
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
343
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
342
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
343
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
344
344
  }
345
345
  return binding
346
346
  } catch (e) {
@@ -355,8 +355,8 @@ function requireNative() {
355
355
  try {
356
356
  const binding = require('@decibri/decibri-linux-arm-gnueabihf')
357
357
  const bindingPackageVersion = require('@decibri/decibri-linux-arm-gnueabihf/package.json').version
358
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
359
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
358
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
359
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
360
360
  }
361
361
  return binding
362
362
  } catch (e) {
@@ -373,8 +373,8 @@ function requireNative() {
373
373
  try {
374
374
  const binding = require('@decibri/decibri-linux-loong64-musl')
375
375
  const bindingPackageVersion = require('@decibri/decibri-linux-loong64-musl/package.json').version
376
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
377
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
376
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
377
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
378
378
  }
379
379
  return binding
380
380
  } catch (e) {
@@ -389,8 +389,8 @@ function requireNative() {
389
389
  try {
390
390
  const binding = require('@decibri/decibri-linux-loong64-gnu')
391
391
  const bindingPackageVersion = require('@decibri/decibri-linux-loong64-gnu/package.json').version
392
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
393
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
392
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
393
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
394
394
  }
395
395
  return binding
396
396
  } catch (e) {
@@ -407,8 +407,8 @@ function requireNative() {
407
407
  try {
408
408
  const binding = require('@decibri/decibri-linux-riscv64-musl')
409
409
  const bindingPackageVersion = require('@decibri/decibri-linux-riscv64-musl/package.json').version
410
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
411
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
410
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
411
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
412
412
  }
413
413
  return binding
414
414
  } catch (e) {
@@ -423,8 +423,8 @@ function requireNative() {
423
423
  try {
424
424
  const binding = require('@decibri/decibri-linux-riscv64-gnu')
425
425
  const bindingPackageVersion = require('@decibri/decibri-linux-riscv64-gnu/package.json').version
426
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
427
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
426
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
427
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
428
428
  }
429
429
  return binding
430
430
  } catch (e) {
@@ -440,8 +440,8 @@ function requireNative() {
440
440
  try {
441
441
  const binding = require('@decibri/decibri-linux-ppc64-gnu')
442
442
  const bindingPackageVersion = require('@decibri/decibri-linux-ppc64-gnu/package.json').version
443
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
443
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
445
445
  }
446
446
  return binding
447
447
  } catch (e) {
@@ -456,8 +456,8 @@ function requireNative() {
456
456
  try {
457
457
  const binding = require('@decibri/decibri-linux-s390x-gnu')
458
458
  const bindingPackageVersion = require('@decibri/decibri-linux-s390x-gnu/package.json').version
459
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
459
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
461
461
  }
462
462
  return binding
463
463
  } catch (e) {
@@ -476,8 +476,8 @@ function requireNative() {
476
476
  try {
477
477
  const binding = require('@decibri/decibri-openharmony-arm64')
478
478
  const bindingPackageVersion = require('@decibri/decibri-openharmony-arm64/package.json').version
479
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
480
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
479
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
480
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
481
481
  }
482
482
  return binding
483
483
  } catch (e) {
@@ -492,8 +492,8 @@ function requireNative() {
492
492
  try {
493
493
  const binding = require('@decibri/decibri-openharmony-x64')
494
494
  const bindingPackageVersion = require('@decibri/decibri-openharmony-x64/package.json').version
495
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
496
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
495
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
496
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
497
497
  }
498
498
  return binding
499
499
  } catch (e) {
@@ -508,8 +508,8 @@ function requireNative() {
508
508
  try {
509
509
  const binding = require('@decibri/decibri-openharmony-arm')
510
510
  const bindingPackageVersion = require('@decibri/decibri-openharmony-arm/package.json').version
511
- if (bindingPackageVersion !== '3.4.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
512
- throw new Error(`Native binding package version mismatch, expected 3.4.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
511
+ if (bindingPackageVersion !== '3.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
512
+ throw new Error(`Native binding package version mismatch, expected 3.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
513
513
  }
514
514
  return binding
515
515
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "decibri",
3
- "version": "3.4.1",
3
+ "version": "3.4.2",
4
4
  "description": "Cross-platform audio capture, output, and processing for Node.js and browsers",
5
5
  "main": "src/decibri.js",
6
6
  "types": "src/decibri.d.ts",
@@ -70,10 +70,10 @@
70
70
  "README.md"
71
71
  ],
72
72
  "optionalDependencies": {
73
- "@decibri/decibri-win32-x64-msvc": "3.4.1",
74
- "@decibri/decibri-darwin-arm64": "3.4.1",
75
- "@decibri/decibri-linux-x64-gnu": "3.4.1",
76
- "@decibri/decibri-linux-arm64-gnu": "3.4.1"
73
+ "@decibri/decibri-win32-x64-msvc": "3.4.2",
74
+ "@decibri/decibri-darwin-arm64": "3.4.2",
75
+ "@decibri/decibri-linux-x64-gnu": "3.4.2",
76
+ "@decibri/decibri-linux-arm64-gnu": "3.4.2"
77
77
  },
78
78
  "devDependencies": {
79
79
  "@napi-rs/cli": "^3.0.0"