@layercode/js-sdk 1.0.22 → 1.0.23
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/types/index.d.ts
CHANGED
|
@@ -64,9 +64,9 @@ declare class LayercodeClient implements ILayercodeClient {
|
|
|
64
64
|
private endUserTurn;
|
|
65
65
|
private recorderStarted;
|
|
66
66
|
private readySent;
|
|
67
|
-
private currentTurnText;
|
|
68
67
|
private currentTurnId;
|
|
69
68
|
private audioBuffer;
|
|
69
|
+
private audioPauseTime;
|
|
70
70
|
_websocketUrl: string;
|
|
71
71
|
status: string;
|
|
72
72
|
userAudioAmplitude: number;
|
|
@@ -77,6 +77,7 @@ declare class LayercodeClient implements ILayercodeClient {
|
|
|
77
77
|
* @param {Object} options - Configuration options
|
|
78
78
|
*/
|
|
79
79
|
constructor(options: LayercodeClientOptions);
|
|
80
|
+
private _setupAmplitudeBasedVAD;
|
|
80
81
|
private _initializeVAD;
|
|
81
82
|
/**
|
|
82
83
|
* Updates the connection status and triggers the callback
|
|
@@ -89,7 +90,6 @@ declare class LayercodeClient implements ILayercodeClient {
|
|
|
89
90
|
* @private
|
|
90
91
|
*/
|
|
91
92
|
private _clientResponseAudioReplayFinished;
|
|
92
|
-
private _estimateWordsHeard;
|
|
93
93
|
private _clientInterruptAssistantReplay;
|
|
94
94
|
triggerUserTurnStarted(): Promise<void>;
|
|
95
95
|
triggerUserTurnFinished(): Promise<void>;
|
|
@@ -121,6 +121,7 @@ declare class LayercodeClient implements ILayercodeClient {
|
|
|
121
121
|
* @returns {Promise<void>}
|
|
122
122
|
*/
|
|
123
123
|
connect(): Promise<void>;
|
|
124
|
+
private _resetTurnTracking;
|
|
124
125
|
disconnect(): Promise<void>;
|
|
125
126
|
/**
|
|
126
127
|
* Gets the microphone MediaStream used by this client
|
|
@@ -13,7 +13,7 @@ export interface ClientTriggerTurnMessage extends BaseLayercodeMessage {
|
|
|
13
13
|
}
|
|
14
14
|
export interface ClientVadEventsMessage extends BaseLayercodeMessage {
|
|
15
15
|
type: 'vad_events';
|
|
16
|
-
event: 'vad_start' | 'vad_end';
|
|
16
|
+
event: 'vad_start' | 'vad_end' | 'vad_model_failed';
|
|
17
17
|
}
|
|
18
18
|
export interface ClientReadyMessage extends BaseLayercodeMessage {
|
|
19
19
|
type: 'client.ready';
|
|
@@ -28,9 +28,7 @@ export interface ClientTriggerResponseAudioInterruptedMessage extends BaseLayerc
|
|
|
28
28
|
playback_offset?: number;
|
|
29
29
|
interruption_context?: {
|
|
30
30
|
turn_id: string;
|
|
31
|
-
|
|
32
|
-
total_words: number;
|
|
33
|
-
text_heard: string;
|
|
31
|
+
playback_offset_ms: number;
|
|
34
32
|
};
|
|
35
33
|
}
|
|
36
34
|
export interface ServerTurnMessage extends BaseLayercodeMessage {
|
package/package.json
CHANGED