@node-webrtc-rust/bindings 0.9.16 → 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.
- package/index.d.ts +21 -1
- package/index.js +2 -1
- 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',
|
|
@@ -328,6 +336,16 @@ export interface JsSpeechEvent {
|
|
|
328
336
|
text?: string
|
|
329
337
|
language?: string
|
|
330
338
|
error?: string
|
|
339
|
+
utteranceId?: string
|
|
340
|
+
replay?: boolean
|
|
341
|
+
replacesUtteranceId?: string
|
|
342
|
+
languageMismatch?: boolean
|
|
343
|
+
voice?: string
|
|
344
|
+
modelPath?: string
|
|
345
|
+
endpoint?: string
|
|
346
|
+
}
|
|
347
|
+
export interface JsUpdateTtsOptions {
|
|
348
|
+
cancelInflight?: boolean
|
|
331
349
|
}
|
|
332
350
|
export declare function version(): string
|
|
333
351
|
/** One conference room with participant and mixing controls. */
|
|
@@ -563,5 +581,7 @@ export declare class JsVoiceAgent {
|
|
|
563
581
|
/** Apply a new STT config after the current utterance finalizes (or immediately when idle). */
|
|
564
582
|
updateStt(config: JsSttConfig): Promise<void>
|
|
565
583
|
/** Apply a new TTS config before the next synthesis job. */
|
|
566
|
-
updateTts(config: JsTtsConfig): Promise<void>
|
|
584
|
+
updateTts(config: JsTtsConfig, options?: JsUpdateTtsOptions | undefined | null): Promise<void>
|
|
585
|
+
/** Re-transcribe the last utterance PCM on the current STT provider (after `update_stt`). */
|
|
586
|
+
replayLastUtterance(): Promise<void>
|
|
567
587
|
}
|
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.
|
|
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.
|
|
62
|
-
"@node-webrtc-rust/bindings-darwin-x64": "0.9.
|
|
63
|
-
"@node-webrtc-rust/bindings-linux-x64-gnu": "0.9.
|
|
64
|
-
"@node-webrtc-rust/bindings-darwin-arm64": "0.9.
|
|
65
|
-
"@node-webrtc-rust/bindings-linux-arm64-gnu": "0.9.
|
|
66
|
-
"@node-webrtc-rust/bindings-linux-x64-musl": "0.9.
|
|
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"
|