Optional sampleRate: numberOptional sampleStatic Readonly EVENT_Static Readonly EVENT_Whether this output and all outputs in the chain support pause/resume.
True once aclose has been called.
Convenience wrapper around AudioOutput.onPlaybackFinished so a remote transport can announce segment completion (or interruption) without needing access to the protected method.
Convenience wrapper around AudioOutput.onPlaybackStarted so a remote transport can announce "first byte played" without needing access to the protected method.
Developers building audio sinks must call this method when a playback/segment is finished. Segments are segmented by calls to flush() or clearBuffer()
Returns the underlying readable stream of audio frames + end-of-segment sentinels.
Each call returns the same shared stream; do not split between concurrent readers.
Wait for the past audio segments to finish playing out.
The event that was emitted when the audio finished playing out (only the last segment information)
AudioOutput implementation that buffers agent speech frames into a stream/queue so they can be consumed by an external transport (e.g. a custom websocket protocol used by an avatar plugin). Frames captured via captureFrame flow through the underlying stream as-is; on flush an AudioSegmentEnd sentinel is appended; on clearBuffer a
'clear_buffer'event is emitted with a QueueAudioOutputClearEvent payload so the consumer can drop any in-flight bytes and notify upstream of an interruption.Mirrors Python's
livekit.agents.voice.avatar.QueueAudioOutput.Ref: python livekit-agents/livekit/agents/voice/avatar/_queue_io.py