@node-webrtc-rust/bindings 0.9.19 → 0.9.20
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 +28 -1
- package/index.js +2 -1
- package/package.json +7 -7
package/index.d.ts
CHANGED
|
@@ -303,6 +303,9 @@ export interface JsLanguageIdConfig {
|
|
|
303
303
|
lidGateMaxWaitMs?: number
|
|
304
304
|
ttsExclusion?: boolean
|
|
305
305
|
}
|
|
306
|
+
export interface JsReplayConfig {
|
|
307
|
+
maxAgeMs?: number
|
|
308
|
+
}
|
|
306
309
|
export interface JsVoiceAgentConfig {
|
|
307
310
|
vad?: JsVadConfig
|
|
308
311
|
events?: JsEventsConfig
|
|
@@ -311,6 +314,7 @@ export interface JsVoiceAgentConfig {
|
|
|
311
314
|
languageId?: JsLanguageIdConfig
|
|
312
315
|
postUtteranceSilenceMs?: number
|
|
313
316
|
noiseSuppression?: JsNoiseSuppressionConfig
|
|
317
|
+
replay?: JsReplayConfig
|
|
314
318
|
}
|
|
315
319
|
export const enum JsSpeechEventType {
|
|
316
320
|
UserSpeakingStart = 'user_speaking_start',
|
|
@@ -329,7 +333,9 @@ export const enum JsSpeechEventType {
|
|
|
329
333
|
BargeIn = 'barge_in',
|
|
330
334
|
Error = 'error',
|
|
331
335
|
SttConfigUpdated = 'stt_config_updated',
|
|
332
|
-
TtsConfigUpdated = 'tts_config_updated'
|
|
336
|
+
TtsConfigUpdated = 'tts_config_updated',
|
|
337
|
+
SttHoldStarted = 'stt_hold_started',
|
|
338
|
+
SttHoldEnded = 'stt_hold_ended'
|
|
333
339
|
}
|
|
334
340
|
export interface JsSpeechEvent {
|
|
335
341
|
eventType: JsSpeechEventType
|
|
@@ -343,6 +349,21 @@ export interface JsSpeechEvent {
|
|
|
343
349
|
voice?: string
|
|
344
350
|
modelPath?: string
|
|
345
351
|
endpoint?: string
|
|
352
|
+
holdMode?: string
|
|
353
|
+
holdOutcome?: string
|
|
354
|
+
bufferedMs?: number
|
|
355
|
+
droppedMs?: number
|
|
356
|
+
}
|
|
357
|
+
export const enum JsSttHoldMode {
|
|
358
|
+
BufferReplay = 'buffer_replay',
|
|
359
|
+
FirstUtterance = 'first_utterance'
|
|
360
|
+
}
|
|
361
|
+
export interface JsBeginSttHoldOptions {
|
|
362
|
+
mode: JsSttHoldMode
|
|
363
|
+
maxBufferMs?: number
|
|
364
|
+
}
|
|
365
|
+
export interface JsReleaseSttHoldOptions {
|
|
366
|
+
replay: boolean
|
|
346
367
|
}
|
|
347
368
|
export interface JsUpdateTtsOptions {
|
|
348
369
|
cancelInflight?: boolean
|
|
@@ -582,6 +603,12 @@ export declare class JsVoiceAgent {
|
|
|
582
603
|
updateStt(config: JsSttConfig): Promise<void>
|
|
583
604
|
/** Apply a new TTS config before the next synthesis job. */
|
|
584
605
|
updateTts(config: JsTtsConfig, options?: JsUpdateTtsOptions | undefined | null): Promise<void>
|
|
606
|
+
/** Start a host STT hold: stop feeding/polling the current STT and buffer user PCM. */
|
|
607
|
+
beginSttHold(options: JsBeginSttHoldOptions): Promise<void>
|
|
608
|
+
/** End the hold after `update_stt`; `replay` decodes held audio through the new STT. */
|
|
609
|
+
releaseSttHold(options: JsReleaseSttHoldOptions): Promise<void>
|
|
610
|
+
/** Abort the hold: the old STT resumes and receives the buffered audio. */
|
|
611
|
+
cancelSttHold(): Promise<void>
|
|
585
612
|
/** Re-transcribe the last utterance PCM on the current STT provider (after `update_stt`). */
|
|
586
613
|
replayLastUtterance(): Promise<void>
|
|
587
614
|
}
|
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, preloadLanguageId, 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, JsSttHoldMode, 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
|
|
@@ -334,6 +334,7 @@ module.exports.JsVadSampleRate = JsVadSampleRate
|
|
|
334
334
|
module.exports.JsSttVendor = JsSttVendor
|
|
335
335
|
module.exports.JsTtsVendor = JsTtsVendor
|
|
336
336
|
module.exports.JsSpeechEventType = JsSpeechEventType
|
|
337
|
+
module.exports.JsSttHoldMode = JsSttHoldMode
|
|
337
338
|
module.exports.JsVoiceAgent = JsVoiceAgent
|
|
338
339
|
module.exports.JsClipStatus = JsClipStatus
|
|
339
340
|
module.exports.JsGrowingClipWriter = JsGrowingClipWriter
|
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.20",
|
|
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.20",
|
|
62
|
+
"@node-webrtc-rust/bindings-darwin-x64": "0.9.20",
|
|
63
|
+
"@node-webrtc-rust/bindings-linux-x64-gnu": "0.9.20",
|
|
64
|
+
"@node-webrtc-rust/bindings-darwin-arm64": "0.9.20",
|
|
65
|
+
"@node-webrtc-rust/bindings-linux-arm64-gnu": "0.9.20",
|
|
66
|
+
"@node-webrtc-rust/bindings-linux-x64-musl": "0.9.20"
|
|
67
67
|
},
|
|
68
68
|
"engines": {
|
|
69
69
|
"node": ">=18"
|