UNPKG

@inworld/web-core

Version:
29 lines (28 loc) 1.16 kB
import { ControlEvent as ProtoControlEvent } from '../../../proto/ai/inworld/packets/packets.pb.js'; import { InworlControlAction, InworldConversationEventType, MicrophoneMode, UnderstandingMode } from '../../common/data_structures/index.js'; import { Actor } from './routing.entity.js'; export interface Conversation { type?: InworldConversationEventType; participants: Actor[]; } export interface AudioSessionStart { mode?: MicrophoneMode; understandingMode?: UnderstandingMode; } export declare class ControlEvent { readonly action: InworlControlAction; readonly audioSessionStart?: AudioSessionStart; readonly description?: string; readonly conversation?: Conversation; constructor({ action, audioSessionStart, description, conversation, }: { action: InworlControlAction; audioSessionStart?: AudioSessionStart; description?: string; conversation?: Conversation; }); static fromProto(proto: ProtoControlEvent): ControlEvent; private static getControlType; private static getConversationType; private static getMicrophoneMode; private static getUnderstandingMode; }