Skip to content

CompositeVoiceEvent

Union of all events that can be emitted by a CompositeVoice agent.

type CompositeVoiceEvent = 
  | TranscriptionEvent
  | LLMEvent
  | TTSEvent
  | AgentEvent
  | AudioEvent
  | QueueEvent;

Defined in: src/core/events/types.ts:977

Union of all events that can be emitted by a CompositeVoice agent.

Remarks

This is the top-level event type encompassing every category: transcription, LLM, TTS, agent lifecycle, and audio events. Use the discriminated type field to narrow to a specific event interface.

Example

function handleEvent(event: CompositeVoiceEvent) {
  switch (event.type) {
    case 'transcription.final':
      console.log('Transcript:', event.text);
      break;
    case 'llm.complete':
      console.log('Response:', event.text);
      break;
    case 'agent.stateChange':
      console.log('State:', event.state);
      break;
  }
}

See

© 2026 CompositeVoice. All rights reserved.

Font size
Contrast
Motion
Transparency