Skip to content

EventListenerMap

Typed mapping from event type strings to their corresponding listener signatures.

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

Typed mapping from event type strings to their corresponding listener signatures.

Remarks

This interface enables fully type-safe event subscriptions. When you call agent.on('transcription.final', callback), TypeScript infers that the callback receives a TranscriptionFinalEvent — no manual type assertions needed.

Example

// The callback parameter is automatically typed as TranscriptionFinalEvent
agent.on('transcription.final', (event) => {
  console.log(event.text);       // string -- type-safe
  console.log(event.confidence); // number | undefined -- type-safe
});

// The callback parameter is automatically typed as AgentStateChangeEvent
agent.on('agent.stateChange', (event) => {
  console.log(event.state);         // AgentState -- type-safe
  console.log(event.previousState); // AgentState -- type-safe
});

See

Properties

PropertyTypeDescriptionDefined in
agent.errorEventListener<AgentErrorEvent>Listener for AgentErrorEvent.src/core/events/types.ts:1103
agent.readyEventListener<AgentReadyEvent>Listener for AgentReadyEvent.src/core/events/types.ts:1097
agent.stateChangeEventListener<AgentStateChangeEvent>Listener for AgentStateChangeEvent.src/core/events/types.ts:1100
audio.capture.errorEventListener<AudioCaptureErrorEvent>Listener for AudioCaptureErrorEvent.src/core/events/types.ts:1112
audio.capture.startEventListener<AudioCaptureStartEvent>Listener for AudioCaptureStartEvent.src/core/events/types.ts:1106
audio.capture.stopEventListener<AudioCaptureStopEvent>Listener for AudioCaptureStopEvent.src/core/events/types.ts:1109
audio.playback.endEventListener<AudioPlaybackEndEvent>Listener for AudioPlaybackEndEvent.src/core/events/types.ts:1118
audio.playback.errorEventListener<AudioPlaybackErrorEvent>Listener for AudioPlaybackErrorEvent.src/core/events/types.ts:1121
audio.playback.startEventListener<AudioPlaybackStartEvent>Listener for AudioPlaybackStartEvent.src/core/events/types.ts:1115
llm.chunkEventListener<LLMChunkEvent>Listener for LLMChunkEvent.src/core/events/types.ts:1073
llm.completeEventListener<LLMCompleteEvent>Listener for LLMCompleteEvent.src/core/events/types.ts:1076
llm.errorEventListener<LLMErrorEvent>Listener for LLMErrorEvent.src/core/events/types.ts:1079
llm.startEventListener<LLMStartEvent>Listener for LLMStartEvent.src/core/events/types.ts:1070
queue.overflowEventListener<QueueOverflowEvent>Listener for QueueOverflowEvent.src/core/events/types.ts:1124
queue.statsEventListener<QueueStatsEvent>Listener for QueueStatsEvent.src/core/events/types.ts:1127
transcription.errorEventListener<TranscriptionErrorEvent>Listener for TranscriptionErrorEvent.src/core/events/types.ts:1067
transcription.finalEventListener<TranscriptionFinalEvent>Listener for TranscriptionFinalEvent.src/core/events/types.ts:1058
transcription.interimEventListener<TranscriptionInterimEvent>Listener for TranscriptionInterimEvent.src/core/events/types.ts:1055
transcription.preflightEventListener<TranscriptionPreflightEvent>Listener for TranscriptionPreflightEvent.src/core/events/types.ts:1064
transcription.speechFinalEventListener<TranscriptionSpeechFinalEvent>Listener for TranscriptionSpeechFinalEvent.src/core/events/types.ts:1061
transcription.startEventListener<TranscriptionStartEvent>Listener for TranscriptionStartEvent.src/core/events/types.ts:1052
tts.audioEventListener<TTSAudioEvent>Listener for TTSAudioEvent.src/core/events/types.ts:1085
tts.completeEventListener<TTSCompleteEvent>Listener for TTSCompleteEvent.src/core/events/types.ts:1091
tts.errorEventListener<TTSErrorEvent>Listener for TTSErrorEvent.src/core/events/types.ts:1094
tts.metadataEventListener<TTSMetadataEvent>Listener for TTSMetadataEvent.src/core/events/types.ts:1088
tts.startEventListener<TTSStartEvent>Listener for TTSStartEvent.src/core/events/types.ts:1082

© 2026 CompositeVoice. All rights reserved.

Font size
Contrast
Motion
Transparency