Expand description
The pipeline Frame taxonomy (PROCESSOR-DESIGN §1).
A closed Frame enum mirroring the pipecat frame tree
(pipecat/src/pipecat/frames/frames.py), plus a single Frame::Custom
variant carrying Arc<dyn CustomFrame> as the OSS extension hatch. Core
processors match on named variants (alloc-free, branch-predicted,
exhaustiveness-checked); OSS extensions ride in Custom and are downcast
only by the processors that care.
NOTE: this is distinct from crate::types (today’s data-shape module,
renamed from frame.rs in step M0). Frame here is the pipeline frame
that flows between FrameProcessors.
Structs§
- Audio
Frame - Mono 16-bit LE PCM with an explicit sample rate and channel count.
Mirrors today’s
crate::types::AudioChunk(PROCESSOR-DESIGN §1.1) but addsnum_channels; Arc-wrapped in theFrameenum so the hot path never copies PCM. Convertible from/toAudioChunk(mono) viaFrom. - Frame
Meta - Per-frame metadata, carried out of band in the channel
Envelopeso the hot enum variant (OutputAudio(Arc<AudioFrame>)) stays a thin pointer move (PROCESSOR-DESIGN §1.1). Mirrors the pipecatFramebase fields (frames.py:73-79). Cheap to clone (the extra map isArced). - Function
Call - A function/tool call request. Mirrors pipecat
FunctionCallFromLLM. - Function
Call Result - A function/tool call result, fed back to the LLM. Mirrors pipecat
FunctionCallResultFrame(frames.py:719). Uninterruptible. - Language
- A spoken-language tag (BCP-47-ish). Mirrors pipecat
Language(string-backed here so the long enum doesn’t bloat core; promote to a real enum if exhaustive matching is needed). - LlmContext
- The universal LLM context to run. Mirrors pipecat
LLMContext(frames.py:502). Opaque message list — providers interpret it. - Start
Params - Pipeline init params. Mirrors pipecat
StartFrame(frames.py:847). - Turn
Params - Turn-analyzer parameter bundle. Mirrors pipecat turn params.
- VadParams
- VAD parameter bundle broadcast on
Frame::SpeechControlParams. Mirrors pipecatVADParams.
Enums§
- Direction
- Direction of frame flow. Mirrors pipecat
FrameDirection(frame_processor.py:56).Downstream= source→sink;Upstream= sink→source (errors, end-of-task requests, RTVI acks). - Frame
- The frame that flows through every processor. One closed enum mirroring the
pipecat frame tree (
frames.py), plusFrame::Customfor OSS extensions. - Frame
Class - Frame scheduling class — mirrors pipecat’s three base classes
(
frames.py:95/106/118). Drives queue priority and interruptibility:Systemjumps the queue and survives interruption;Datais dropped on interruption;Controlis ordered like Data but also survives interruption whenuninterruptible()is set (e.g.End,Stop). - Frame
Kind - A payload-free discriminant for
Frame, used by event hooks (on_frame_reached_*), idle-frame detection, and observers that filter by type. Mirrors usingisinstanceon a pipecat frame class. - Keypad
Entry - A telephony keypad entry (DTMF). Mirrors pipecat
KeypadEntry. - Service
Kind - Which service a
Frame::UpdateSettings/ control frame targets. Mirrors pipecat’s settings-frame routing (frames.py:1878).
Traits§
- Custom
Frame - OSS extension point: a frame type defined outside flowcat-core, carried in
Frame::Custom. Processors that understand itdowncast_refviaCustomFrame::as_any; everyone else forwards it unchanged.
Functions§
- next_
frame_ id - Allocate the next process-unique monotonic frame id.