@convai/web-sdk 1.2.1-beta.1 → 1.2.2-beta.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/README.md +110 -14
- package/dist/core/ConvaiClient.d.ts +33 -1
- package/dist/core/ConvaiClient.d.ts.map +1 -1
- package/dist/core/ConvaiClient.js +118 -18
- package/dist/core/ConvaiClient.js.map +1 -1
- package/dist/core/MemoryManager.d.ts +179 -0
- package/dist/core/MemoryManager.d.ts.map +1 -0
- package/dist/core/MemoryManager.js +281 -0
- package/dist/core/MemoryManager.js.map +1 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +3 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/types.d.ts +306 -5
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +58 -1
- package/dist/core/types.js.map +1 -1
- package/dist/react/components/ConvaiWidget.d.ts.map +1 -1
- package/dist/react/components/ConvaiWidget.js +1 -1
- package/dist/react/components/ConvaiWidget.js.map +1 -1
- package/dist/react/hooks/useCharacterInfo.d.ts +1 -1
- package/dist/react/hooks/useCharacterInfo.d.ts.map +1 -1
- package/dist/react/hooks/useCharacterInfo.js +11 -5
- package/dist/react/hooks/useCharacterInfo.js.map +1 -1
- package/dist/react/hooks/useConvaiClient.d.ts.map +1 -1
- package/dist/react/hooks/useConvaiClient.js +4 -1
- package/dist/react/hooks/useConvaiClient.js.map +1 -1
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +2 -0
- package/dist/react/index.js.map +1 -1
- package/dist/vanilla/ConvaiWidget.d.ts.map +1 -1
- package/dist/vanilla/ConvaiWidget.js +6 -4
- package/dist/vanilla/ConvaiWidget.js.map +1 -1
- package/dist/vanilla/types.d.ts +3 -1
- package/dist/vanilla/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/types/index.d.ts +0 -421
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -2
- package/dist/types/index.js.map +0 -1
package/dist/types/index.d.ts
DELETED
|
@@ -1,421 +0,0 @@
|
|
|
1
|
-
import { Room } from 'livekit-client';
|
|
2
|
-
/**
|
|
3
|
-
* Dynamic information structure for passing real-time context to the character.
|
|
4
|
-
* Pass a text description of the current dynamic context.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```tsx
|
|
8
|
-
* const dynamicInfo = "Player health is low, in combat mode";
|
|
9
|
-
* ```
|
|
10
|
-
*/
|
|
11
|
-
export type DynamicInfo = string;
|
|
12
|
-
/**
|
|
13
|
-
* Audio processing settings for the microphone input.
|
|
14
|
-
* These settings help optimize the audio quality and reduce interruptions.
|
|
15
|
-
* @internal - This is a fixed configuration and should not be modified by users
|
|
16
|
-
*/
|
|
17
|
-
interface AudioSettings {
|
|
18
|
-
/** Enable echo cancellation to prevent audio feedback (default: true) */
|
|
19
|
-
echoCancellation?: boolean;
|
|
20
|
-
/** Enable noise suppression to reduce background noise (default: true) */
|
|
21
|
-
noiseSuppression?: boolean;
|
|
22
|
-
/** Enable automatic gain control for consistent volume (default: true) */
|
|
23
|
-
autoGainControl?: boolean;
|
|
24
|
-
/** Audio sample rate in Hz (default: 48000) */
|
|
25
|
-
sampleRate?: number;
|
|
26
|
-
/** Number of audio channels, 1 for mono, 2 for stereo (default: 1) */
|
|
27
|
-
channelCount?: number;
|
|
28
|
-
}
|
|
29
|
-
export type { AudioSettings };
|
|
30
|
-
/**
|
|
31
|
-
* Configuration object for connecting to a Convai character.
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```tsx
|
|
35
|
-
* const config: ConvaiConfig = {
|
|
36
|
-
* apiKey: 'your-api-key',
|
|
37
|
-
* characterId: 'your-character-id',
|
|
38
|
-
* endUserId: 'user-uuid', // Optional: enables long-term memory and analytics
|
|
39
|
-
* enableVideo: false, // If false, connection_type will be "audio"
|
|
40
|
-
* };
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
export interface ConvaiConfig {
|
|
44
|
-
/** Your Convai API key from convai.com dashboard (required) */
|
|
45
|
-
apiKey: string;
|
|
46
|
-
/** The Character ID to connect to (required) */
|
|
47
|
-
characterId: string;
|
|
48
|
-
/**
|
|
49
|
-
* End user identifier for speaker management (optional).
|
|
50
|
-
*
|
|
51
|
-
* When provided:
|
|
52
|
-
* - Enables long-term memory: Character remembers context from previous conversations with this user
|
|
53
|
-
* - Enables analytics: Track user engagement and behavior
|
|
54
|
-
*
|
|
55
|
-
* When not provided:
|
|
56
|
-
* - Anonymous mode: No persistent memory or user tracking
|
|
57
|
-
* - Each session is independent with no conversation history
|
|
58
|
-
*
|
|
59
|
-
* Use a unique UUID or device ID for persistent user experiences.
|
|
60
|
-
*/
|
|
61
|
-
endUserId?: string;
|
|
62
|
-
/** Optional metadata object for the end user (sent as end_user_metadata to the API) */
|
|
63
|
-
endUserMetadata?: Record<string, unknown>;
|
|
64
|
-
/** Custom Convai API URL (optional, defaults to production endpoint) */
|
|
65
|
-
url?: string;
|
|
66
|
-
/**
|
|
67
|
-
* Character session ID (optional). Pass to resume an existing session;
|
|
68
|
-
* otherwise populated from the connect API response after first connection.
|
|
69
|
-
*/
|
|
70
|
-
characterSessionId?: string;
|
|
71
|
-
/**
|
|
72
|
-
* Enable video capability (default: false).
|
|
73
|
-
* If true, connection_type will be "video" (supports audio, video, and screenshare).
|
|
74
|
-
* If false, connection_type will be "audio" (audio only).
|
|
75
|
-
*/
|
|
76
|
-
enableVideo?: boolean;
|
|
77
|
-
/**
|
|
78
|
-
* Start with video camera on when connecting (default: false).
|
|
79
|
-
* Only works if enableVideo is true. If false, camera stays off until user enables it.
|
|
80
|
-
*/
|
|
81
|
-
startWithVideoOn?: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* Start with microphone on when connecting (default: false).
|
|
84
|
-
* If false, microphone stays off until user enables it using audioControls.enableAudio().
|
|
85
|
-
* Useful for text-only modes where you want to defer microphone permission until voice mode.
|
|
86
|
-
*/
|
|
87
|
-
startWithAudioOn?: boolean;
|
|
88
|
-
/** Enable text-to-speech audio generation (default: true) */
|
|
89
|
-
ttsEnabled?: boolean;
|
|
90
|
-
/**
|
|
91
|
-
* Enable lipsync/facial animation blendshapes (default: false).
|
|
92
|
-
* When true, sets blendshape_provider to "neurosync".
|
|
93
|
-
* When false, sets blendshape_provider to "none" (no facial animation data).
|
|
94
|
-
*/
|
|
95
|
-
enableLipsync?: boolean;
|
|
96
|
-
/** Enable emotion detection and bot-emotion updates (default: true) */
|
|
97
|
-
enableEmotion?: boolean;
|
|
98
|
-
/** Blendshape configuration for facial animation format */
|
|
99
|
-
blendshapeConfig?: {
|
|
100
|
-
/** Format of blendshapes: "arkit" or "mha" (Meta Human Animation, default: "mha") */
|
|
101
|
-
format?: "arkit" | "mha";
|
|
102
|
-
/** Custom mapper function to transform incoming blendshapes */
|
|
103
|
-
customMapper?: (input: number[] | Float32Array) => Float32Array;
|
|
104
|
-
/**
|
|
105
|
-
* Buffer duration for blendshape frames in seconds (default: 1).
|
|
106
|
-
* Controls how much time the server should wait after generating blendshapes before playing the audio.
|
|
107
|
-
*/
|
|
108
|
-
frames_buffer_duration?: number;
|
|
109
|
-
};
|
|
110
|
-
/** Emotion configuration for character emotional state (sent to server on connect) */
|
|
111
|
-
emotionConfig?: {
|
|
112
|
-
/** Emotion provider (default: "llm") */
|
|
113
|
-
provider?: "llm";
|
|
114
|
-
/** Minimum word threshold for emotion detection */
|
|
115
|
-
min_word_threshold?: number;
|
|
116
|
-
/** Low intensity threshold (0–1) */
|
|
117
|
-
low_intensity_threshold?: number;
|
|
118
|
-
/** High intensity threshold (0–1) */
|
|
119
|
-
high_intensity_threshold?: number;
|
|
120
|
-
};
|
|
121
|
-
/** Configuration for character actions and environmental context */
|
|
122
|
-
actionConfig?: {
|
|
123
|
-
/** List of action names the character can perform */
|
|
124
|
-
actions: string[];
|
|
125
|
-
/** Other characters present in the scene or conversation */
|
|
126
|
-
characters: Array<{
|
|
127
|
-
/** Character name */
|
|
128
|
-
name: string;
|
|
129
|
-
/** Character biography or description */
|
|
130
|
-
bio: string;
|
|
131
|
-
}>;
|
|
132
|
-
/** Objects available in the scene or environment */
|
|
133
|
-
objects: Array<{
|
|
134
|
-
/** Object name */
|
|
135
|
-
name: string;
|
|
136
|
-
/** Object description or properties */
|
|
137
|
-
description: string;
|
|
138
|
-
}>;
|
|
139
|
-
/** Object that the character is currently focused on */
|
|
140
|
-
currentAttentionObject?: {
|
|
141
|
-
/** Object name */
|
|
142
|
-
name: string;
|
|
143
|
-
/** Object description */
|
|
144
|
-
description: string;
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
/**
|
|
148
|
-
* Other characters present in the scene (alternative to actionConfig.characters).
|
|
149
|
-
* Use this to define characters without full actionConfig setup.
|
|
150
|
-
*/
|
|
151
|
-
characters?: Array<{
|
|
152
|
-
/** Character name */
|
|
153
|
-
name: string;
|
|
154
|
-
/** Character biography or description */
|
|
155
|
-
bio: string;
|
|
156
|
-
}>;
|
|
157
|
-
/**
|
|
158
|
-
* Objects available in the scene (alternative to actionConfig.objects).
|
|
159
|
-
* Use this to define objects without full actionConfig setup.
|
|
160
|
-
*/
|
|
161
|
-
objects?: Array<{
|
|
162
|
-
/** Object name */
|
|
163
|
-
name: string;
|
|
164
|
-
/** Object description or properties */
|
|
165
|
-
description: string;
|
|
166
|
-
}>;
|
|
167
|
-
/**
|
|
168
|
-
* Object that the character is currently focused on.
|
|
169
|
-
* Use this to set attention object without full actionConfig setup.
|
|
170
|
-
*/
|
|
171
|
-
currentAttentionObject?: {
|
|
172
|
-
/** Object name */
|
|
173
|
-
name: string;
|
|
174
|
-
/** Object description */
|
|
175
|
-
description: string;
|
|
176
|
-
};
|
|
177
|
-
/**
|
|
178
|
-
* Scene description providing context about the environment.
|
|
179
|
-
* Helps the character understand the setting and surroundings.
|
|
180
|
-
*/
|
|
181
|
-
sceneDescription?: Array<{
|
|
182
|
-
/** Scene element name */
|
|
183
|
-
name: string;
|
|
184
|
-
/** Scene element description */
|
|
185
|
-
description: string;
|
|
186
|
-
}>;
|
|
187
|
-
/**
|
|
188
|
-
* Dynamic contextual information about the current situation.
|
|
189
|
-
* This can be updated during the conversation to provide real-time context.
|
|
190
|
-
* Use the DynamicInfo type to pass flexible key-value pairs with a required "text" field.
|
|
191
|
-
*/
|
|
192
|
-
dynamicInfo?: DynamicInfo;
|
|
193
|
-
/**
|
|
194
|
-
* Enable debug mode for additional logging and diagnostics (default: false).
|
|
195
|
-
*/
|
|
196
|
-
debug?: boolean;
|
|
197
|
-
/**
|
|
198
|
-
* Metadata about the invocation source and client information.
|
|
199
|
-
* Used for analytics and debugging purposes.
|
|
200
|
-
*/
|
|
201
|
-
invocationMetadata?: {
|
|
202
|
-
/** Source of the invocation (e.g., "web", "mobile", "unity") */
|
|
203
|
-
source?: string;
|
|
204
|
-
/** Client SDK version */
|
|
205
|
-
clientVersion?: string;
|
|
206
|
-
/** Additional custom metadata */
|
|
207
|
-
extraMetadata?: Record<string, unknown>;
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* Represents a single message in the chat conversation.
|
|
212
|
-
* Different message types are used for various parts of the conversation flow.
|
|
213
|
-
*/
|
|
214
|
-
export interface ChatMessage {
|
|
215
|
-
/** Unique identifier for the message */
|
|
216
|
-
id: string;
|
|
217
|
-
/**
|
|
218
|
-
* Type of message:
|
|
219
|
-
* - `user`: User's sent message
|
|
220
|
-
* - `convai`: Character's response
|
|
221
|
-
* - `user-transcription`: Real-time speech-to-text from user
|
|
222
|
-
* - `bot-llm-text`: Character's LLM-generated text
|
|
223
|
-
* - `emotion`: Character's emotional state
|
|
224
|
-
* - `behavior-tree`: Behavior tree response
|
|
225
|
-
* - `action`: Action execution
|
|
226
|
-
* - `bot-emotion`: Bot emotional response
|
|
227
|
-
* - `user-llm-text`: User text processed by LLM
|
|
228
|
-
*/
|
|
229
|
-
type: 'user' | 'convai' | 'emotion' | 'behavior-tree' | 'action' | 'user-transcription' | 'bot-llm-text' | 'bot-emotion' | 'user-llm-text';
|
|
230
|
-
/** The text content of the message */
|
|
231
|
-
content: string;
|
|
232
|
-
/** ISO timestamp string of when the message was created */
|
|
233
|
-
timestamp: string;
|
|
234
|
-
/** Whether this message is still streaming (mutable); false when finalized */
|
|
235
|
-
isStreaming?: boolean;
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* Represents a single metrics event from the server.
|
|
239
|
-
* Multiple metrics may be received during a conversation.
|
|
240
|
-
*/
|
|
241
|
-
export interface ConvaiMetrics {
|
|
242
|
-
/** Raw metrics data from the server */
|
|
243
|
-
data: Record<string, unknown>;
|
|
244
|
-
/** Timestamp when the metrics were received */
|
|
245
|
-
timestamp: string;
|
|
246
|
-
/** Unique identifier for this metrics event */
|
|
247
|
-
id: string;
|
|
248
|
-
}
|
|
249
|
-
/**
|
|
250
|
-
* Represents the current state of the Convai client connection and activity.
|
|
251
|
-
* Use this to provide UI feedback about the conversation state.
|
|
252
|
-
*
|
|
253
|
-
* @example
|
|
254
|
-
* ```tsx
|
|
255
|
-
* const { state } = convaiClient;
|
|
256
|
-
*
|
|
257
|
-
* if (state.isConnected) {
|
|
258
|
-
* console.log('Connected to character');
|
|
259
|
-
* }
|
|
260
|
-
*
|
|
261
|
-
* if (state.isSpeaking) {
|
|
262
|
-
* console.log('Character is speaking');
|
|
263
|
-
* }
|
|
264
|
-
*
|
|
265
|
-
* // Or use the combined state
|
|
266
|
-
* console.log(state.agentState); // 'listening' | 'thinking' | 'speaking'
|
|
267
|
-
*
|
|
268
|
-
* // Access end user information
|
|
269
|
-
* console.log(state.endUserId); // 'user@example.com'
|
|
270
|
-
* console.log(state.endUserMetadata); // { name: 'John', age: '30' }
|
|
271
|
-
*
|
|
272
|
-
* // Access metrics for the current conversation
|
|
273
|
-
* console.log(state.metrics); // Array of metrics events
|
|
274
|
-
* ```
|
|
275
|
-
*/
|
|
276
|
-
export interface ConvaiClientState {
|
|
277
|
-
/** Whether the client is currently connected to Convai */
|
|
278
|
-
isConnected: boolean;
|
|
279
|
-
/** Whether a connection attempt is in progress */
|
|
280
|
-
isConnecting: boolean;
|
|
281
|
-
/** True from user-started-speaking until user-stopped-speaking (user is speaking, bot is listening). Priority below isSpeaking. */
|
|
282
|
-
isListening: boolean;
|
|
283
|
-
/** Whether the character is processing/thinking about a response */
|
|
284
|
-
isThinking: boolean;
|
|
285
|
-
/** Whether the character is currently speaking */
|
|
286
|
-
isSpeaking: boolean;
|
|
287
|
-
/**
|
|
288
|
-
* Combined state indicator for the character's current activity.
|
|
289
|
-
* Priority: speaking > listening (user speaking) > thinking > connected.
|
|
290
|
-
*/
|
|
291
|
-
agentState: 'disconnected' | 'connected' | 'listening' | 'thinking' | 'speaking';
|
|
292
|
-
/** Current bot emotion (name and optional scale). Updated when bot-emotion messages are received. */
|
|
293
|
-
emotion: {
|
|
294
|
-
emotion: string;
|
|
295
|
-
scale?: number;
|
|
296
|
-
} | null;
|
|
297
|
-
/**
|
|
298
|
-
* End user ID returned from the connection response.
|
|
299
|
-
* This is the actual end user ID used by the server (may differ from the one provided in config).
|
|
300
|
-
*/
|
|
301
|
-
endUserId: string | null;
|
|
302
|
-
/**
|
|
303
|
-
* End user metadata returned from the connection response.
|
|
304
|
-
* Contains additional information about the end user.
|
|
305
|
-
*/
|
|
306
|
-
endUserMetadata: Record<string, unknown> | null;
|
|
307
|
-
/**
|
|
308
|
-
* Array of metrics events received during the current session.
|
|
309
|
-
* Multiple metrics may be received per conversation.
|
|
310
|
-
* Clears when resetSession() is called.
|
|
311
|
-
*/
|
|
312
|
-
metrics: ConvaiMetrics[];
|
|
313
|
-
}
|
|
314
|
-
import type { AudioControls, VideoControls, ScreenShareControls } from "../core/types";
|
|
315
|
-
/**
|
|
316
|
-
* Main Convai client interface returned by useConvaiClient() hook.
|
|
317
|
-
* Provides complete control over Convai character connections and interactions.
|
|
318
|
-
*
|
|
319
|
-
* @example
|
|
320
|
-
* ```tsx
|
|
321
|
-
* import { useConvaiClient } from '@convai/web-sdk';
|
|
322
|
-
*
|
|
323
|
-
* function App() {
|
|
324
|
-
* const convaiClient = useConvaiClient();
|
|
325
|
-
*
|
|
326
|
-
* // Connect to character
|
|
327
|
-
* await convaiClient.connect({
|
|
328
|
-
* apiKey: 'your-api-key',
|
|
329
|
-
* characterId: 'your-character-id'
|
|
330
|
-
* });
|
|
331
|
-
*
|
|
332
|
-
* // Send a message
|
|
333
|
-
* convaiClient.sendUserTextMessage('Hello!');
|
|
334
|
-
*
|
|
335
|
-
* // Check state
|
|
336
|
-
* console.log(convaiClient.state.isConnected);
|
|
337
|
-
* }
|
|
338
|
-
* ```
|
|
339
|
-
*/
|
|
340
|
-
export interface ConvaiClient {
|
|
341
|
-
/** Current connection and activity state of the client */
|
|
342
|
-
state: ConvaiClientState;
|
|
343
|
-
/**
|
|
344
|
-
* Connection type: "audio" (audio only) or "video" (audio + video + screenshare).
|
|
345
|
-
* Set based on enableVideo in connect config.
|
|
346
|
-
*/
|
|
347
|
-
connectionType: 'audio' | 'video' | null;
|
|
348
|
-
/** API key used for the current connection (null if not connected) */
|
|
349
|
-
apiKey: string | null;
|
|
350
|
-
/** Character ID used for the current connection (null if not connected) */
|
|
351
|
-
characterId: string | null;
|
|
352
|
-
/**
|
|
353
|
-
* Speaker ID for the current user (null if not connected).
|
|
354
|
-
* Used for long-term memory and user analytics.
|
|
355
|
-
*/
|
|
356
|
-
speakerId: string | null;
|
|
357
|
-
/**
|
|
358
|
-
* Connect to a Convai character.
|
|
359
|
-
* Uses stored config from useConvaiClient() or accepts override config.
|
|
360
|
-
*/
|
|
361
|
-
connect: (config?: ConvaiConfig) => Promise<void>;
|
|
362
|
-
/** Disconnect from the current character session */
|
|
363
|
-
disconnect: () => Promise<void>;
|
|
364
|
-
/** Reconnect - disconnect and connect again using stored config */
|
|
365
|
-
reconnect: () => Promise<void>;
|
|
366
|
-
/** Reset the session ID to start a new conversation (clears history) */
|
|
367
|
-
resetSession: () => void;
|
|
368
|
-
/** Internal LiveKit Room instance (for advanced usage) */
|
|
369
|
-
room: Room;
|
|
370
|
-
/** Current video track (for advanced usage) */
|
|
371
|
-
videoTrack: any;
|
|
372
|
-
/** Current audio track (for advanced usage) */
|
|
373
|
-
audioTrack: any;
|
|
374
|
-
/** Send a text message to the character */
|
|
375
|
-
sendUserTextMessage: (text: string) => void;
|
|
376
|
-
/**
|
|
377
|
-
* Send a trigger message to invoke specific character actions or responses.
|
|
378
|
-
* @param triggerName - Name of the trigger to invoke
|
|
379
|
-
* @param triggerMessage - Optional message to accompany the trigger
|
|
380
|
-
*/
|
|
381
|
-
sendTriggerMessage: (triggerName?: string, triggerMessage?: string) => void;
|
|
382
|
-
/**
|
|
383
|
-
* Update template keys in the character's context (e.g., user name, location).
|
|
384
|
-
* These keys can be referenced in the character's responses.
|
|
385
|
-
*/
|
|
386
|
-
updateTemplateKeys: (templateKeys: {
|
|
387
|
-
[key: string]: string;
|
|
388
|
-
}) => void;
|
|
389
|
-
/**
|
|
390
|
-
* Update dynamic information about the current context.
|
|
391
|
-
* This helps the character understand the current situation.
|
|
392
|
-
* Pass any key-value pairs you want, but "text" field is required.
|
|
393
|
-
*/
|
|
394
|
-
updateDynamicInfo: (dynamicInfo: DynamicInfo) => void;
|
|
395
|
-
/** Array of all chat messages in the current conversation */
|
|
396
|
-
chatMessages: ChatMessage[];
|
|
397
|
-
/** Current real-time transcription of user speech */
|
|
398
|
-
userTranscription: string;
|
|
399
|
-
/** Unique session ID for the current character conversation */
|
|
400
|
-
characterSessionId: string | null;
|
|
401
|
-
/** Whether the bot is ready to receive messages (true after bot-ready message) */
|
|
402
|
-
isBotReady: boolean;
|
|
403
|
-
/** Audio control methods for managing microphone mute/unmute */
|
|
404
|
-
audioControls: AudioControls;
|
|
405
|
-
/** Video control methods for enabling/disabling camera */
|
|
406
|
-
videoControls: VideoControls;
|
|
407
|
-
/** Screen sharing control methods */
|
|
408
|
-
screenShareControls: ScreenShareControls;
|
|
409
|
-
/**
|
|
410
|
-
* Toggle text-to-speech on or off.
|
|
411
|
-
* When disabled, character responses won't be spoken aloud.
|
|
412
|
-
*/
|
|
413
|
-
toggleTts: (enabled: boolean) => void;
|
|
414
|
-
/**
|
|
415
|
-
* Toggle speech-to-text on or off.
|
|
416
|
-
* When enabled, user speech is transcribed to text (e.g. for dictation).
|
|
417
|
-
* When disabled, STT is off.
|
|
418
|
-
*/
|
|
419
|
-
toggleStt: (enabled: boolean) => void;
|
|
420
|
-
}
|
|
421
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC;;;;GAIG;AACH,UAAU,aAAa;IACrB,yEAAyE;IACzE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,0EAA0E;IAC1E,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,0EAA0E;IAC1E,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sEAAsE;IACtE,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAGD,YAAY,EAAE,aAAa,EAAE,CAAC;AAE9B;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,YAAY;IAC3B,+DAA+D;IAC/D,MAAM,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,wEAAwE;IACxE,GAAG,CAAC,EAAE,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CAAC;IAEtD,6DAA6D;IAC7D,YAAY,EAAE,WAAW,EAAE,CAAC;IAE5B,qDAAqD;IACrD,iBAAiB,EAAE,MAAM,CAAC;IAE1B,+DAA+D;IAC/D,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAElC,kFAAkF;IAClF,UAAU,EAAE,OAAO,CAAC;IAEpB,gEAAgE;IAChE,aAAa,EAAE,aAAa,CAAC;IAE7B,0DAA0D;IAC1D,aAAa,EAAE,aAAa,CAAC;IAE7B,qCAAqC;IACrC,mBAAmB,EAAE,mBAAmB,CAAC;IAEzC;;;OAGG;IACH,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAEtC;;;;OAIG;IACH,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACvC"}
|
package/dist/types/index.js
DELETED
package/dist/types/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":""}
|