7
7
/// <reference types = " node" />
8
8
9
9
import { AudioFrame } from ' @livekit/rtc-node' ;
10
+ import type { AudioSource } from ' @livekit/rtc-node' ;
10
11
import type { E2EEOptions } from ' @livekit/rtc-node' ;
11
12
import { EventEmitter } from ' node:events' ;
12
13
import { JobType } from ' @livekit/protocol' ;
@@ -31,6 +32,16 @@ export interface Agent {
31
32
// @public (undocumented)
32
33
const AGENT_STATE_ATTRIBUTE = " lk.agent.state" ;
33
34
35
+ // @public (undocumented)
36
+ class AgentPlayout extends EventEmitter {
37
+ constructor (audioSource : AudioSource , sampleRate : number , numChannels : number , inFrameSize : number , outFrameSize : number );
38
+ // Warning: (ae-incompatible-release-tags) The symbol "play" is marked as @public, but its signature references "AsyncIterableQueue" which is marked as @internal
39
+ // Warning: (ae-incompatible-release-tags) The symbol "play" is marked as @public, but its signature references "AsyncIterableQueue" which is marked as @internal
40
+ //
41
+ // (undocumented)
42
+ play(itemId : string , contentIndex : number , transcriptionFwd : TranscriptionForwarder , textStream : AsyncIterableQueue <string >, audioStream : AsyncIterableQueue <AudioFrame >): PlayoutHandle ;
43
+ }
44
+
34
45
// @public (undocumented)
35
46
type AgentState = ' initializing' | ' thinking' | ' listening' | ' speaking' ;
36
47
@@ -297,7 +308,10 @@ declare namespace multimodal {
297
308
RealtimeModel ,
298
309
AgentState ,
299
310
AGENT_STATE_ATTRIBUTE ,
300
- MultimodalAgent
311
+ MultimodalAgent ,
312
+ proto_2 as proto ,
313
+ PlayoutHandle ,
314
+ AgentPlayout
301
315
}
302
316
}
303
317
export { multimodal }
@@ -346,6 +360,35 @@ const oaiParams: (p: z.AnyZodObject) => {
346
360
required_properties: string [];
347
361
};
348
362
363
+ // @public (undocumented)
364
+ class PlayoutHandle extends EventEmitter {
365
+ constructor (audioSource : AudioSource , sampleRate : number , itemId : string , contentIndex : number , transcriptionFwd : TranscriptionForwarder );
366
+ // (undocumented)
367
+ get audioSamples(): number ;
368
+ // (undocumented)
369
+ get contentIndex(): number ;
370
+ // (undocumented)
371
+ get done(): boolean ;
372
+ // @internal (undocumented)
373
+ doneFut: Future ;
374
+ // (undocumented)
375
+ interrupt(): void ;
376
+ // (undocumented)
377
+ get interrupted(): boolean ;
378
+ // @internal (undocumented)
379
+ intFut: Future ;
380
+ // (undocumented)
381
+ get itemId(): string ;
382
+ // @internal (undocumented)
383
+ pushedDuration: number ;
384
+ // (undocumented)
385
+ get textChars(): number ;
386
+ // @internal (undocumented)
387
+ totalPlayedTime: number | undefined ;
388
+ // @internal (undocumented)
389
+ transcriptionFwd: TranscriptionForwarder ;
390
+ }
391
+
349
392
// @public (undocumented)
350
393
abstract class Plugin_2 {
351
394
constructor (title : string , version : string );
@@ -362,6 +405,9 @@ abstract class Plugin_2 {
362
405
}
363
406
export { Plugin_2 as Plugin }
364
407
408
+ // @public (undocumented)
409
+ const proto_2: {};
410
+
365
411
// Warning: (ae-internal-missing-underscore) The name "Queue" should be prefixed with an underscore because the declaration is marked as @internal
366
412
//
367
413
// @internal (undocumented)
0 commit comments