pub enum Frame {
Show 49 variants
Start(StartParams),
Cancel {
reason: Option<String>,
},
Error {
message: String,
fatal: bool,
processor: Option<Arc<str>>,
},
Interruption,
InputAudio(Arc<AudioFrame>),
UserAudio {
audio: Arc<AudioFrame>,
user_id: Arc<str>,
},
InputText(String),
InputDtmf(KeypadEntry),
UserStartedSpeaking,
UserStoppedSpeaking,
UserSpeaking,
BotStartedSpeaking,
BotStoppedSpeaking,
BotSpeaking,
VadUserStartedSpeaking {
start_secs: f32,
},
VadUserStoppedSpeaking {
stop_secs: f32,
},
SttMute(bool),
Metrics(Vec<MetricsData>),
TransportMessage {
payload: Value,
urgent: bool,
},
ClientConnected,
BotConnected,
FunctionCallsStarted(Vec<FunctionCall>),
FunctionCallInProgress {
call: FunctionCall,
cancel_on_interruption: bool,
},
FunctionCallCancel {
function_name: String,
tool_call_id: String,
},
OutputAudio(Arc<AudioFrame>),
TtsAudio {
audio: Arc<AudioFrame>,
context_id: Option<Arc<str>>,
},
Text(String),
LlmText(String),
Transcription {
text: String,
user_id: Arc<str>,
language: Option<Language>,
final_: bool,
},
InterimTranscription {
text: String,
user_id: Arc<str>,
language: Option<Language>,
},
TtsSpeak {
text: String,
append_to_context: Option<bool>,
},
TtsText {
text: String,
context_id: Option<Arc<str>>,
},
FunctionCallResult(FunctionCallResult),
LlmRun,
LlmContext(Arc<LlmContext>),
OutputDtmf(Vec<KeypadEntry>),
End {
reason: Option<String>,
},
Stop,
LlmResponseStart,
LlmResponseEnd,
TtsStarted {
context_id: Option<Arc<str>>,
},
TtsStopped {
context_id: Option<Arc<str>>,
},
UpdateSettings {
target: ServiceKind,
settings: Value,
},
SpeechControlParams {
vad: Option<VadParams>,
turn: Option<TurnParams>,
},
Heartbeat {
timestamp_ns: i64,
},
OutputTransportReady,
FilterEnable(bool),
MixerEnable(bool),
Custom(Arc<dyn CustomFrame>),
}Expand description
The frame that flows through every processor. One closed enum mirroring the
pipecat frame tree (frames.py), plus Frame::Custom for OSS extensions.
The hot audio variants box their payload in Arc<AudioFrame> so cloning a
frame for the broadcast/observer paths never copies PCM.
Variants§
Start(StartParams)
Pipeline init: carries sample rates + metric/trace toggles (StartFrame).
Cancel
Immediate stop; flush nothing (CancelFrame).
Error
Error notification pushed upstream (ErrorFrame). fatal ⇒ task cancels.
Interruption
Barge-in (InterruptionFrame). Broadcast both directions.
InputAudio(Arc<AudioFrame>)
Raw caller audio from a transport input (InputAudioRawFrame).
UserAudio
User-associated audio (UserAudioRawFrame) — carries user_id.
InputText(String)
Raw text input from a transport (InputTextRawFrame) — text-chat path.
InputDtmf(KeypadEntry)
Inbound DTMF keypress (InputDTMFFrame).
UserStartedSpeaking
VAD/turn lifecycle (frames.py:971-1104). One variant per pipecat frame.
UserStoppedSpeaking
UserSpeaking
BotStartedSpeaking
BotStoppedSpeaking
BotSpeaking
VadUserStartedSpeaking
Definitive VAD edges with the deciding secs (VAD*SpeakingFrame).
VadUserStoppedSpeaking
SttMute(bool)
Mute/unmute the STT service (STTMuteFrame).
Metrics(Vec<MetricsData>)
Performance metrics (MetricsFrame) — TTFB/processing/usage/turn.
TransportMessage
Transport-level message in/out urgent (Input/OutputTransportMessage*).
ClientConnected
SFU/transport lifecycle (ClientConnected).
BotConnected
SFU/transport lifecycle (BotConnected).
FunctionCallsStarted(Vec<FunctionCall>)
Function-call signalling (FunctionCallsStarted).
FunctionCallInProgress
Function-call signalling (FunctionCallInProgress).
FunctionCallCancel
Function-call signalling (FunctionCallCancel).
OutputAudio(Arc<AudioFrame>)
Output audio to a transport (OutputAudioRawFrame).
TtsAudio
TTS-generated audio, tagged with its context id (TTSAudioRawFrame).
Text(String)
Generic text (TextFrame) — flows LLM→aggregator→TTS.
LlmText(String)
LLM-generated text chunk (LLMTextFrame).
Transcription
Final transcription (TranscriptionFrame).
InterimTranscription
Interim/partial transcription (InterimTranscriptionFrame).
TtsSpeak
Text the TTS should speak (TTSSpeakFrame).
TtsText
Word/segment text emitted by TTS with its context (TTSTextFrame).
FunctionCallResult(FunctionCallResult)
Function-call result, fed back to the LLM (FunctionCallResultFrame).
Uninterruptible — once produced, context must always be updated.
LlmRun
Trigger an LLM run over the current context (LLMRunFrame).
LlmContext(Arc<LlmContext>)
The universal LLM context to run (LLMContextFrame).
OutputDtmf(Vec<KeypadEntry>)
Outbound DTMF (OutputDTMFFrame).
End
Graceful shutdown after flush (EndFrame). Uninterruptible.
Stop
Stop but keep processors connected (StopFrame). Uninterruptible.
LlmResponseStart
LLM response framing (LLMFullResponseStart).
LlmResponseEnd
LLM response framing (LLMFullResponseEnd).
TtsStarted
TTS response framing (TTSStartedFrame).
TtsStopped
TTS response framing (TTSStoppedFrame).
UpdateSettings
Update a service’s settings live (ServiceUpdateSettingsFrame).
Uninterruptible. target = STT/TTS/LLM/Filter/Mixer/All.
SpeechControlParams
Speech-control params broadcast (SpeechControlParamsFrame) + VAD param
updates (VADParamsUpdateFrame).
Heartbeat
Liveness probe (HeartbeatFrame).
OutputTransportReady
Output transport ready (OutputTransportReadyFrame).
FilterEnable(bool)
Enable/disable an input-leg audio filter at runtime (FilterEnableFrame,
frames.py:1971). Promoted out of Custom (PROCESSOR-DESIGN §1.2) so the
AudioFilterProcessor can be
toggled hot. Control class (ordered, interruptible).
MixerEnable(bool)
Enable/disable an output-leg audio mixer at runtime (MixerEnableFrame,
frames.py:2000). Promoted out of Custom. Toggles the
MixerProcessor. Control class.
Custom(Arc<dyn CustomFrame>)
Implementations§
Source§impl Frame
impl Frame
Sourcepub fn class(&self) -> FrameClass
pub fn class(&self) -> FrameClass
Scheduling class — drives queue priority + interruptibility
(PROCESSOR-DESIGN §2.3). Custom delegates to
CustomFrame::frame_class.
Sourcepub fn uninterruptible(&self) -> bool
pub fn uninterruptible(&self) -> bool
True ⇒ kept in the queue and not cancelled on interruption (pipecat
UninterruptibleFrame: End, Stop, FunctionCallResult, UpdateSettings).
Custom delegates to CustomFrame::uninterruptible.
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Whether this frame is a terminal lifecycle frame (End/Stop/Cancel)
that ends a PipelineTask when it reaches
the sink.