import { InworldPacket as ProtoPacket } from '../../proto/ai/inworld/packets/packets.pb'; import { EmotionBehavior } from './emotion_behavior.entity'; import { EmotionStrength } from './emotion_strength.entity'; export declare enum InworldPacketType { UNKNOWN = "UNKNOWN", TEXT = "TEXT", AUDIO = "AUDIO", TRIGGER = "TRIGGER", EMOTION = "EMOTION", CONTROL = "CONTROL", SILENCE = "SILENCE", CANCEL_RESPONSE = "CANCEL_RESPONSE", NARRATED_ACTION = "NARRATED_ACTION" } export declare enum InworlControlType { UNKNOWN = "UNKNOWN", INTERACTION_END = "INTERACTION_END", TTS_PLAYBACK_START = "TTS_PLAYBACK_START", TTS_PLAYBACK_END = "TTS_PLAYBACK_END", TTS_PLAYBACK_MUTE = "TTS_PLAYBACK_MUTE", TTS_PLAYBACK_UNMUTE = "TTS_PLAYBACK_UNMUTE" } export interface InworldPacketProps { audio?: AudioEvent; cancelResponses?: CancelResponsesEvent; control?: ControlEvent; trigger?: TriggerEvent; emotions?: EmotionEvent; packetId: PacketId; routing: Routing; silence?: SilenceEvent; text?: TextEvent; narratedAction?: NarratedAction; date: string; type: InworldPacketType; } export interface PacketId { packetId: string; utteranceId: string; interactionId: string; correlationId?: string; } export interface EmotionEvent { behavior: EmotionBehavior; strength: EmotionStrength; } export interface Routing { source: Actor; target: Actor; } export interface Actor { name: string; isPlayer: boolean; isCharacter: boolean; } export interface TriggerParameter { name: string; value: string; } export interface TextEvent { text: string; final: boolean; } export interface TriggerEvent { name: string; parameters?: TriggerParameter[]; } export interface AdditionalPhonemeInfo { phoneme?: string; startOffsetS?: number; } export interface AudioEvent { chunk: string; durationMs?: number; additionalPhonemeInfo?: AdditionalPhonemeInfo[]; } export interface SilenceEvent { durationMs: number; } export interface CancelResponsesEvent { interactionId?: string; utteranceId?: string[]; } export interface ControlEvent { type: InworlControlType; } export interface NarratedAction { text: string; } export declare class InworldPacket { private type; readonly date: string; readonly packetId: PacketId; readonly routing: Routing; readonly text: TextEvent; readonly audio: AudioEvent; readonly trigger: TriggerEvent; readonly control: ControlEvent; readonly emotions: EmotionEvent; readonly silence: SilenceEvent; readonly narratedAction: NarratedAction; readonly cancelResponses: CancelResponsesEvent; constructor(props: InworldPacketProps); isText(): boolean; isAudio(): boolean; isControl(): boolean; isTrigger(): boolean; isEmotion(): boolean; isInteractionEnd(): boolean; isTTSPlaybackStart(): boolean; isTTSPlaybackEnd(): boolean; isTTSPlaybackMute(): boolean; isTTSPlaybackUnmute(): boolean; isSilence(): boolean; isCancelResponse(): boolean; isNarratedAction(): boolean; static fromProto(proto: ProtoPacket): InworldPacket; private static getType; private static getControlType; }