Skip to content

QueueOverflowEvent

Emitted when an AudioBufferQueue drops chunks due to overflow.

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

Emitted when an AudioBufferQueue drops chunks due to overflow.

Remarks

This event fires each time the queue drops one or more chunks because it has reached its configured maxSize and the overflow strategy is 'drop-oldest' or 'drop-newest'. The event includes the queue name, the number of chunks dropped in this overflow instance, and the current buffer size after the drop.

Monitoring this event helps detect situations where the STT or output consumer is too slow to keep up with the producer, potentially causing audio gaps.

Example

agent.on('queue.overflow', (event) => {
  console.warn(
    `Queue "${event.queueName}" overflowed: ` +
    `${event.droppedChunks} chunks dropped, ${event.currentSize} remaining`
  );
});

See

Extends

  • BaseEvent

Properties

PropertyTypeDescriptionInherited fromDefined in
currentSizenumberCurrent number of chunks in the buffer after the drop. Remarks Equals the queue’s maxSize for 'drop-oldest' (the buffer remains full after replacing the oldest chunk).-src/core/events/types.ts:853
droppedChunksnumberNumber of chunks dropped in this overflow instance. Remarks For 'drop-oldest' and 'drop-newest' strategies, this is typically 1 per overflow event. The cumulative total is available via QueueStatsEvent.totalDropped or QueueStats.totalDropped.-src/core/events/types.ts:844
metadata?Record<string, unknown>Optional metadata associated with the event. Remarks May contain provider-specific data or debugging information.BaseEvent.metadatasrc/core/events/types.ts:88
queueNamestringDiagnostic name of the queue that overflowed. Remarks Typically 'input' (between InputProvider and STT) or 'output' (between TTS and OutputProvider).-src/core/events/types.ts:834
timestampnumberUnix timestamp (in milliseconds) when the event occurred. Remarks Useful for latency measurements and debugging the pipeline timing.BaseEvent.timestampsrc/core/events/types.ts:80
type"queue.overflow"Discriminant for this event type.-src/core/events/types.ts:825

© 2026 CompositeVoice. All rights reserved.

Font size
Contrast
Motion
Transparency