@micdrop/client 1.4.1 → 1.5.0
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/index.d.mts +80 -86
- package/dist/index.d.ts +80 -86
- package/dist/index.js +407 -386
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +407 -392
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
import EventEmitter from 'eventemitter3';
|
|
2
2
|
|
|
3
|
+
interface AudioAnalyserEvents {
|
|
4
|
+
volume: [number];
|
|
5
|
+
}
|
|
6
|
+
declare class AudioAnalyser extends EventEmitter<AudioAnalyserEvents> {
|
|
7
|
+
volumeInterval: number;
|
|
8
|
+
node: AnalyserNode;
|
|
9
|
+
volume: number;
|
|
10
|
+
private fftSize;
|
|
11
|
+
private fftBins;
|
|
12
|
+
private interval;
|
|
13
|
+
constructor(audioContext: AudioContext, volumeInterval?: number);
|
|
14
|
+
stop(): void;
|
|
15
|
+
private getMaxVolume;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare let mic: Mic;
|
|
19
|
+
declare class Mic {
|
|
20
|
+
defaultThreshold: number;
|
|
21
|
+
private currentDeviceId;
|
|
22
|
+
private audioStream;
|
|
23
|
+
private sourceNode;
|
|
24
|
+
analyser: AudioAnalyser;
|
|
25
|
+
constructor();
|
|
26
|
+
private getMicConstraints;
|
|
27
|
+
/**
|
|
28
|
+
* Starts the microphone
|
|
29
|
+
* @param deviceId - The deviceId to use
|
|
30
|
+
* @returns The microphone stream
|
|
31
|
+
*/
|
|
32
|
+
start(deviceId?: string): Promise<MediaStream>;
|
|
33
|
+
/**
|
|
34
|
+
* Stops the microphone
|
|
35
|
+
*/
|
|
36
|
+
stop(): void;
|
|
37
|
+
}
|
|
38
|
+
declare global {
|
|
39
|
+
interface Window {
|
|
40
|
+
micdropMic: Mic;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
3
44
|
interface VADEvents {
|
|
4
45
|
StartSpeaking: void;
|
|
5
46
|
ConfirmSpeaking: void;
|
|
@@ -40,6 +81,7 @@ declare abstract class VAD extends EventEmitter<VADEvents> {
|
|
|
40
81
|
abstract setThreshold(threshold: number): Promise<void>;
|
|
41
82
|
}
|
|
42
83
|
|
|
84
|
+
type MicRecorderVAD = VAD | 'volume' | 'silero';
|
|
43
85
|
interface MicRecorderState {
|
|
44
86
|
isStarting: boolean;
|
|
45
87
|
isStarted: boolean;
|
|
@@ -54,19 +96,21 @@ interface MicRecorderEvents {
|
|
|
54
96
|
StateChange: [MicRecorderState];
|
|
55
97
|
}
|
|
56
98
|
declare class MicRecorder extends EventEmitter<MicRecorderEvents> {
|
|
99
|
+
private vadConfig?;
|
|
57
100
|
state: MicRecorderState;
|
|
58
101
|
private audioInfo;
|
|
59
|
-
private vad
|
|
102
|
+
private vad?;
|
|
60
103
|
private recorder;
|
|
61
104
|
private delayedStream;
|
|
62
105
|
private speakingConfirmed;
|
|
63
106
|
private queuedChunks;
|
|
64
|
-
constructor(
|
|
107
|
+
constructor(vadConfig?: MicRecorderVAD | undefined);
|
|
65
108
|
start(stream: MediaStream): Promise<void>;
|
|
66
109
|
mute(): void;
|
|
67
110
|
unmute(): void;
|
|
68
111
|
stop(): void;
|
|
69
112
|
setThreshold(threshold: number): void;
|
|
113
|
+
private initVAD;
|
|
70
114
|
private startSpeakingDetection;
|
|
71
115
|
private stopSpeakingDetection;
|
|
72
116
|
private onStartSpeaking;
|
|
@@ -78,86 +122,29 @@ declare class MicRecorder extends EventEmitter<MicRecorderEvents> {
|
|
|
78
122
|
private getAudioInfo;
|
|
79
123
|
}
|
|
80
124
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
private
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
private
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
* Starts the microphone
|
|
100
|
-
* @param deviceId - The deviceId to use
|
|
101
|
-
* @returns The microphone stream
|
|
102
|
-
*/
|
|
103
|
-
declare function startMicrophone(deviceId?: string): Promise<MediaStream>;
|
|
104
|
-
/**
|
|
105
|
-
* Stops the microphone
|
|
106
|
-
*/
|
|
107
|
-
declare function stopMicrophone(): void;
|
|
108
|
-
|
|
109
|
-
declare const microphone_defaultMicThreshold: typeof defaultMicThreshold;
|
|
110
|
-
declare const microphone_micAnalyser: typeof micAnalyser;
|
|
111
|
-
declare const microphone_startMicrophone: typeof startMicrophone;
|
|
112
|
-
declare const microphone_stopMicrophone: typeof stopMicrophone;
|
|
113
|
-
declare namespace microphone {
|
|
114
|
-
export { microphone_defaultMicThreshold as defaultMicThreshold, microphone_micAnalyser as micAnalyser, microphone_startMicrophone as startMicrophone, microphone_stopMicrophone as stopMicrophone };
|
|
125
|
+
declare let speaker: Speaker;
|
|
126
|
+
declare class Speaker {
|
|
127
|
+
private audioElement?;
|
|
128
|
+
private player?;
|
|
129
|
+
private streamingEnabled;
|
|
130
|
+
analyser: AudioAnalyser;
|
|
131
|
+
constructor();
|
|
132
|
+
private setupSpeakerPlayer;
|
|
133
|
+
get isStreamingEnabled(): boolean;
|
|
134
|
+
enableStreaming(): Promise<void>;
|
|
135
|
+
disableStreaming(): Promise<void>;
|
|
136
|
+
canChangeDevice(): boolean;
|
|
137
|
+
private setSinkId;
|
|
138
|
+
changeDevice(speakerId: string): Promise<void>;
|
|
139
|
+
pauseAudio(): void;
|
|
140
|
+
resumeAudio(): void;
|
|
141
|
+
playAudio(blob: Blob): Promise<void>;
|
|
142
|
+
stopAudio(): void;
|
|
115
143
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
declare function disableStreaming(): Promise<void>;
|
|
121
|
-
/**
|
|
122
|
-
* Checks if the speaker device can be changed
|
|
123
|
-
* @returns True if the speaker device can be changed, false otherwise
|
|
124
|
-
*/
|
|
125
|
-
declare function canChangeSpeakerDevice(): boolean;
|
|
126
|
-
/**
|
|
127
|
-
* Changes the speaker device
|
|
128
|
-
* @param speakerId - The speakerId to use
|
|
129
|
-
*/
|
|
130
|
-
declare function changeSpeakerDevice(speakerId: string): Promise<void>;
|
|
131
|
-
/**
|
|
132
|
-
* Pauses the audio
|
|
133
|
-
*/
|
|
134
|
-
declare function pauseAudio(): void;
|
|
135
|
-
/**
|
|
136
|
-
* Resumes the audio
|
|
137
|
-
*/
|
|
138
|
-
declare function resumeAudio(): void;
|
|
139
|
-
/**
|
|
140
|
-
* Plays the audio
|
|
141
|
-
* @param blob - The blob to play (adds to the queue if already playing)
|
|
142
|
-
*/
|
|
143
|
-
declare function playAudio(blob: Blob): Promise<void>;
|
|
144
|
-
/**
|
|
145
|
-
* Stops the audio
|
|
146
|
-
*/
|
|
147
|
-
declare function stopAudio(): void;
|
|
148
|
-
|
|
149
|
-
declare const speaker_canChangeSpeakerDevice: typeof canChangeSpeakerDevice;
|
|
150
|
-
declare const speaker_changeSpeakerDevice: typeof changeSpeakerDevice;
|
|
151
|
-
declare const speaker_disableStreaming: typeof disableStreaming;
|
|
152
|
-
declare const speaker_enableStreaming: typeof enableStreaming;
|
|
153
|
-
declare const speaker_isStreamingEnabled: typeof isStreamingEnabled;
|
|
154
|
-
declare const speaker_pauseAudio: typeof pauseAudio;
|
|
155
|
-
declare const speaker_playAudio: typeof playAudio;
|
|
156
|
-
declare const speaker_resumeAudio: typeof resumeAudio;
|
|
157
|
-
declare const speaker_speakerAnalyser: typeof speakerAnalyser;
|
|
158
|
-
declare const speaker_stopAudio: typeof stopAudio;
|
|
159
|
-
declare namespace speaker {
|
|
160
|
-
export { speaker_canChangeSpeakerDevice as canChangeSpeakerDevice, speaker_changeSpeakerDevice as changeSpeakerDevice, speaker_disableStreaming as disableStreaming, speaker_enableStreaming as enableStreaming, speaker_isStreamingEnabled as isStreamingEnabled, speaker_pauseAudio as pauseAudio, speaker_playAudio as playAudio, speaker_resumeAudio as resumeAudio, speaker_speakerAnalyser as speakerAnalyser, speaker_stopAudio as stopAudio };
|
|
144
|
+
declare global {
|
|
145
|
+
interface Window {
|
|
146
|
+
micdropSpeaker: Speaker;
|
|
147
|
+
}
|
|
161
148
|
}
|
|
162
149
|
|
|
163
150
|
declare enum LocalStorageKeys {
|
|
@@ -216,14 +203,19 @@ interface CallHandlerEvents {
|
|
|
216
203
|
StateChange: void;
|
|
217
204
|
}
|
|
218
205
|
interface CallHandlerOptions {
|
|
219
|
-
vad?:
|
|
206
|
+
vad?: MicRecorderVAD;
|
|
207
|
+
}
|
|
208
|
+
declare global {
|
|
209
|
+
interface Window {
|
|
210
|
+
micdropCallHandler: CallHandler<any>;
|
|
211
|
+
}
|
|
220
212
|
}
|
|
221
213
|
declare class CallHandler<Params extends {}, Options extends CallHandlerOptions = CallHandlerOptions> extends EventEmitter<CallHandlerEvents> {
|
|
222
|
-
private
|
|
214
|
+
private options?;
|
|
223
215
|
static getInstance<T extends {}, Options extends CallHandlerOptions = CallHandlerOptions>(options?: Options): CallHandler<T, Options>;
|
|
224
216
|
url?: string;
|
|
225
217
|
params?: Params;
|
|
226
|
-
micRecorder
|
|
218
|
+
micRecorder?: MicRecorder;
|
|
227
219
|
conversation: Conversation;
|
|
228
220
|
debug: boolean;
|
|
229
221
|
private ws?;
|
|
@@ -232,12 +224,14 @@ declare class CallHandler<Params extends {}, Options extends CallHandlerOptions
|
|
|
232
224
|
private lastAudioBlob?;
|
|
233
225
|
private _isProcessing;
|
|
234
226
|
private constructor();
|
|
235
|
-
private getVAD;
|
|
236
227
|
get isStarted(): boolean;
|
|
237
228
|
get isStarting(): boolean;
|
|
238
229
|
get isWSStarted(): boolean;
|
|
239
230
|
get isWSStarting(): boolean;
|
|
240
231
|
get isMicStarted(): boolean;
|
|
232
|
+
get isMicMuted(): boolean;
|
|
233
|
+
get isMicSpeaking(): boolean;
|
|
234
|
+
get micThreshold(): number;
|
|
241
235
|
get isProcessing(): boolean;
|
|
242
236
|
start(): Promise<void>;
|
|
243
237
|
stop(): Promise<void>;
|
|
@@ -286,4 +280,4 @@ interface ConversationMessage<Data = any> {
|
|
|
286
280
|
metadata?: Data;
|
|
287
281
|
}
|
|
288
282
|
|
|
289
|
-
export { CallClientCommands, type CallConfig, CallHandler, CallHandlerError, CallHandlerErrorCode, type CallHandlerEvents, type CallHandlerOptions, CallServerCommands, type CallSummary, type Conversation, type ConversationMessage, LocalStorageKeys,
|
|
283
|
+
export { CallClientCommands, type CallConfig, CallHandler, CallHandlerError, CallHandlerErrorCode, type CallHandlerEvents, type CallHandlerOptions, CallServerCommands, type CallSummary, type Conversation, type ConversationMessage, LocalStorageKeys, mic as Mic, MicRecorder, type MicRecorderEvents, type MicRecorderState, type MicRecorderVAD, SileroVAD, speaker as Speaker, VAD, VolumeVAD };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
import EventEmitter from 'eventemitter3';
|
|
2
2
|
|
|
3
|
+
interface AudioAnalyserEvents {
|
|
4
|
+
volume: [number];
|
|
5
|
+
}
|
|
6
|
+
declare class AudioAnalyser extends EventEmitter<AudioAnalyserEvents> {
|
|
7
|
+
volumeInterval: number;
|
|
8
|
+
node: AnalyserNode;
|
|
9
|
+
volume: number;
|
|
10
|
+
private fftSize;
|
|
11
|
+
private fftBins;
|
|
12
|
+
private interval;
|
|
13
|
+
constructor(audioContext: AudioContext, volumeInterval?: number);
|
|
14
|
+
stop(): void;
|
|
15
|
+
private getMaxVolume;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare let mic: Mic;
|
|
19
|
+
declare class Mic {
|
|
20
|
+
defaultThreshold: number;
|
|
21
|
+
private currentDeviceId;
|
|
22
|
+
private audioStream;
|
|
23
|
+
private sourceNode;
|
|
24
|
+
analyser: AudioAnalyser;
|
|
25
|
+
constructor();
|
|
26
|
+
private getMicConstraints;
|
|
27
|
+
/**
|
|
28
|
+
* Starts the microphone
|
|
29
|
+
* @param deviceId - The deviceId to use
|
|
30
|
+
* @returns The microphone stream
|
|
31
|
+
*/
|
|
32
|
+
start(deviceId?: string): Promise<MediaStream>;
|
|
33
|
+
/**
|
|
34
|
+
* Stops the microphone
|
|
35
|
+
*/
|
|
36
|
+
stop(): void;
|
|
37
|
+
}
|
|
38
|
+
declare global {
|
|
39
|
+
interface Window {
|
|
40
|
+
micdropMic: Mic;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
3
44
|
interface VADEvents {
|
|
4
45
|
StartSpeaking: void;
|
|
5
46
|
ConfirmSpeaking: void;
|
|
@@ -40,6 +81,7 @@ declare abstract class VAD extends EventEmitter<VADEvents> {
|
|
|
40
81
|
abstract setThreshold(threshold: number): Promise<void>;
|
|
41
82
|
}
|
|
42
83
|
|
|
84
|
+
type MicRecorderVAD = VAD | 'volume' | 'silero';
|
|
43
85
|
interface MicRecorderState {
|
|
44
86
|
isStarting: boolean;
|
|
45
87
|
isStarted: boolean;
|
|
@@ -54,19 +96,21 @@ interface MicRecorderEvents {
|
|
|
54
96
|
StateChange: [MicRecorderState];
|
|
55
97
|
}
|
|
56
98
|
declare class MicRecorder extends EventEmitter<MicRecorderEvents> {
|
|
99
|
+
private vadConfig?;
|
|
57
100
|
state: MicRecorderState;
|
|
58
101
|
private audioInfo;
|
|
59
|
-
private vad
|
|
102
|
+
private vad?;
|
|
60
103
|
private recorder;
|
|
61
104
|
private delayedStream;
|
|
62
105
|
private speakingConfirmed;
|
|
63
106
|
private queuedChunks;
|
|
64
|
-
constructor(
|
|
107
|
+
constructor(vadConfig?: MicRecorderVAD | undefined);
|
|
65
108
|
start(stream: MediaStream): Promise<void>;
|
|
66
109
|
mute(): void;
|
|
67
110
|
unmute(): void;
|
|
68
111
|
stop(): void;
|
|
69
112
|
setThreshold(threshold: number): void;
|
|
113
|
+
private initVAD;
|
|
70
114
|
private startSpeakingDetection;
|
|
71
115
|
private stopSpeakingDetection;
|
|
72
116
|
private onStartSpeaking;
|
|
@@ -78,86 +122,29 @@ declare class MicRecorder extends EventEmitter<MicRecorderEvents> {
|
|
|
78
122
|
private getAudioInfo;
|
|
79
123
|
}
|
|
80
124
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
private
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
private
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
* Starts the microphone
|
|
100
|
-
* @param deviceId - The deviceId to use
|
|
101
|
-
* @returns The microphone stream
|
|
102
|
-
*/
|
|
103
|
-
declare function startMicrophone(deviceId?: string): Promise<MediaStream>;
|
|
104
|
-
/**
|
|
105
|
-
* Stops the microphone
|
|
106
|
-
*/
|
|
107
|
-
declare function stopMicrophone(): void;
|
|
108
|
-
|
|
109
|
-
declare const microphone_defaultMicThreshold: typeof defaultMicThreshold;
|
|
110
|
-
declare const microphone_micAnalyser: typeof micAnalyser;
|
|
111
|
-
declare const microphone_startMicrophone: typeof startMicrophone;
|
|
112
|
-
declare const microphone_stopMicrophone: typeof stopMicrophone;
|
|
113
|
-
declare namespace microphone {
|
|
114
|
-
export { microphone_defaultMicThreshold as defaultMicThreshold, microphone_micAnalyser as micAnalyser, microphone_startMicrophone as startMicrophone, microphone_stopMicrophone as stopMicrophone };
|
|
125
|
+
declare let speaker: Speaker;
|
|
126
|
+
declare class Speaker {
|
|
127
|
+
private audioElement?;
|
|
128
|
+
private player?;
|
|
129
|
+
private streamingEnabled;
|
|
130
|
+
analyser: AudioAnalyser;
|
|
131
|
+
constructor();
|
|
132
|
+
private setupSpeakerPlayer;
|
|
133
|
+
get isStreamingEnabled(): boolean;
|
|
134
|
+
enableStreaming(): Promise<void>;
|
|
135
|
+
disableStreaming(): Promise<void>;
|
|
136
|
+
canChangeDevice(): boolean;
|
|
137
|
+
private setSinkId;
|
|
138
|
+
changeDevice(speakerId: string): Promise<void>;
|
|
139
|
+
pauseAudio(): void;
|
|
140
|
+
resumeAudio(): void;
|
|
141
|
+
playAudio(blob: Blob): Promise<void>;
|
|
142
|
+
stopAudio(): void;
|
|
115
143
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
declare function disableStreaming(): Promise<void>;
|
|
121
|
-
/**
|
|
122
|
-
* Checks if the speaker device can be changed
|
|
123
|
-
* @returns True if the speaker device can be changed, false otherwise
|
|
124
|
-
*/
|
|
125
|
-
declare function canChangeSpeakerDevice(): boolean;
|
|
126
|
-
/**
|
|
127
|
-
* Changes the speaker device
|
|
128
|
-
* @param speakerId - The speakerId to use
|
|
129
|
-
*/
|
|
130
|
-
declare function changeSpeakerDevice(speakerId: string): Promise<void>;
|
|
131
|
-
/**
|
|
132
|
-
* Pauses the audio
|
|
133
|
-
*/
|
|
134
|
-
declare function pauseAudio(): void;
|
|
135
|
-
/**
|
|
136
|
-
* Resumes the audio
|
|
137
|
-
*/
|
|
138
|
-
declare function resumeAudio(): void;
|
|
139
|
-
/**
|
|
140
|
-
* Plays the audio
|
|
141
|
-
* @param blob - The blob to play (adds to the queue if already playing)
|
|
142
|
-
*/
|
|
143
|
-
declare function playAudio(blob: Blob): Promise<void>;
|
|
144
|
-
/**
|
|
145
|
-
* Stops the audio
|
|
146
|
-
*/
|
|
147
|
-
declare function stopAudio(): void;
|
|
148
|
-
|
|
149
|
-
declare const speaker_canChangeSpeakerDevice: typeof canChangeSpeakerDevice;
|
|
150
|
-
declare const speaker_changeSpeakerDevice: typeof changeSpeakerDevice;
|
|
151
|
-
declare const speaker_disableStreaming: typeof disableStreaming;
|
|
152
|
-
declare const speaker_enableStreaming: typeof enableStreaming;
|
|
153
|
-
declare const speaker_isStreamingEnabled: typeof isStreamingEnabled;
|
|
154
|
-
declare const speaker_pauseAudio: typeof pauseAudio;
|
|
155
|
-
declare const speaker_playAudio: typeof playAudio;
|
|
156
|
-
declare const speaker_resumeAudio: typeof resumeAudio;
|
|
157
|
-
declare const speaker_speakerAnalyser: typeof speakerAnalyser;
|
|
158
|
-
declare const speaker_stopAudio: typeof stopAudio;
|
|
159
|
-
declare namespace speaker {
|
|
160
|
-
export { speaker_canChangeSpeakerDevice as canChangeSpeakerDevice, speaker_changeSpeakerDevice as changeSpeakerDevice, speaker_disableStreaming as disableStreaming, speaker_enableStreaming as enableStreaming, speaker_isStreamingEnabled as isStreamingEnabled, speaker_pauseAudio as pauseAudio, speaker_playAudio as playAudio, speaker_resumeAudio as resumeAudio, speaker_speakerAnalyser as speakerAnalyser, speaker_stopAudio as stopAudio };
|
|
144
|
+
declare global {
|
|
145
|
+
interface Window {
|
|
146
|
+
micdropSpeaker: Speaker;
|
|
147
|
+
}
|
|
161
148
|
}
|
|
162
149
|
|
|
163
150
|
declare enum LocalStorageKeys {
|
|
@@ -216,14 +203,19 @@ interface CallHandlerEvents {
|
|
|
216
203
|
StateChange: void;
|
|
217
204
|
}
|
|
218
205
|
interface CallHandlerOptions {
|
|
219
|
-
vad?:
|
|
206
|
+
vad?: MicRecorderVAD;
|
|
207
|
+
}
|
|
208
|
+
declare global {
|
|
209
|
+
interface Window {
|
|
210
|
+
micdropCallHandler: CallHandler<any>;
|
|
211
|
+
}
|
|
220
212
|
}
|
|
221
213
|
declare class CallHandler<Params extends {}, Options extends CallHandlerOptions = CallHandlerOptions> extends EventEmitter<CallHandlerEvents> {
|
|
222
|
-
private
|
|
214
|
+
private options?;
|
|
223
215
|
static getInstance<T extends {}, Options extends CallHandlerOptions = CallHandlerOptions>(options?: Options): CallHandler<T, Options>;
|
|
224
216
|
url?: string;
|
|
225
217
|
params?: Params;
|
|
226
|
-
micRecorder
|
|
218
|
+
micRecorder?: MicRecorder;
|
|
227
219
|
conversation: Conversation;
|
|
228
220
|
debug: boolean;
|
|
229
221
|
private ws?;
|
|
@@ -232,12 +224,14 @@ declare class CallHandler<Params extends {}, Options extends CallHandlerOptions
|
|
|
232
224
|
private lastAudioBlob?;
|
|
233
225
|
private _isProcessing;
|
|
234
226
|
private constructor();
|
|
235
|
-
private getVAD;
|
|
236
227
|
get isStarted(): boolean;
|
|
237
228
|
get isStarting(): boolean;
|
|
238
229
|
get isWSStarted(): boolean;
|
|
239
230
|
get isWSStarting(): boolean;
|
|
240
231
|
get isMicStarted(): boolean;
|
|
232
|
+
get isMicMuted(): boolean;
|
|
233
|
+
get isMicSpeaking(): boolean;
|
|
234
|
+
get micThreshold(): number;
|
|
241
235
|
get isProcessing(): boolean;
|
|
242
236
|
start(): Promise<void>;
|
|
243
237
|
stop(): Promise<void>;
|
|
@@ -286,4 +280,4 @@ interface ConversationMessage<Data = any> {
|
|
|
286
280
|
metadata?: Data;
|
|
287
281
|
}
|
|
288
282
|
|
|
289
|
-
export { CallClientCommands, type CallConfig, CallHandler, CallHandlerError, CallHandlerErrorCode, type CallHandlerEvents, type CallHandlerOptions, CallServerCommands, type CallSummary, type Conversation, type ConversationMessage, LocalStorageKeys,
|
|
283
|
+
export { CallClientCommands, type CallConfig, CallHandler, CallHandlerError, CallHandlerErrorCode, type CallHandlerEvents, type CallHandlerOptions, CallServerCommands, type CallSummary, type Conversation, type ConversationMessage, LocalStorageKeys, mic as Mic, MicRecorder, type MicRecorderEvents, type MicRecorderState, type MicRecorderVAD, SileroVAD, speaker as Speaker, VAD, VolumeVAD };
|