uneeq-js 3.6.1 → 3.6.4
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/dist/deepgram-stt.d.ts +33 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/deepgram-stt.d.ts
CHANGED
|
@@ -37,12 +37,15 @@ export declare class DeepgramSTT {
|
|
|
37
37
|
private reconnectAttempts;
|
|
38
38
|
private reconnectDelay;
|
|
39
39
|
private reconnectTimeoutId;
|
|
40
|
+
private wasActiveBeforeReconnect;
|
|
40
41
|
private digitalHumanSpeaking;
|
|
41
42
|
private isUserCurrentlySpeaking;
|
|
42
43
|
private isUiShowingSpeaking;
|
|
43
44
|
private accumulatedTranscript;
|
|
44
45
|
private accumulatedConfidenceSum;
|
|
45
46
|
private accumulatedWordCount;
|
|
47
|
+
private lastDeepgramEventTime;
|
|
48
|
+
private safetyNetTimeoutId;
|
|
46
49
|
constructor(options: DeepgramSTTOptions);
|
|
47
50
|
startRecognition(): Promise<void>;
|
|
48
51
|
stopRecognition(): Promise<void>;
|
|
@@ -60,6 +63,36 @@ export declare class DeepgramSTT {
|
|
|
60
63
|
private setupEventHandlers;
|
|
61
64
|
private handleAppMessages;
|
|
62
65
|
private handleTranscript;
|
|
66
|
+
/**
|
|
67
|
+
* Handle UtteranceEnd event from Deepgram.
|
|
68
|
+
* This fires when Deepgram detects a gap in word timings, even in noisy environments
|
|
69
|
+
* where speech_final may never fire due to VAD detecting background noise as "audio activity".
|
|
70
|
+
*/
|
|
71
|
+
private handleUtteranceEnd;
|
|
72
|
+
/**
|
|
73
|
+
* Reset the safety net timeout. Called whenever we receive a Deepgram event.
|
|
74
|
+
* If we're in a speaking state and have accumulated transcript, start a new timeout.
|
|
75
|
+
*/
|
|
76
|
+
private resetSafetyNetTimeout;
|
|
77
|
+
/**
|
|
78
|
+
* Safety net trigger - called when no Deepgram events received for SAFETY_NET_TIMEOUT_MS
|
|
79
|
+
* while in a speaking state with accumulated transcript. This handles truly stuck states.
|
|
80
|
+
*/
|
|
81
|
+
private triggerSafetyNet;
|
|
82
|
+
/**
|
|
83
|
+
* Send the accumulated transcript as a final result.
|
|
84
|
+
* Handles emitting SpeechTranscriptionMessage, gating by word threshold, and sending ChatPrompt.
|
|
85
|
+
* @param source - Description of what triggered this (for logging)
|
|
86
|
+
*/
|
|
87
|
+
private sendAccumulatedTranscript;
|
|
88
|
+
/**
|
|
89
|
+
* Reset accumulated transcript and confidence state.
|
|
90
|
+
*/
|
|
91
|
+
private resetAccumulatedState;
|
|
92
|
+
/**
|
|
93
|
+
* Reset speaking states and send appropriate stop messages.
|
|
94
|
+
*/
|
|
95
|
+
private resetSpeakingStates;
|
|
63
96
|
private handleConnectionOpen;
|
|
64
97
|
private handleConnectionClose;
|
|
65
98
|
private handleError;
|