@node-webrtc-rust/bindings 0.9.17 → 0.9.18

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/index.d.ts +8 -0
  2. package/index.js +2 -1
  3. package/package.json +7 -7
package/index.d.ts CHANGED
@@ -172,6 +172,14 @@ export declare function takeClipFrame(playId: string): Buffer | null
172
172
  export interface JsRtcRtpTransceiverInit {
173
173
  direction?: string
174
174
  }
175
+ /**
176
+ * Load the shared spoken-language-ID model (Sherpa Whisper tiny) into the process-wide pool.
177
+ *
178
+ * Resolves once the model is resident. Idempotent: every `VoiceAgent` with the same
179
+ * `languageId.modelPath` then reuses this one instance, so the first utterance never pays
180
+ * the load. Rejects when `modelPath` is missing or not a Whisper bundle directory.
181
+ */
182
+ export declare function preloadLanguageId(config: JsLanguageIdConfig): Promise<void>
175
183
  /** Export format for {@link JsSessionRecorder.finalize}. */
176
184
  export const enum JsSessionAudioFormat {
177
185
  Wav = 'Wav',
package/index.js CHANGED
@@ -310,7 +310,7 @@ if (!nativeBinding) {
310
310
  throw new Error(`Failed to load native binding`)
311
311
  }
312
312
 
313
- const { JsConferenceRoom, JsConferenceServer, JsMixGraph, JsMixPlacement, JsRoomNoiseSuppression, JsMuteScope, JsRtcDataChannel, JsMediaStreamTrack, JsMediaStream, JsLocalAudioTrack, JsPeerConnection, JsRtpReceiver, JsRtpSender, JsRtpTransceiver, JsSessionAudioFormat, JsSessionRecorder, JsEventDeliveryMode, JsNoiseSuppressionProvider, JsVadSampleRate, JsSttVendor, JsTtsVendor, JsSpeechEventType, JsVoiceAgent, JsClipStatus, JsGrowingClipWriter, playClipFromPath, playClipFromBytes, playClipProgressive, getClipStatus, stopClip, takeClipFrame, jsQuatIdentity, jsVec3Zero, version } = nativeBinding
313
+ const { JsConferenceRoom, JsConferenceServer, JsMixGraph, JsMixPlacement, JsRoomNoiseSuppression, JsMuteScope, JsRtcDataChannel, JsMediaStreamTrack, JsMediaStream, JsLocalAudioTrack, JsPeerConnection, JsRtpReceiver, JsRtpSender, JsRtpTransceiver, JsSessionAudioFormat, JsSessionRecorder, JsEventDeliveryMode, JsNoiseSuppressionProvider, JsVadSampleRate, JsSttVendor, JsTtsVendor, JsSpeechEventType, JsVoiceAgent, JsClipStatus, JsGrowingClipWriter, playClipFromPath, playClipFromBytes, playClipProgressive, getClipStatus, stopClip, takeClipFrame, preloadLanguageId, jsQuatIdentity, jsVec3Zero, version } = nativeBinding
314
314
 
315
315
  module.exports.JsConferenceRoom = JsConferenceRoom
316
316
  module.exports.JsConferenceServer = JsConferenceServer
@@ -343,6 +343,7 @@ module.exports.playClipProgressive = playClipProgressive
343
343
  module.exports.getClipStatus = getClipStatus
344
344
  module.exports.stopClip = stopClip
345
345
  module.exports.takeClipFrame = takeClipFrame
346
+ module.exports.preloadLanguageId = preloadLanguageId
346
347
  module.exports.jsQuatIdentity = jsQuatIdentity
347
348
  module.exports.jsVec3Zero = jsVec3Zero
348
349
  module.exports.version = version
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-webrtc-rust/bindings",
3
- "version": "0.9.17",
3
+ "version": "0.9.18",
4
4
  "description": "NAPI-RS native bindings for node-webrtc-rust — WebRTC peer connections, data channels, and conference audio mixing",
5
5
  "keywords": [
6
6
  "webrtc",
@@ -58,12 +58,12 @@
58
58
  "@napi-rs/cli": "^2.18.0"
59
59
  },
60
60
  "optionalDependencies": {
61
- "@node-webrtc-rust/bindings-win32-x64-msvc": "0.9.17",
62
- "@node-webrtc-rust/bindings-darwin-x64": "0.9.17",
63
- "@node-webrtc-rust/bindings-linux-x64-gnu": "0.9.17",
64
- "@node-webrtc-rust/bindings-darwin-arm64": "0.9.17",
65
- "@node-webrtc-rust/bindings-linux-arm64-gnu": "0.9.17",
66
- "@node-webrtc-rust/bindings-linux-x64-musl": "0.9.17"
61
+ "@node-webrtc-rust/bindings-win32-x64-msvc": "0.9.18",
62
+ "@node-webrtc-rust/bindings-darwin-x64": "0.9.18",
63
+ "@node-webrtc-rust/bindings-linux-x64-gnu": "0.9.18",
64
+ "@node-webrtc-rust/bindings-darwin-arm64": "0.9.18",
65
+ "@node-webrtc-rust/bindings-linux-arm64-gnu": "0.9.18",
66
+ "@node-webrtc-rust/bindings-linux-x64-musl": "0.9.18"
67
67
  },
68
68
  "engines": {
69
69
  "node": ">=18"