uneeq-js 3.11.0 → 3.11.1

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.
@@ -0,0 +1,66 @@
1
+ import { MicVAD } from './lib/vad/real-time-vad';
2
+ import { type SpeechRecognitionOptions } from './types/SpeechHandlerOptions';
3
+ import { type PromptMetadata } from './types/PromptMetadata';
4
+ import { type SpeechRecognitionInterface } from './types/SpeechRecognitionInterface';
5
+ /**
6
+ * Google Speech-to-Text implementation
7
+ * Uses WebRTC audio, VAD (Voice Activity Detection), and MediaRecorder
8
+ * to send audio to UneeQ's speech recognition service via WebSocket, which is then passed to Google
9
+ */
10
+ export declare class GoogleSTT implements SpeechRecognitionInterface {
11
+ options: SpeechRecognitionOptions;
12
+ private ws;
13
+ private mediaRecorder;
14
+ private readonly speechBuffer;
15
+ private recordingLive;
16
+ private headerBlob;
17
+ private scriptsLoadedPromise;
18
+ private reconnectWs;
19
+ private wsReconnectMessageQueue;
20
+ private storedTranscription?;
21
+ private awaitingFinalTranscript;
22
+ private isMicrophoneMuted;
23
+ private isTemporarilyPaused;
24
+ stream?: MediaStream;
25
+ micVad: MicVAD;
26
+ digitalHumanSpeaking: boolean;
27
+ interruptionBlocked: boolean;
28
+ constructor(options: SpeechRecognitionOptions);
29
+ startRecognition(): Promise<void>;
30
+ stopRecognition(): Promise<void>;
31
+ private stopRecognitionInternal;
32
+ pause(): boolean;
33
+ resume(): boolean;
34
+ setChatMetadata(chatMetadata: PromptMetadata): void;
35
+ pauseVadIfInterruptNotAllowed(): void;
36
+ private loadScript;
37
+ private loadScripts;
38
+ private handleAppMessages;
39
+ private endRecognition;
40
+ private handleSpeakingEnd;
41
+ private initWebsocket;
42
+ private sendWebsocketMessageQueue;
43
+ private loadSavedAudioHeaders;
44
+ private initVoiceActivityDetection;
45
+ private startMicVad;
46
+ private pauseMicVad;
47
+ private onVadSpeechStart;
48
+ private onVadSpeechEnd;
49
+ private sendStoredTranscriptionIfReady;
50
+ private handleWebsocketMessage;
51
+ private handleWebsocketClose;
52
+ private sendStartMessage;
53
+ private sendStopMessage;
54
+ private wsSend;
55
+ private handleWsReconnectQueueOverflow;
56
+ private initMicrophone;
57
+ private getMediaRecorder;
58
+ private initMediaRecorder;
59
+ private mediaRecorderOnData;
60
+ private handlePttTranscriptionResult;
61
+ private handleVadTranscriptionResult;
62
+ private sendChatPrompt;
63
+ private sendInterimTranscription;
64
+ private dataChannelMsgSend;
65
+ private clientMsgSend;
66
+ }
@@ -0,0 +1 @@
1
+ export {};