Skip to content

EventListenerMap

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

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

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:1464
agent.readyEventListener<AgentReadyEvent>Listener for AgentReadyEvent.src/core/events/types.ts:1458
agent.stateChangeEventListener<AgentStateChangeEvent>Listener for AgentStateChangeEvent.src/core/events/types.ts:1461
audio.capture.errorEventListener<AudioCaptureErrorEvent>Listener for AudioCaptureErrorEvent.src/core/events/types.ts:1473
audio.capture.startEventListener<AudioCaptureStartEvent>Listener for AudioCaptureStartEvent.src/core/events/types.ts:1467
audio.capture.stopEventListener<AudioCaptureStopEvent>Listener for AudioCaptureStopEvent.src/core/events/types.ts:1470
audio.playback.endEventListener<AudioPlaybackEndEvent>Listener for AudioPlaybackEndEvent.src/core/events/types.ts:1479
audio.playback.errorEventListener<AudioPlaybackErrorEvent>Listener for AudioPlaybackErrorEvent.src/core/events/types.ts:1482
audio.playback.startEventListener<AudioPlaybackStartEvent>Listener for AudioPlaybackStartEvent.src/core/events/types.ts:1476
guardrail.appliedEventListener<GuardrailAppliedEvent>Listener for GuardrailAppliedEvent.src/core/events/types.ts:1449
guardrail.blockedEventListener<GuardrailBlockedEvent>Listener for GuardrailBlockedEvent.src/core/events/types.ts:1452
guardrail.errorEventListener<GuardrailErrorEvent>Listener for GuardrailErrorEvent.src/core/events/types.ts:1455
llm.chunkEventListener<LLMChunkEvent>Listener for LLMChunkEvent.src/core/events/types.ts:1425
llm.completeEventListener<LLMCompleteEvent>Listener for LLMCompleteEvent.src/core/events/types.ts:1428
llm.errorEventListener<LLMErrorEvent>Listener for LLMErrorEvent.src/core/events/types.ts:1431
llm.startEventListener<LLMStartEvent>Listener for LLMStartEvent.src/core/events/types.ts:1422
provider.fallbackEventListener<ProviderFallbackEvent>Listener for ProviderFallbackEvent.src/core/events/types.ts:1494
queue.overflowEventListener<QueueOverflowEvent>Listener for QueueOverflowEvent.src/core/events/types.ts:1485
queue.statsEventListener<QueueStatsEvent>Listener for QueueStatsEvent.src/core/events/types.ts:1488
transcription.errorEventListener<TranscriptionErrorEvent>Listener for TranscriptionErrorEvent.src/core/events/types.ts:1419
transcription.finalEventListener<TranscriptionFinalEvent>Listener for TranscriptionFinalEvent.src/core/events/types.ts:1410
transcription.interimEventListener<TranscriptionInterimEvent>Listener for TranscriptionInterimEvent.src/core/events/types.ts:1407
transcription.preflightEventListener<TranscriptionPreflightEvent>Listener for TranscriptionPreflightEvent.src/core/events/types.ts:1416
transcription.speechFinalEventListener<TranscriptionSpeechFinalEvent>Listener for TranscriptionSpeechFinalEvent.src/core/events/types.ts:1413
transcription.startEventListener<TranscriptionStartEvent>Listener for TranscriptionStartEvent.src/core/events/types.ts:1404
tts.audioEventListener<TTSAudioEvent>Listener for TTSAudioEvent.src/core/events/types.ts:1437
tts.completeEventListener<TTSCompleteEvent>Listener for TTSCompleteEvent.src/core/events/types.ts:1443
tts.errorEventListener<TTSErrorEvent>Listener for TTSErrorEvent.src/core/events/types.ts:1446
tts.metadataEventListener<TTSMetadataEvent>Listener for TTSMetadataEvent.src/core/events/types.ts:1440
tts.startEventListener<TTSStartEvent>Listener for TTSStartEvent.src/core/events/types.ts:1434
turn.metricsEventListener<TurnMetricsEvent>Listener for TurnMetricsEvent.src/core/events/types.ts:1491
vad.bargeInEventListener<VADBargeInEvent>Listener for VADBargeInEvent.src/core/events/types.ts:1503
vad.speechEndEventListener<VADSpeechEndEvent>Listener for VADSpeechEndEvent.src/core/events/types.ts:1500
vad.speechStartEventListener<VADSpeechStartEvent>Listener for VADSpeechStartEvent.src/core/events/types.ts:1497

© 2026 CompositeVoice. All rights reserved.

Font size
Contrast
Motion
Transparency