frames
Core frame definitions for the Pipecat AI framework.
This module contains all frame types used throughout the Pipecat pipeline system, including data frames, system frames, and control frames for audio, video, text, and LLM processing.
- pipecat.frames.frames.AggregationType
Deprecated alias for
TextType.Deprecated since version 1.13.0: Use
TextTypeinstead. Will be removed in 2.0.0.
- pipecat.frames.frames.format_pts(pts: int | None)[source]
Format presentation timestamp (PTS) in nanoseconds to a human-readable string.
Converts a PTS value in nanoseconds to a string representation.
- Parameters:
pts – Presentation timestamp in nanoseconds, or None if not set.
- class pipecat.frames.frames.Frame[source]
Bases:
objectBase frame class for all frames in the Pipecat pipeline.
All frames inherit from this base class and automatically receive unique identifiers, names, and metadata support.
- Parameters:
id – Unique identifier for the frame instance.
name – Human-readable name combining class name and instance count.
pts – Presentation timestamp in nanoseconds.
broadcast_sibling_id – ID of the paired frame when this frame was broadcast in both directions. Set automatically by
broadcast_frame()andbroadcast_frame_instance().metadata – Dictionary for arbitrary frame metadata.
transport_source – Name of the transport source that created this frame.
transport_destination – Name of the transport destination for this frame.
interruptible – Whether an interruption may drop this frame from a processor’s queue or cancel its processing. True unless the frame’s class declares
interruptible: bool = field(default=False, init=False), asEndFramedoes. Set it on a frame before pushing it to decide for that frame alone.
- class pipecat.frames.frames.SystemFrame[source]
Bases:
FrameSystem frame class for immediate processing.
A frame that takes higher priority than other frames. System frames are handled in order and are not affected by user interruptions.
- class pipecat.frames.frames.DataFrame[source]
Bases:
FrameData frame class for processing data in order.
A frame that is processed in order and usually contains data such as LLM context, text, audio or images. Data frames are cancelled by user interruptions.
- class pipecat.frames.frames.ControlFrame[source]
Bases:
FrameControl frame class for processing control information in order.
A frame that, similar to data frames, is processed in order and usually contains control information such as update settings or to end the pipeline after everything is flushed. Control frames are cancelled by user interruptions.
- class pipecat.frames.frames.UninterruptibleFrame(**kwargs)[source]
Bases:
objectA marker for frames that are uninterruptible by default.
Deprecated since version 1.11.0: Use the
interruptiblefield withdefault=Falseinstead::interruptible: bool = field(default=False, init=False)
Will be removed in 2.0.0.
Frames with this mixin start with
Frame.interruptibleFalse.
- class pipecat.frames.frames.AudioRawFrame(audio: bytes, sample_rate: int, num_channels: int)[source]
Bases:
objectA frame containing a chunk of raw audio.
- Parameters:
audio – Raw audio bytes in PCM format.
sample_rate – Audio sample rate in Hz.
num_channels – Number of audio channels.
num_frames – Number of audio frames (calculated automatically).
- class pipecat.frames.frames.ImageRawFrame(image: bytes, size: tuple[int, int], format: str | None)[source]
Bases:
objectA frame containing a raw image.
- Parameters:
image – Raw image bytes.
size – Image dimensions as (width, height) tuple.
format – Image format (e.g., ‘RGB’, ‘RGBA’).
- class pipecat.frames.frames.FileRawFrame(file: str, type: Literal['bytes', 'url'], filename: str | None, format: str)[source]
Bases:
objectA frame containing a raw file.
- Parameters:
file – A base64 data URL, or a URL string, depending on
type.type – Type of the file (‘bytes’ or ‘url’).
filename – Optional name of the file.
format – File format (expected in Mime Format).
- class pipecat.frames.frames.OutputAudioRawFrame(audio: bytes, sample_rate: int, num_channels: int)[source]
Bases:
DataFrame,AudioRawFrameAudio data frame for output to transport.
A chunk of raw audio that will be played by the output transport. If the transport supports multiple audio destinations (e.g. multiple audio tracks) the destination name can be specified in transport_destination.
- class pipecat.frames.frames.OutputImageRawFrame(image: bytes, size: tuple[int, int], format: str | None)[source]
Bases:
DataFrame,ImageRawFrameImage data frame for output to transport.
An image that will be shown by the transport. If the transport supports multiple video destinations (e.g. multiple video tracks) the destination name can be specified in transport_destination.
- Parameters:
sync_with_audio – If True, the image is queued with audio frames so it is only displayed after all preceding audio has been sent. Defaults to False (image is displayed immediately when the output transport receives it).
- class pipecat.frames.frames.TTSAudioRawFrame(audio: bytes, sample_rate: int, num_channels: int, context_id: str | None = None)[source]
Bases:
OutputAudioRawFrameAudio data frame generated by Text-to-Speech services.
A chunk of output audio generated by a TTS service, ready for playback.
- Parameters:
context_id – Unique identifier for the TTS context that generated this audio.
- class pipecat.frames.frames.SpeechOutputAudioRawFrame(audio: bytes, sample_rate: int, num_channels: int)[source]
Bases:
OutputAudioRawFrameAn audio frame part of a speech audio stream.
This frame is part of a continuous stream of audio frames containing speech. The audio stream might also contain silence frames, so a process to distinguish between speech and silence might be needed.
- class pipecat.frames.frames.URLImageRawFrame(image: bytes, size: tuple[int, int], format: str | None, url: str | None = None)[source]
Bases:
OutputImageRawFrameImage frame with an associated URL.
An output image with an associated URL. These images are usually generated by third-party services that provide a URL to download the image.
- Parameters:
url – URL where the image can be downloaded from.
- class pipecat.frames.frames.SpriteFrame(images: list[OutputImageRawFrame])[source]
Bases:
DataFrameAnimated sprite frame containing multiple images.
An animated sprite that will be shown by the transport if the transport’s camera is enabled. Will play at the framerate specified in the transport’s camera_out_framerate constructor parameter.
- Parameters:
images – List of image frames that make up the sprite animation.
- class pipecat.frames.frames.TextFrame(text: str)[source]
Bases:
DataFrameText data frame for passing text through the pipeline.
A chunk of text. Emitted by LLM services, consumed by context aggregators, TTS services and more. Can be used to send text through processors.
- Parameters:
text – The text content.
skip_tts – Whether this text should be skipped by the TTS service.
includes_inter_frame_spaces – Whether any necessary inter-frame (leading/trailing) spaces are already included in the text.
append_to_context – Whether this text should be appended to the LLM context. Defaults to True.
- class pipecat.frames.frames.LLMTextFrame(text: str)[source]
Bases:
TextFrameText frame generated by LLM services.
- class pipecat.frames.frames.LLMMarkerFrame(marker: str, append_to_context_immediately: bool = True)[source]
Bases:
DataFrameSideband marker emitted by an LLM service.
A marker is short, structured assistant output that should be persisted in the conversation context but should not flow through the standard text path (TTS, transcript). The assistant aggregator writes the marker to the context so the LLM can self-condition on prior markers on subsequent turns.
The primary use today is turn completion, where
LLMTurnCompletionLLMExtensionemits the turn-completion markers ● / ◐ / ○ on every response. The frame is intentionally generic so other components — STT services with built-in turn signals, end-of-turn classifiers, custom annotations, etc. — can use the same mechanism to inject sideband signals into the assistant context.- Parameters:
marker – The marker payload (typically a short string such as a single character).
append_to_context_immediately – If True, the marker is written to the context as its own standalone assistant message as soon as it’s received. If False, the marker is appended to the running assistant aggregation and flushed to the context together with the following text as a single message (e.g. for the ● case the context message ends up as “● <response>”).
- class pipecat.frames.frames.LLMMarkerResponseFrame(raw: str, marker: str | None = None, kind: str | None = None, markers: list[str] = <factory>)[source]
Bases:
DataFrameWhat a marker-reading LLM service made of one whole response.
Pushed when the response ends, after the
LLMMarkerFrameand the spoken text: the marker it found, what it meant, and the raw text the LLM produced before anything was held back. A reply dropped as a silent mark is reported as soon as the mark is read, broadcast both ways: the user aggregator starts its idle or waiting timer over on it, and the assistant aggregator records nothing for the reply. A diagnostic otherwise, for consumers that check how well the LLM follows the marker protocol; it plays no part in the conversation.- Parameters:
raw – The response text as the LLM produced it, markers included; for a silent reply, its opening up to the mark.
marker – The marker found, or
Nonewhen the response carried none.kind – What the marker meant, in the emitter’s own vocabulary, for consumers that should not depend on the marker text (which is configurable). The turn-completion extension uses
"complete","short"and"long"; the wait-reassurance extension uses"silent"for a reply it dropped as its silent mark.markers – Every marker the emitter recognizes, so a consumer can find them in
rawwithout knowing the emitter’s configuration.
- class pipecat.frames.frames.AggregatedTextFrame(*args, **kwargs)[source]
Bases:
TextFrameText frame representing an aggregation of TextFrames.
This frame contains multiple TextFrames aggregated together for processing or output along with a field to indicate what kind of text they make.
- Parameters:
text_type – The kind of text, such as a sentence, a word or a custom type like
"code".context_id – Unique identifier for the TTS context that generated this text.
raw_text – The full matched text including start/end pattern delimiters, set when this frame was produced from a PatternMatch (e.g. a
<code>...</code>block). None for ordinary sentence aggregations.will_be_spoken – Whether the TTS service will speak this frame. Set to
Trueby the TTS service just before synthesis. Defaults toFalse.
- class pipecat.frames.frames.VisionTextFrame(text: str)[source]
Bases:
LLMTextFrameText frame generated by vision services.
- class pipecat.frames.frames.TTSTextFrame(*args, **kwargs)[source]
Bases:
AggregatedTextFrameText frame generated by Text-to-Speech services.
- Parameters:
segment_id – ID of the AggregatedTextFrame this text is part of, when the TTS service built it from one. A word reported by the TTS carries the ID of the sentence or other segment it was spoken in.
delivery – The delivery this text is spoken in, such as
["warm"], and"emphasis"for stressed words; empty for the voice’s baseline. None when the text carries no delivery. Each name is as written in its tag, so a universal name such aswarmstays universal whatever the service calls it. Part of expressive conversation (alpha).
- class pipecat.frames.frames.AggregatedTextProgressFrame(*args, **kwargs)[source]
Bases:
DataFrameProgress frame emitted alongside each TTSTextFrame during word-timestamp playback.
Carries the spoken-so-far / remaining-text breakdown for the active AggregatedTextFrame slot, enabling downstream consumers (e.g. the RTVI observer) to do word-level highlighting without coupling to internal sequencer state.
- Parameters:
segment_id – ID of the AggregatedTextFrame being spoken.
context_id – TTS context this frame belongs to.
text – Full original text of the source AggregatedTextFrame.
text_type – Text type of the source AggregatedTextFrame.
accumulated_text – Text already spoken in this slot (including the current word).
remaining_text – Text not yet spoken in this slot.
delivery – The delivery of the word just spoken, which changes within the text where its delivery does. Part of expressive conversation (alpha).
- class pipecat.frames.frames.TranscriptionSpeaker(label: str, number: int)[source]
Bases:
objectA speaker an STT service’s diarization told apart in a transcription stream.
Labels are opaque and provider-specific. Numbers count speakers in the order they first appeared in the STT service’s session, so they read the same whatever labels the provider uses. Both only hold within that session: a provider that restarts its labels (e.g. after a reconnect) may give a known label, and so its number, to a different person, and services that diarize each speech segment separately don’t keep labels across segments.
- Parameters:
label – The provider’s label for the speaker (e.g.
"A","S1","2").number – The speaker’s place in the order speakers first appeared, starting at
1.
- class pipecat.frames.frames.TranscriptionFrame(text: str, user_id: str, timestamp: str, language: Language | None = None, result: Any | None = None, finalized: bool = False, speaker: TranscriptionSpeaker | None = None, *, perception: list[PerceptionSignal] | None = None)[source]
Bases:
TextFrameText frame containing speech transcription data.
A text frame with transcription-specific data. The result field contains the result from the STT service if available.
- Parameters:
user_id – Identifier of the participant whose audio was transcribed, as reported by the input transport (e.g. a Daily or LiveKit participant id). Empty when the transport does not identify participants.
timestamp – When the transcription occurred.
language – Detected or specified language of the speech.
result – Raw result from the STT service.
finalized – Whether this is the final transcription for an utterance. Set by STT services that support commit/finalize signals.
speaker – The speaker the STT service’s diarization assigned to this text, or
Nonewhen diarization is off or the service gave no label. Speakers only distinguish people within one transcription stream and are not participant identities: several speakers can share oneuser_idwhen they share an audio stream.perception – How the user said these words, as a perception producer read them, or None. Set by an STT service that perceives, or by a processor after it. Part of expressive conversation (alpha).
- speaker: TranscriptionSpeaker | None = None
- perception: list[PerceptionSignal] | None = None
- class pipecat.frames.frames.InterimTranscriptionFrame(text: str, user_id: str, timestamp: str, language: Language | None = None, result: Any | None = None, speaker: TranscriptionSpeaker | None = None, *, perception: list[PerceptionSignal] | None = None)[source]
Bases:
TextFrameText frame containing partial/interim transcription data.
A text frame with interim transcription-specific data that represents partial results before final transcription. The result field contains the result from the STT service if available.
- Parameters:
user_id – Identifier of the participant whose audio was transcribed, as reported by the input transport (e.g. a Daily or LiveKit participant id). Empty when the transport does not identify participants.
timestamp – When the interim transcription occurred.
language – Detected or specified language of the speech.
result – Raw result from the STT service.
speaker – The speaker the STT service’s diarization assigned to this text, or
Nonewhen diarization is off or the service gave no label. Speakers only distinguish people within one transcription stream and are not participant identities: several speakers can share oneuser_idwhen they share an audio stream.perception – A provisional reading of how the user said these words, or None. Part of expressive conversation (alpha).
- speaker: TranscriptionSpeaker | None = None
- perception: list[PerceptionSignal] | None = None
- class pipecat.frames.frames.EagerTranscriptionFrame(text: str, user_id: str, timestamp: str, language: Language | None = None, result: Any | None = None, speaker: TranscriptionSpeaker | None = None, *, perception: list[PerceptionSignal] | None = None)[source]
Bases:
TextFrameTranscript of a turn a service predicts has ended, before it commits.
Some STT services emit a provisional end of turn ahead of the real one, so a response can be generated during the gap. The prediction may be withdrawn (
UserTurnResponseCancelFrame) and the committed transcript may differ from this one, so nothing produced from it may reach the user or the context until it is confirmed. SeeEagerUserTurnStopStrategy.- Parameters:
user_id – Identifier of the participant whose audio was transcribed, as reported by the input transport (e.g. a Daily or LiveKit participant id). Empty when the transport does not identify participants.
timestamp – When the eager end of turn occurred.
language – Detected or specified language of the speech.
result – Raw result from the STT service.
speaker – The speaker the STT service’s diarization assigned to this text, or
Nonewhen diarization is off or the service gave no label. Speakers only distinguish people within one transcription stream and are not participant identities: several speakers can share oneuser_idwhen they share an audio stream.perception – How the user said the turn, as a perception producer read it at the predicted end of turn, or None. A speculative inference answers the turn with it. Part of expressive conversation (alpha).
- speaker: TranscriptionSpeaker | None = None
- perception: list[PerceptionSignal] | None = None
- class pipecat.frames.frames.TranscriptionFinalizedFrame(user_id: str = '', timestamp: str = '')[source]
Bases:
DataFrameConfirmation that the transcription of an utterance is complete.
An STT service asked to finalize may have delivered the last of the text already, before it could tell that nothing more was coming. Its confirmation then has no text to carry, and this frame is how it reaches the pipeline. It means what
finalized=Truemeans on aTranscriptionFrame, for the transcripts pushed before it.An utterance is finalized by one or the other, never both: by its last
TranscriptionFramewhen the confirmation arrives with text, and by this frame when it arrives without.- Parameters:
user_id – Identifier of the participant whose audio was transcribed, as on the transcripts this confirms.
timestamp – When the confirmation arrived.
- class pipecat.frames.frames.TranslationFrame(text: str, user_id: str, timestamp: str, language: Language | None = None)[source]
Bases:
TextFrameText frame containing translated transcription data.
A text frame with translated transcription data that will be placed in the transport’s receive queue when a participant speaks.
- Parameters:
user_id – Identifier for the user who spoke.
timestamp – When the translation occurred.
language – Target language of the translation.
- class pipecat.frames.frames.UserBackchannelFrame(text: str, user_id: str, timestamp: str)[source]
Bases:
DataFrameA short acknowledgment the user said while the bot talks, such as “mhm”.
Pushed in place of a transcription, so the bot keeps talking and the acknowledgment stays out of the LLM context.
- Parameters:
text – What the user said.
user_id – Identifier for the user who spoke.
timestamp – When the user said it.
- class pipecat.frames.frames.LLMContextAssistantTimestampFrame(timestamp: str)[source]
Bases:
DataFrameTimestamp information for assistant messages in LLM context.
- Parameters:
timestamp – Timestamp when the assistant message was created.
- class pipecat.frames.frames.LLMContextAssistantTurnFrame(text: str, timestamp: str)[source]
Bases:
DataFrameThe aggregated text of a completed assistant turn.
Broadcast by the LLM assistant aggregator when a turn ends, carrying the text stored in the LLM context. With expressive conversation on, it is the words alone, while the context keeps the expression tags the LLM wrote. Processors upstream and downstream (e.g. STT services) can handle this frame to react to each completed bot reply without needing a separate observer.
- Parameters:
text – The assistant’s aggregated spoken text for this turn.
timestamp – ISO-8601 timestamp of when the assistant turn started.
- class pipecat.frames.frames.LLMContextUserTurnFrame(text: str, timestamp: str, perception: list[PerceptionSignal] | None = None, speculation: bool = False)[source]
Bases:
DataFrameThe aggregated text of a user turn, as written to the LLM context.
Broadcast by the LLM user aggregator each time it writes what the user said to the context, so it holds what the bot heard: a transcription the aggregator leaves out, such as one while the user is muted, is not in it.
A turn answered from an eager end of turn is also broadcast as a speculation, ahead of the inference that answers it, so processors after the LLM learn the turn before its held response is released. A
UserTurnResponseCancelFramewithdraws it, and the turn written to the context once it ends can differ from it.- Parameters:
text – The user’s aggregated transcript for this turn.
timestamp – ISO-8601 timestamp of when the user turn started.
perception – The reading of how the user spoke that is written at the head of the user message, with expressive conversation on and a perception producer in the pipeline, or None. Part of expressive conversation (alpha).
speculation – Whether this is the turn a speculative inference answers, written only to a provisional context and not yet part of the conversation.
- perception: list[PerceptionSignal] | None = None
- class pipecat.frames.frames.LLMContextFrame(context: LLMContext, speculation: bool = False)[source]
Bases:
FrameFrame containing a universal LLM context.
Used as a signal to LLM services to ingest the provided context and generate a response based on it.
- Parameters:
context – The LLM context containing messages, tools, and configuration.
speculation – Whether this inference is speculative, run from a provisional context that is not part of the conversation. Its response must not reach the user or the context until the turn is confirmed, and the service must not execute tool calls for it.
- class pipecat.frames.frames.LLMThoughtStartFrame(append_to_context: bool = False, llm: str | None = None)[source]
Bases:
ControlFrameFrame indicating the start of an LLM thought.
- Parameters:
append_to_context – Whether the thought should be appended to the LLM context. If it is appended, the llm field is required, since it will be appended as an LLMSpecificMessage.
llm – Optional identifier of the LLM provider for LLM-specific handling. Only required if append_to_context is True, as the thought is appended to context as an LLMSpecificMessage.
- class pipecat.frames.frames.LLMThoughtTextFrame(text: str)[source]
Bases:
DataFrameFrame containing the text (or text chunk) of an LLM thought.
Note that despite this containing text, it is a DataFrame and not a TextFrame, to avoid most typical text processing, such as TTS.
- Parameters:
text – The text (or text chunk) of the thought.
- class pipecat.frames.frames.LLMThoughtEndFrame(signature: Any = None)[source]
Bases:
ControlFrameFrame indicating the end of an LLM thought.
- Parameters:
signature – Optional signature associated with the thought. This is used by Anthropic, which includes a signature at the end of each thought.
- class pipecat.frames.frames.LLMRunFrame[source]
Bases:
DataFrameFrame to trigger LLM processing with current context.
A frame that instructs the LLM service to process the current context and generate a response.
- class pipecat.frames.frames.LLMMessagesAppendFrame(messages: list[LLMContextMessage], run_llm: bool | None = None)[source]
Bases:
DataFrameFrame containing LLM messages to append to current context.
A frame containing a list of LLM messages that need to be added to the current context.
- Parameters:
messages – List of context messages to append.
run_llm – Whether the context update should be sent to the LLM.
- class pipecat.frames.frames.LLMMessagesUpdateFrame(messages: list[LLMContextMessage], run_llm: bool | None = None)[source]
Bases:
DataFrameFrame containing LLM messages to replace current context.
A frame containing a list of new LLM messages to replace the current context LLM messages.
- Parameters:
messages – List of context messages to replace current context.
run_llm – Whether the context update should be sent to the LLM.
- class pipecat.frames.frames.LLMMessagesTransformFrame(transform: Callable[[list[LLMContextMessage]], list[LLMContextMessage]], run_llm: bool | None = None)[source]
Bases:
DataFrameFrame containing a transform function to modify the current context’s LLM messages.
A frame containing a transform function that takes the context’s current list of LLM messages and returns a modified list.
- Parameters:
transform – A function that takes a list of messages and returns a modified list.
run_llm – Whether the context update should be sent to the LLM.
- class pipecat.frames.frames.LLMSetToolsFrame(tools: list[FunctionSchema | DirectFunction] | ToolsSchema | NotGiven)[source]
Bases:
DataFrameFrame containing tools for LLM function calling.
Used to change the set of tools advertised to the LLM mid-conversation.
- Parameters:
tools – The tools to advertise. May be a
ToolsSchema, a plain list of direct functions and/orFunctionSchemaobjects (normalized to aToolsSchema, with direct-function handlers auto-registered), orNOT_GIVENto clear tools. Provider-native tools travel in aToolsSchema’scustom_tools, keyed by adapter type.
- class pipecat.frames.frames.LLMSetToolChoiceFrame(tool_choice: Literal['none', 'auto', 'required'] | dict)[source]
Bases:
DataFrameFrame containing tool choice configuration for LLM function calling.
- Parameters:
tool_choice – Tool choice setting - ‘none’, ‘auto’, ‘required’, or specific tool dict.
- class pipecat.frames.frames.LLMEnablePromptCachingFrame(enable: bool)[source]
Bases:
DataFrameFrame to enable/disable prompt caching in LLMs.
- Parameters:
enable – Whether to enable prompt caching.
- class pipecat.frames.frames.LLMConfigureOutputFrame(skip_tts: bool)[source]
Bases:
DataFrameFrame to configure LLM output.
This frame is used to configure how the LLM produces output. For example, it can tell the LLM to generate tokens that should be added to the context but not spoken by the TTS service (if one is present in the pipeline).
- Parameters:
skip_tts – Whether LLM tokens should skip the TTS service (if any).
- class pipecat.frames.frames.FunctionCallResultProperties(run_llm: bool | None = None, on_context_updated: Callable[[], Awaitable[None]] | None = None, is_final: bool = True)[source]
Bases:
objectProperties for configuring function call result behavior.
- Parameters:
run_llm – Whether to run the LLM after receiving this result.
on_context_updated – Callback to execute when context is updated.
is_final – Whether this is the final result for the function call. When
Falsethe result is treated as an intermediate update. Defaults toTrue. Only meaningful for async function calls (cancel_on_interruption=False). A speech-to-speech service takes one output per call, so it puts an intermediate result to its model some other way — a conversation item, a text event, a response that keeps the call open — andrun_llmsays whether the model should answer it or just take it in. A service that can’t do that at all says so withaccepts_intermediate_function_call_resultsand drops intermediate results with a warning.
- class pipecat.frames.frames.FunctionCallResultFrame(function_name: str, tool_call_id: str, arguments: Any, result: Any, run_llm: bool | None = None, properties: FunctionCallResultProperties | None = None, error: str | None = None)[source]
Bases:
DataFrameFrame containing the result of an LLM function call.
This is an uninterruptible frame because once a result is generated we always want to update the context.
- Parameters:
function_name – Name of the function that was executed.
tool_call_id – Unique identifier for the function call.
arguments – Arguments that were passed to the function.
result – The result returned by the function.
run_llm – Whether to run the LLM after this result.
properties – Additional properties for result handling.
error – What went wrong, when the call ended because its handler raised. The
resultis then a stand-in message written for the LLM to read, rather than anything the handler returned.
- properties: FunctionCallResultProperties | None = None
- class pipecat.frames.frames.TTSSpeakFrame(text: str, append_to_context: bool = True, text_type: TextType | str = TextType.SENTENCE)[source]
Bases:
DataFrameFrame containing text that should be spoken by TTS.
A frame that contains text that should be spoken by the TTS service in the pipeline (if any).
Set
interruptible=Falseon the frame to preserve its synthesis and generated audio and text through interruptions.- Parameters:
text – The text to be spoken.
append_to_context – Whether the spoken text should be appended to the LLM context. Defaults to True. (Note that, as of version 1.4.0,
None— the previous default — is no longer a supported value.)text_type – The text type of the text frames the TTS service pushes for the spoken text, a sentence by default. A custom type lets them be told apart, for example to keep them from the client with
RTVIObserverParams.skip_text_types.
- class pipecat.frames.frames.BotBackchannelFrame(text: str, append_to_context: bool = False)[source]
Bases:
TTSSpeakFrameA short acknowledgment for the bot to say while the user talks, such as “Mm-hmm.”.
The TTS service speaks it like any
TTSSpeakFrame, and its text frames have typeTextType.BACKCHANNEL. Interruptions don’t cut it off unlessinterruptibleis set to True on the frame.- Parameters:
append_to_context – Whether the spoken text should be appended to the LLM context. Defaults to False.
- class pipecat.frames.frames.OutputTransportMessageFrame(message: Any)[source]
Bases:
DataFrameFrame containing transport-specific message data.
- Parameters:
message – The transport message payload.
- class pipecat.frames.frames.DTMFFrame[source]
Bases:
objectMarker base class for DTMF (Dual-Tone Multi-Frequency) keypad frames.
Used only as a shared tag so that both input and output DTMF frames can be identified via
isinstance(frame, DTMFFrame). The concrete frames define their own fields.
- class pipecat.frames.frames.OutputDTMFFrame(button: KeypadEntry | None = None, buttons: list[KeypadEntry] | None = None)[source]
-
DTMF keypress output frame for transport queuing.
- Parameters:
button – Convenience shortcut for sending a single DTMF keypad entry. Equivalent to
buttons=[button]. If bothbuttonsandbuttonare provided,buttonstakes precedence.buttons – Sequence of one or more DTMF keypad buttons to send. Use
from_string()to build this from a string like"123#".
- button: KeypadEntry | None = None
- buttons: list[KeypadEntry] | None = None
- classmethod from_string(buttons: str, **kwargs) OutputDTMFFrame[source]
Build an
OutputDTMFFramefrom a string of DTMF characters.- Parameters:
buttons – A string like
"123#". Each character must be a validKeypadEntryvalue.**kwargs – Additional keyword arguments forwarded to the frame constructor.
- Returns:
A frame of type
clswithbuttonspopulated as a list ofKeypadEntry.
- to_string() str[source]
Return the frame’s
buttonsas a dial string.- Returns:
A string such as
"123#"formed by concatenating the values of eachKeypadEntryinbuttons, or an empty string ifbuttonsis not set.
- class pipecat.frames.frames.StartFrame(audio_in_sample_rate: int = 16000, audio_out_sample_rate: int = 24000, enable_metrics: bool = False, enable_tracing: bool = False, enable_usage_metrics: bool = False, report_only_initial_ttfb: bool = False, tracing_context: TracingContext | None = None)[source]
Bases:
SystemFrameInitial frame to start pipeline processing.
This is the first frame that should be pushed down a pipeline to initialize all processors with their configuration parameters.
- Parameters:
audio_in_sample_rate –
Input audio sample rate in Hz.
Deprecated since version 1.8.0: Read
audio_in_sample_rateinFrameProcessorSetup.setup()instead. Will be removed in 2.0.0.audio_out_sample_rate –
Output audio sample rate in Hz.
Deprecated since version 1.8.0: Read
audio_out_sample_rateinFrameProcessorSetup.setup()instead. Will be removed in 2.0.0.enable_metrics –
Whether to enable performance metrics collection.
Deprecated since version 1.8.0: Read
enable_metricsinFrameProcessorSetup.setup()instead. Will be removed in 2.0.0.enable_tracing –
Whether to enable OpenTelemetry tracing.
Deprecated since version 1.8.0: Read
enable_tracinginFrameProcessorSetup.setup()instead. Will be removed in 2.0.0.enable_usage_metrics –
Whether to enable usage metrics collection.
Deprecated since version 1.8.0: Read
enable_usage_metricsinFrameProcessorSetup.setup()instead. Will be removed in 2.0.0.report_only_initial_ttfb –
Whether to report only initial time-to-first-byte.
Deprecated since version 1.8.0: Read
report_only_initial_ttfbinFrameProcessorSetup.setup()instead. Will be removed in 2.0.0.tracing_context –
Pipeline-scoped tracing context for span hierarchy.
Deprecated since version 1.8.0: Read
tracing_contextinFrameProcessorSetup.setup()instead. Will be removed in 2.0.0.
- tracing_context: TracingContext | None = None
- class pipecat.frames.frames.CancelFrame(reason: Any | None = None)[source]
Bases:
SystemFrameFrame indicating pipeline should stop immediately.
Indicates that a pipeline needs to stop right away without processing remaining queued frames.
- Parameters:
reason – Optional reason for pushing a cancel frame.
- class pipecat.frames.frames.ErrorFrame(error: str, fatal: bool = False, processor: FrameProcessor | None = None, exception: Exception | None = None, category: ErrorCategory | None = None)[source]
Bases:
SystemFrameFrame notifying of errors in the pipeline.
This is used to notify upstream that an error has occurred downstream in the pipeline.
- Parameters:
error – Description of the error that occurred. Credentials it quotes (an API key, a signed URL’s signature, an auth header) are masked, since the description is logged and reported wherever the error goes.
fatal –
Whether the error is fatal and requires bot shutdown.
Deprecated since version 1.8.0: Use
FrameProcessor.push_error()withforce_treat_as_permanent=Trueinstead, when the error leaves its originating processor unable to do its job: it marks that processor unusable and the pipeline worker applies itsProcessorUnusablePolicy. For an error that isn’t about a processor’s state, push anEndWorkerFrameafter the error to end the pipeline. Will be removed in 2.0.0.processor – The frame processor that generated the error.
exception – The exception that occurred.
category – What kind of failure this was, drawn from ErrorCategory: rejected credentials, an unreachable provider, a malformed request and so on.
Nonemeans nobody has said yet, which invites the category to be worked out from the exception; set it to ErrorCategory.UNKNOWN to report an error whose cause can’t be attributed. Always set by the time the frame travels.
- processor: FrameProcessor | None = None
- category: ErrorCategory | None = None
- class pipecat.frames.frames.FatalErrorFrame(**kwargs)[source]
Bases:
ErrorFrameFrame notifying of unrecoverable errors requiring bot shutdown.
Deprecated since version 1.8.0: Use
ErrorFrameinstead. Report the error withFrameProcessor.push_error()andforce_treat_as_permanent=Truewhen it leaves its originating processor unable to do its job — the pipeline worker then applies itsProcessorUnusablePolicy, of whichCANCELshuts the bot down. For an error that isn’t about a processor’s state, push anEndWorkerFrameafter the error instead. Will be removed in 2.0.0.- Parameters:
fatal – Always True for fatal errors.
- class pipecat.frames.frames.FrameProcessorPauseUrgentFrame(processor: FrameProcessor)[source]
Bases:
SystemFrameFrame to pause frame processing immediately.
This frame is used to pause frame processing for the given processor as fast as possible. Pausing frame processing will keep frames in the internal queue which will then be processed when frame processing is resumed with FrameProcessorResumeFrame.
- Parameters:
processor – The frame processor to pause.
- class pipecat.frames.frames.FrameProcessorResumeUrgentFrame(processor: FrameProcessor)[source]
Bases:
SystemFrameFrame to resume frame processing immediately.
This frame is used to resume frame processing for the given processor if it was previously paused as fast as possible. After resuming frame processing all queued frames will be processed in the order received.
Note
This frame is now equivalent to FrameProcessorResumeFrame, which was changed to a SystemFrame to fix a bug where resume frames would get stuck in the blocked processing queue.
- Parameters:
processor – The frame processor to resume.
- class pipecat.frames.frames.InterruptionFrame[source]
Bases:
SystemFrameFrame pushed to interrupt the pipeline.
This frame is used to interrupt the pipeline. For example, when a user starts speaking to cancel any in-progress bot output. It can also be pushed by any processor.
- class pipecat.frames.frames.UserStartedSpeakingFrame[source]
Bases:
SystemFrameFrame indicating that the user turn has started.
Emitted when the user turn starts, which usually means that some transcriptions are already available.
- class pipecat.frames.frames.UserStoppedSpeakingFrame[source]
Bases:
SystemFrameFrame indicating that the user turn has ended.
Emitted when the user turn ends. This usually coincides with the start of the bot turn. A
SpeculationGatereleases whatever speculative response it is holding on this frame, since the turn that response answers has now ended.
- class pipecat.frames.frames.UserTurnResponseCancelFrame[source]
Bases:
SystemFrameFrame cancelling the speculative response for the current user turn.
Emitted when an eager end of turn is withdrawn (the user resumed speaking, or the committed transcript doesn’t match the eager one). The LLM service stops generating, and its
SpeculationGatediscards what it was holding — which is everything the response produced, so nothing further down the pipeline has anything to undo. A response the gate has already released is left alone; stopping it is whatInterruptionFramedoes.A system frame so it overtakes the speculative output it cancels.
- class pipecat.frames.frames.EagerEndOfTurnCancelFrame(**kwargs)[source]
Bases:
UserTurnResponseCancelFrameDeprecated alias for
UserTurnResponseCancelFrame.Deprecated since version 1.15.0: Use
UserTurnResponseCancelFrameinstead. Will be removed in 2.0.0.
- class pipecat.frames.frames.UserMuteStartedFrame[source]
Bases:
SystemFrameFrame indicating that the user has been muted.
Emitted when a mute strategy activates, suppressing user frames (audio, transcription, interruption) from propagating through the pipeline.
- class pipecat.frames.frames.UserMuteStoppedFrame[source]
Bases:
SystemFrameFrame indicating that the user has been unmuted.
Emitted when a mute strategy deactivates, allowing user frames to propagate through the pipeline again.
- class pipecat.frames.frames.PerceptionFrame(perception: list[PerceptionSignal])[source]
Bases:
SystemFrameA reading of how the user spoke, broadcast as soon as a producer has one.
A perception producer broadcasts every reading it makes, whether or not a transcription is there to carry it yet, so processors and clients can act on it right away. The LLM is given the reading a transcription carries in its
perception. Part of expressive conversation (alpha).- Parameters:
perception – The reading.
- class pipecat.frames.frames.UserSpeakingFrame[source]
Bases:
SystemFrameFrame indicating the user is speaking.
Emitted by VAD to indicate the user is speaking.
- class pipecat.frames.frames.UserTurnInferenceCompletedFrame[source]
Bases:
SystemFrameFrame indicating that the user turn is semantically complete.
Emitted by any component that can judge conversational turn completeness — for example an LLM with turn-completion markers, an STT service with built-in turn detection, or a dedicated end-of-turn classifier. Stop strategies that gate the user-turn-stop event on an external completeness signal (e.g.
LLMTurnCompletionUserTurnStopStrategy) consume this frame to finalize the turn. Producers should emit this frame only when they judge the turn complete; an absence of this frame means the turn is not yet considered complete.
- class pipecat.frames.frames.UserTurnCompletionFrame(kind: str | None, marker: str | None = None, context_frame_id: int | None = None)[source]
Bases:
SystemFrameThe LLM’s judgment of whether the user’s turn is complete.
Pushed upstream by an LLM service that uses turn-completion markers, once per inference and as soon as the judgment is known: when the response’s marker is read, when the response calls a tool before writing a marker (
"complete"), or when the response ends without one (None). The marker itself reaches the context as anLLMMarkerFrame.- Parameters:
kind –
"complete","short"(the user will continue shortly) or"long"(the user needs more time), orNonewhen the response carried no marker.marker – The marker read, or
Nonefor a tool call or no marker.context_frame_id – The id of the
LLMContextFramethat started the inference, orNonewhen it isn’t known.
- class pipecat.frames.frames.VADUserStartedSpeakingFrame(start_secs: float = 0.0, timestamp: float = <factory>)[source]
Bases:
SystemFrameFrame emitted when VAD definitively detects user started speaking.
- Parameters:
start_secs – The VAD start_secs duration that was used to confirm the user started speaking. This represents the speech duration that had to elapse before the VAD determined speech began.
timestamp – Wall-clock time when the VAD made its determination.
- class pipecat.frames.frames.VADUserStoppedSpeakingFrame(stop_secs: float = 0.0, timestamp: float = <factory>)[source]
Bases:
SystemFrameFrame emitted when VAD definitively detects user stopped speaking.
- Parameters:
stop_secs – The VAD stop_secs duration that was used to confirm the user stopped speaking. This represents the silence duration that had to elapse before the VAD determined speech ended.
timestamp – Wall-clock time when the VAD made its determination.
- class pipecat.frames.frames.ProposedUserStartedSpeakingFrame[source]
Bases:
SystemFrameFrame proposing that the user turn has started.
Emitted by a component with its own turn detection — typically an STT or realtime LLM service whose provider reports speech boundaries. It is a proposal, not a decision: an
ExternalUserTurnStartStrategyresolves it into aUserStartedSpeakingFrameand broadcasts the interruption.This is a system frame because resolving it broadcasts an interruption, which must preempt queued frames rather than wait behind them. Its end-of-turn counterpart has the opposite requirement and is a control frame; see
ProposedUserStoppedSpeakingFrame.
- class pipecat.frames.frames.ProposedUserStoppedSpeakingFrame[source]
Bases:
ControlFrameFrame proposing that the user turn has ended.
The end-of-turn counterpart to
ProposedUserStartedSpeakingFrame, resolved into aUserStoppedSpeakingFrameby anExternalUserTurnStopStrategy.This is a control frame so it stays ordered against the final
TranscriptionFrame. A service with its own turn detection pushes that transcript and then proposes the stop, and the turn strategy needs that text in hand to close the turn on.
- class pipecat.frames.frames.BotStartedSpeakingFrame[source]
Bases:
SystemFrameFrame indicating the bot started speaking.
Emitted upstream and downstream by the BaseTransportOutput to indicate the bot started speaking.
- class pipecat.frames.frames.BotStoppedSpeakingFrame[source]
Bases:
SystemFrameFrame indicating the bot stopped speaking.
Emitted upstream and downstream by the BaseTransportOutput to indicate the bot stopped speaking.
- class pipecat.frames.frames.BotSpeakingFrame[source]
Bases:
SystemFrameFrame indicating the bot is currently speaking.
Emitted upstream and downstream by the BaseOutputTransport while the bot is still speaking. This can be used, for example, to detect when a user is idle. That is, while the bot is speaking we don’t want to trigger any user idle timeout since the user might be listening.
- class pipecat.frames.frames.MetricsFrame(data: list[MetricsData])[source]
Bases:
SystemFrameFrame containing performance metrics data.
Emitted by processors that can compute metrics like latencies.
- Parameters:
data – List of metrics data collected by the processor.
- class pipecat.frames.frames.FunctionCallFromLLM(function_name: str, tool_call_id: str, arguments: Mapping[str, Any], context: Any)[source]
Bases:
objectRepresents a function call returned by the LLM.
Represents a function call returned by the LLM to be registered for execution.
- Parameters:
function_name – The name of the function to call.
tool_call_id – A unique identifier for the function call.
arguments – The arguments to pass to the function.
context – The LLM context when the function call was made.
- class pipecat.frames.frames.FunctionCallsStartedFrame(function_calls: Sequence[FunctionCallFromLLM])[source]
Bases:
SystemFrameFrame signaling that function call execution is starting.
A frame signaling that one or more function call execution is going to start.
- Parameters:
function_calls – Sequence of function calls that will be executed.
- class pipecat.frames.frames.ExternalFunctionCall(function_name: str, tool_call_id: str)[source]
Bases:
objectA function call made outside this pipeline, as announced to it.
What
ExternalFunctionCallsStartedFramecarries, one per call.- Parameters:
function_name – Name of the function called.
tool_call_id – Unique identifier of the call.
- class pipecat.frames.frames.ExternalFunctionCallsStartedFrame(function_calls: Sequence[ExternalFunctionCall])[source]
Bases:
SystemFrameFunction calls were made outside this pipeline:
FunctionCallsStartedFrame’s counterpart.Nothing in the pipeline acts on one; observers report it as they report the pipeline’s own. The calls ran elsewhere, e.g. in a backend worker’s pipeline on behalf of a tool here, and belong to that pipeline’s conversation, not this one. Like its counterpart it carries every call announced together, which may be one. Each call’s later phases come as
ExternalFunctionCallInProgressFrame,ExternalFunctionCallResultFrameandExternalFunctionCallCancelFrame.- Parameters:
function_calls – The calls made.
- class pipecat.frames.frames.ExternalFunctionCallInProgressFrame(function_name: str, tool_call_id: str, arguments: Any)[source]
Bases:
SystemFrameAn external function call is running:
FunctionCallInProgressFrame’s counterpart.Nothing in the pipeline acts on one; observers report it as they report the pipeline’s own. The call ran elsewhere, e.g. in a backend worker’s pipeline on behalf of a tool here, and belongs to that pipeline’s conversation, not this one.
- Parameters:
function_name – Name of the function called.
tool_call_id – Unique identifier of the call.
arguments – Arguments passed to the function.
- class pipecat.frames.frames.ExternalFunctionCallResultFrame(function_name: str, tool_call_id: str, arguments: Any, result: Any, is_final: bool = True)[source]
Bases:
SystemFrameAn external function call produced a result:
FunctionCallResultFrame’s counterpart.Nothing in the pipeline acts on one; observers report it as they report the pipeline’s own.
- Parameters:
function_name – Name of the function called.
tool_call_id – Unique identifier of the call.
arguments – Arguments passed to the function.
result – The result.
is_final – Whether this result completes the call, or is one of a stream of intermediate results before the final one.
- class pipecat.frames.frames.ExternalFunctionCallCancelFrame(function_name: str, tool_call_id: str)[source]
Bases:
SystemFrameAn external function call was cancelled:
FunctionCallCancelFrame’s counterpart.Nothing in the pipeline acts on one; observers report it as they report the pipeline’s own.
- Parameters:
function_name – Name of the function called.
tool_call_id – Unique identifier of the call.
- class pipecat.frames.frames.BackgroundWorkStartedFrame(work_id: str)[source]
Bases:
SystemFrameBackground work has started: work the bot runs without blocking the conversation.
Broadcast by the component that starts the work, e.g.
LLMServicefor an asynchronous function call (cancel_on_interruption=False) andBackendConnectorfor a task delegated to anLLMWithBackendbackend, with aBackgroundWorkFinishedFramecarrying the samework_idonce the work is over. Anything else that dispatches such work, like a job sent to another worker, should broadcast the same pair.- Parameters:
work_id – Identifies the work; the finished frame carries the same one.
- class pipecat.frames.frames.BackgroundWorkFinishedFrame(work_id: str)[source]
Bases:
SystemFrameBackground work is over, whether by result, error or cancellation.
- Parameters:
work_id – The work that finished, as its started frame named it.
- class pipecat.frames.frames.FunctionCallCancelFrame(function_name: str, tool_call_id: str, run_llm: bool = False)[source]
Bases:
SystemFrameFrame signaling that a function call has been cancelled.
- Parameters:
function_name – Name of the function that was cancelled.
tool_call_id – Unique identifier for the cancelled function call.
run_llm – Whether to run the LLM after this cancellation. Only a call cancelled by its own timeout sets this: an interruption must not trigger inference, and a cancellation the LLM asked for already runs inference through the result of the tool that requested it.
- class pipecat.frames.frames.STTMuteFrame(mute: bool)[source]
Bases:
SystemFrameFrame to mute/unmute the Speech-to-Text service.
- Parameters:
mute – Whether to mute (True) or unmute (False) the STT service.
- class pipecat.frames.frames.InputTransportMessageFrame(message: Any)[source]
Bases:
SystemFrameFrame for transport messages received from external sources.
- Parameters:
message – The urgent transport message payload.
- class pipecat.frames.frames.OutputTransportMessageUrgentFrame(message: Any)[source]
Bases:
SystemFrameFrame for urgent transport messages that need to be sent immediately.
- Parameters:
message – The urgent transport message payload.
- class pipecat.frames.frames.UserImageRequestFrame(user_id: str, text: str | None = None, append_to_context: bool | None = None, video_source: str | None = None, function_name: str | None = None, tool_call_id: str | None = None, result_callback: Any | None = None)[source]
Bases:
SystemFrameFrame requesting an image from a specific user.
A frame to request an image from the given user. The request might come with a text that can be later used to describe the requested image.
- Parameters:
user_id – Identifier of the user to request image from.
text – An optional text associated to the image request.
append_to_context – Whether the requested image should be appended to the LLM context.
video_source – Specific video source to capture from.
function_name – Name of function that generated this request (if any).
tool_call_id – Tool call ID if generated by function call (if any).
result_callback – Optional callback to invoke when the image is retrieved.
- class pipecat.frames.frames.InputAudioRawFrame(audio: bytes, sample_rate: int, num_channels: int)[source]
Bases:
SystemFrame,AudioRawFrameRaw audio input frame from transport.
A chunk of audio usually coming from an input transport. If the transport supports multiple audio sources (e.g. multiple audio tracks) the source name will be specified in transport_source.
- class pipecat.frames.frames.InputImageRawFrame(image: bytes, size: tuple[int, int], format: str | None)[source]
Bases:
SystemFrame,ImageRawFrameRaw image input frame from transport.
An image usually coming from an input transport. If the transport supports multiple video sources (e.g. multiple video tracks) the source name will be specified in transport_source.
- class pipecat.frames.frames.InputFileRawFrame(file: str, type: Literal['bytes', 'url'], filename: str | None, format: str)[source]
Bases:
SystemFrame,FileRawFrameRaw file input frame.
A file usually coming from RTVI.
- class pipecat.frames.frames.InputTextRawFrame(text: str)[source]
Bases:
SystemFrame,TextFrameRaw text input frame from transport.
Text input usually coming from user typing or programmatic text injection that should be sent to LLM services as input, similar to how InputAudioRawFrame and InputImageRawFrame represent user audio and video input.
- class pipecat.frames.frames.UserAudioRawFrame(audio: bytes, sample_rate: int, num_channels: int, user_id: str = '')[source]
Bases:
InputAudioRawFrameRaw audio input frame associated with a specific user.
A chunk of audio, usually coming from an input transport, associated to a user.
- Parameters:
user_id – Identifier of the user who provided this audio.
- class pipecat.frames.frames.UserImageRawFrame(image: bytes, size: tuple[int, int], format: str | None, user_id: str = '', text: str | None = None, append_to_context: bool | None = None, request: UserImageRequestFrame | None = None, run_llm: bool | None = None)[source]
Bases:
InputImageRawFrameRaw image input frame associated with a specific user.
An image associated to a user, potentially in response to an image request.
- Parameters:
user_id – Identifier of the user who provided this image.
text – An optional text associated to this image.
append_to_context – Whether the requested image should be appended to the LLM context.
request – The original image request frame if this is a response.
run_llm – Whether appending this image should trigger an LLM completion. None (the default) preserves the old unconditional-trigger behavior; only an explicit False suppresses it.
- request: UserImageRequestFrame | None = None
- class pipecat.frames.frames.UserFileRawFrame(file: str, type: Literal['bytes', 'url'], filename: str | None, format: str, user_id: str = '', text: str = '', append_to_context: bool | None = None, custom_options: dict | None = None, run_llm: bool | None = None)[source]
Bases:
InputFileRawFrameRaw file input frame associated with a specific user.
A file associated to a user.
- Parameters:
user_id – Identifier of the user who provided this file.
text – Text associated to this file.
append_to_context – Whether the requested file should be appended to the LLM context.
custom_options – Dictionary of custom llm-specific options to be used when processing this file, like ‘detail’ in openAI or ‘citations’ in Bedrock.
run_llm – Whether appending this file should trigger an LLM completion. None (the default) preserves the old unconditional-trigger behavior; only an explicit False suppresses it.
- class pipecat.frames.frames.AssistantImageRawFrame(image: bytes, size: tuple[int, int], format: str | None, original_data: bytes | None = None, original_mime_type: str | None = None)[source]
Bases:
OutputImageRawFrameFrame containing an image generated by the assistant.
Contains both the raw frame for display (superclass functionality) as well as the original image, which can get used directly in LLM contexts.
- Parameters:
original_data – The original image data, which can get used directly in an LLM context message without further encoding.
original_mime_type – The MIME type of the original image data.
- class pipecat.frames.frames.InputDTMFFrame(button: KeypadEntry)[source]
Bases:
DTMFFrame,SystemFrameDTMF keypress input frame from transport.
- Parameters:
button – The DTMF keypad entry that was pressed.
- class pipecat.frames.frames.OutputDTMFUrgentFrame(button: KeypadEntry | None = None, buttons: list[KeypadEntry] | None = None)[source]
Bases:
DTMFFrame,SystemFrameDTMF keypress output frame for immediate sending.
- Parameters:
button – Convenience shortcut for sending a single DTMF keypad entry. Equivalent to
buttons=[button]. If bothbuttonsandbuttonare provided,buttonstakes precedence.buttons – Sequence of one or more DTMF keypad buttons to send. Use
from_string()to build this from a string like"123#".
- button: KeypadEntry | None = None
- buttons: list[KeypadEntry] | None = None
- classmethod from_string(buttons: str, **kwargs) OutputDTMFUrgentFrame[source]
Build an
OutputDTMFUrgentFramefrom a string of DTMF characters.- Parameters:
buttons – A string like
"123#". Each character must be a validKeypadEntryvalue.**kwargs – Additional keyword arguments forwarded to the frame constructor.
- Returns:
A frame of type
clswithbuttonspopulated as a list ofKeypadEntry.
- to_string() str[source]
Return the frame’s
buttonsas a dial string.- Returns:
A string such as
"123#"formed by concatenating the values of eachKeypadEntryinbuttons, or an empty string ifbuttonsis not set.
- class pipecat.frames.frames.SpeechControlParamsFrame(vad_params: VADParams | None = None, turn_params: BaseTurnParams | None = None)[source]
Bases:
SystemFrameFrame for notifying processors of speech control parameter changes.
This includes parameters for both VAD (Voice Activity Detection) and turn-taking analysis. It allows downstream processors to adjust their behavior based on updated interaction control settings.
- Parameters:
vad_params – Current VAD parameters.
turn_params – Current turn-taking analysis parameters.
- turn_params: BaseTurnParams | None = None
- class pipecat.frames.frames.ServiceMetadataFrame(service_name: str, *, user_turn_strategies: UserTurnStrategies | None = None)[source]
Bases:
SystemFrameBase metadata frame for services.
Broadcast by services at pipeline start to share service-specific configuration and performance characteristics with downstream processors.
- Parameters:
service_name – The name of the service broadcasting this metadata.
user_turn_strategies – User turn strategies the service recommends, e.g.
ExternalUserTurnStrategiesfor a service that does its own server-side end-of-turn detection. The user aggregator applies them unless the user passed their ownuser_turn_strategies, which always wins.Noneleaves the defaults in place.
- user_turn_strategies: UserTurnStrategies | None = None
- class pipecat.frames.frames.STTMetadataFrame(service_name: str, ttfs_p99_latency: float, *, user_turn_strategies: UserTurnStrategies | None = None)[source]
Bases:
ServiceMetadataFrameMetadata from STT service.
Broadcast by STT services to inform downstream processors (like turn strategies) about STT latency characteristics.
- Parameters:
ttfs_p99_latency – Time to final segment P99 latency in seconds. This is the expected time from when speech ends to when the final transcript is received, at the 99th percentile.
- class pipecat.frames.frames.LLMServiceMetadataFrame(service_name: str, is_realtime_service: bool = False, *, user_turn_strategies: UserTurnStrategies | None = None)[source]
Bases:
ServiceMetadataFrameMetadata broadcast by an LLM service at pipeline start.
- Parameters:
is_realtime_service – Whether the broadcasting service is a realtime (speech-to-speech) LLM service.
- class pipecat.frames.frames.TTSMetadataFrame(service_name: str, expression: ExpressionCapabilities | None = None, *, user_turn_strategies: UserTurnStrategies | None = None)[source]
Bases:
ServiceMetadataFrameMetadata broadcast by a TTS service at pipeline start.
- Parameters:
expression – The expression tags the service can perform, or None when it performs none. Part of expressive conversation (alpha).
- expression: ExpressionCapabilities | None = None
- class pipecat.frames.frames.PerceptionMetadataFrame(service_name: str, perception: PerceptionCapabilities, *, user_turn_strategies: UserTurnStrategies | None = None)[source]
Bases:
ServiceMetadataFrameMetadata broadcast at start by a processor that perceives how the user spoke.
The processor may be an STT service or a processor of its own, so the signals it reports have a frame of their own. Part of expressive conversation (alpha).
- Parameters:
perception – The signals the processor reports.
- class pipecat.frames.frames.ExpressionMetadataFrame(service_name: str, *, user_turn_strategies: UserTurnStrategies | None = None)[source]
Bases:
ServiceMetadataFrameMetadata broadcast by a processor that tags the LLM’s replies, once it can.
A tagger sits between the LLM and the TTS service and writes the expression tags itself. Upstream, the LLM is then taught no tags, so it writes plain words; downstream, the assistant aggregator writes each reply to the context as its words alone, keeping the tags out of what the LLM reads. Part of expressive conversation (alpha).
- class pipecat.frames.frames.ServiceSwitcherRequestMetadataFrame(service: FrameProcessor)[source]
Bases:
ControlFrameRequest a service to re-emit its metadata frames.
Used by ServiceSwitcher when switching active services to ensure downstream processors receive updated metadata from the newly active service. Services that receive this frame should re-push their metadata frame (e.g., STTMetadataFrame for STT services).
- Parameters:
service – The target service that should re-emit its metadata.
- class pipecat.frames.frames.WorkerFrame[source]
Bases:
ControlFrameBase frame for worker frames.
This is a base class for frames that are handled by the pipeline worker. This might result in a corresponding frame sent downstream (e.g. InterruptionWorkerFrame / InterruptionFrame or EndWorkerFrame / EndFrame). Push these frames downstream (the default direction) so frames queued ahead of them are processed first; pushing them upstream is also supported.
- class pipecat.frames.frames.WorkerSystemFrame[source]
Bases:
SystemFrameBase frame for worker system frames.
This is a base class for system frames that are handled by the pipeline worker. This might result in a corresponding frame sent downstream (e.g. InterruptionWorkerFrame / InterruptionFrame or CancelWorkerFrame / CancelFrame). They can be pushed in either direction (downstream is the default); being system frames, they are processed immediately either way.
- class pipecat.frames.frames.EndWorkerFrame(reason: Any | None = None)[source]
Bases:
WorkerFrameFrame to request graceful pipeline worker closure.
This is used to notify the pipeline worker that the pipeline should be closed nicely (flushing all the queued frames) by pushing an EndFrame downstream. Push this frame downstream (the default direction) so frames queued ahead of it are flushed before the pipeline ends.
- Parameters:
reason – Optional reason for pushing an end frame.
- class pipecat.frames.frames.StopWorkerFrame[source]
Bases:
WorkerFrameFrame to request pipeline worker stop while keeping processors running.
This is used to notify the pipeline worker that it should be stopped as soon as possible (flushing all the queued frames) but that the pipeline processors should be kept in a running state. Push this frame downstream (the default direction) so frames queued ahead of it are flushed first.
- class pipecat.frames.frames.CancelWorkerFrame(reason: Any | None = None)[source]
Bases:
WorkerSystemFrameFrame to request immediate pipeline worker cancellation.
This is used to notify the pipeline worker that the pipeline should be stopped immediately by pushing a CancelFrame downstream. It can be pushed in either direction; being a system frame, it is processed immediately.
- Parameters:
reason – Optional reason for pushing a cancel frame.
- class pipecat.frames.frames.InterruptionWorkerFrame[source]
Bases:
WorkerSystemFrameFrame indicating the pipeline should be interrupted.
The pipeline worker converts this into an InterruptionFrame and sends it downstream. It can be pushed in either direction; being a system frame, it is processed immediately.
- class pipecat.frames.frames.TaskFrame(**kwargs)[source]
Bases:
WorkerFrameDeprecated alias for
WorkerFrame.Deprecated since version 1.4.0: Use
WorkerFrameinstead. Will be removed in 2.0.0.
- class pipecat.frames.frames.TaskSystemFrame(**kwargs)[source]
Bases:
WorkerSystemFrameDeprecated alias for
WorkerSystemFrame.Deprecated since version 1.4.0: Use
WorkerSystemFrameinstead. Will be removed in 2.0.0.
- class pipecat.frames.frames.EndTaskFrame(**kwargs)[source]
Bases:
EndWorkerFrame,TaskFrameDeprecated alias for
EndWorkerFrame.Deprecated since version 1.4.0: Use
EndWorkerFrameinstead. Will be removed in 2.0.0.
- class pipecat.frames.frames.StopTaskFrame(**kwargs)[source]
Bases:
StopWorkerFrame,TaskFrameDeprecated alias for
StopWorkerFrame.Deprecated since version 1.4.0: Use
StopWorkerFrameinstead. Will be removed in 2.0.0.
- class pipecat.frames.frames.CancelTaskFrame(**kwargs)[source]
Bases:
CancelWorkerFrame,TaskSystemFrameDeprecated alias for
CancelWorkerFrame.Deprecated since version 1.4.0: Use
CancelWorkerFrameinstead. Will be removed in 2.0.0.
- class pipecat.frames.frames.InterruptionTaskFrame(**kwargs)[source]
Bases:
InterruptionWorkerFrame,TaskSystemFrameDeprecated alias for
InterruptionWorkerFrame.Deprecated since version 1.4.0: Use
InterruptionWorkerFrameinstead. Will be removed in 2.0.0.
- class pipecat.frames.frames.EndFrame(reason: Any | None = None)[source]
Bases:
ControlFrameFrame indicating pipeline has ended and should shut down.
Indicates that a pipeline has ended and frame processors and pipelines should be shut down. If the transport receives this frame, it will stop sending frames to its output channel(s) and close all its threads. Note, that this is a control frame, which means it will be received in the order it was sent.
This frame is uninterruptible so it is not lost when an InterruptionFrame is processed. Terminal frames must survive interruption to guarantee proper pipeline shutdown.
- Parameters:
reason – Optional reason for pushing an end frame.
- class pipecat.frames.frames.StopFrame[source]
Bases:
ControlFrameFrame indicating pipeline should stop but keep processors running.
Indicates that a pipeline should be stopped but that the pipeline processors should be kept in a running state. This is normally queued from the pipeline task.
This frame is uninterruptible so it is not lost when an InterruptionFrame is processed. Terminal frames must survive interruption to guarantee proper pipeline control.
- class pipecat.frames.frames.PipelineFlushFrame(event: Event | None = None, returning: bool = False, origin: str | None = None, flush_id: int = <factory>)[source]
Bases:
ControlFrameProbe frame used to flush all in-flight frames from the pipeline.
A flush makes three legs, each pushed as a new probe: down to the pipeline worker’s sink, back up to the source, and down to the sink again, where the worker sets
event. All three probes carry the sameflush_id. Onceeventfires, every frame queued ahead of the flush has been processed, along with anything a processor started by pushing upstream. Useful to wait for the pipeline to drain (e.g. after an interruption) before injecting a new frame.This frame is uninterruptible so the probe survives an InterruptionFrame and the flush still completes its trip.
- Parameters:
event – Set by the worker when the last probe reaches the sink. The initiator awaits it to know the pipeline has drained. Carried on the frame so concurrent flushes stay isolated (each awaits its own).
returning – Whether the probe is on the last leg, back downstream after the flush has been up to the source. Work a processor starts by pushing upstream — an LLM run triggered by a function call result, say — only reaches the sink after that turnaround, so the flush makes the trip twice and settles when the returning probe arrives.
origin – Name of the worker that started the flush. A probe that crosses into another pipeline is answered there, out of sight of whoever is waiting, so the answering worker reports progress back to this name.
flush_id – Identifies the flush, shared by the probes of all its legs.
- class pipecat.frames.frames.BotConnectedFrame[source]
Bases:
SystemFrameFrame indicating the bot has connected to the transport service.
Pushed downstream by SFU transports (Daily, LiveKit, HeyGen, Tavus) when the bot successfully joins the room. Non-SFU transports do not emit this frame.
- class pipecat.frames.frames.ClientConnectedFrame[source]
Bases:
SystemFrameFrame indicating that a client has connected to the transport.
Pushed downstream by the input transport when a client (participant) connects. Used by observers to measure transport readiness timing.
- class pipecat.frames.frames.OutputTransportReadyFrame[source]
Bases:
ControlFrameFrame indicating that the output transport is ready.
Indicates that the output transport is ready and able to receive frames.
- class pipecat.frames.frames.InputTransportStartAudioStreamingFrame[source]
Bases:
ControlFrameFrame asking the input transport to start audio input streaming.
Pushed downstream (e.g. by
RTVIProcessoronce the client is ready) so aBaseInputTransportbegins streaming audio from its source. Replaces callingBaseInputTransport.start_audio_in_streaming()directly, keeping cross-processor communication frame-based.
- class pipecat.frames.frames.HeartbeatFrame(timestamp: int)[source]
Bases:
ControlFrameFrame used by pipeline task to monitor pipeline health.
This frame is used by the pipeline task as a mechanism to know if the pipeline is running properly.
- Parameters:
timestamp – Timestamp when the heartbeat was generated.
- class pipecat.frames.frames.FrameProcessorPauseFrame(processor: FrameProcessor)[source]
Bases:
ControlFrameFrame to pause frame processing for a specific processor.
This frame is used to pause frame processing for the given processor. Pausing frame processing will keep frames in the internal queue which will then be processed when frame processing is resumed with FrameProcessorResumeFrame.
- Parameters:
processor – The frame processor to pause.
- class pipecat.frames.frames.FrameProcessorResumeFrame(processor: FrameProcessor)[source]
Bases:
SystemFrameFrame to resume frame processing for a specific processor.
This frame is used to resume frame processing for the given processor if it was previously paused. After resuming frame processing all queued frames will be processed in the order received.
This is a SystemFrame to ensure it bypasses the blocked processing queue when the processor is paused. Otherwise, the resume frame would get queued and never processed.
Note
This frame is now equivalent to FrameProcessorResumeUrgentFrame.
- Parameters:
processor – The frame processor to resume.
- class pipecat.frames.frames.LLMFullResponseStartFrame[source]
Bases:
ControlFrameFrame indicating the beginning of an LLM response.
Used to indicate the beginning of an LLM response. Followed by one or more TextFrames and a final LLMFullResponseEndFrame.
- Parameters:
skip_tts – Whether the response should be skipped by the TTS service.
- class pipecat.frames.frames.LLMFullResponseEndFrame[source]
Bases:
ControlFrameFrame indicating the end of an LLM response.
- Parameters:
skip_tts – Whether the response should be skipped by the TTS service.
- class pipecat.frames.frames.LLMAssistantPushAggregationFrame[source]
Bases:
ControlFrameFrame that forces the LLM assistant aggregator to push its current aggregation to context.
When received by
LLMAssistantAggregator, any text that has been accumulated in the aggregation buffer is immediately committed to the conversation context as an assistant message, without waiting for anLLMFullResponseEndFrame.
- class pipecat.frames.frames.LLMSummarizeContextFrame(config: LLMContextSummaryConfig | None = None)[source]
Bases:
ControlFrameFrame requesting on-demand context summarization.
Push this frame into the pipeline to trigger a manual context summarization.
- Parameters:
config – Optional per-request override for summary generation settings (prompt, token budget, messages to keep). If
None, the summarizer’s defaultLLMContextSummaryConfigis used.
- config: LLMContextSummaryConfig | None = None
- class pipecat.frames.frames.LLMContextSummaryRequestFrame(request_id: str, context: LLMContext, min_messages_to_keep: int, target_context_tokens: int, summarization_prompt: str, summarization_timeout: float | None = None)[source]
Bases:
ControlFrameFrame requesting context summarization from an LLM service.
Sent by aggregators to LLM services when conversation context needs to be compressed. The LLM service generates a summary of older messages while preserving recent conversation history.
- Parameters:
request_id – Unique identifier to match this request with its response. Used to handle async responses and avoid race conditions.
context – The full LLM context containing all messages to analyze and summarize.
min_messages_to_keep – Number of recent messages to preserve uncompressed. These messages will not be included in the summary.
target_context_tokens – Maximum token size for the generated summary. This value is passed directly to the LLM as the max_tokens parameter when generating the summary text.
summarization_prompt – System prompt instructing the LLM how to generate the summary.
summarization_timeout – Maximum time in seconds for the LLM to generate a summary. When None, a default timeout of 120s is applied.
- class pipecat.frames.frames.LLMContextSummaryResultFrame(request_id: str, summary: str, last_summarized_index: int, error: str | None = None)[source]
Bases:
ControlFrameFrame containing the result of context summarization.
Sent by LLM services back to aggregators after generating a summary. Contains the formatted summary message and metadata about what was summarized.
- Parameters:
request_id – Identifier matching the original request. Used to correlate async responses.
summary – The formatted summary message ready to be inserted into context.
last_summarized_index – Index (0-based) of the last message that was included in the summary. Messages after this index are preserved.
error – Error message if summarization failed, None on success.
- class pipecat.frames.frames.FunctionCallInProgressFrame(function_name: str, tool_call_id: str, arguments: Any, cancel_on_interruption: bool = False, group_id: str | None = None)[source]
Bases:
ControlFrameFrame signaling that a function call is currently executing.
This is an uninterruptible frame because we always want to update the context.
- Parameters:
function_name – Name of the function being executed.
tool_call_id – Unique identifier for this function call.
arguments – Arguments passed to the function.
cancel_on_interruption – Whether to cancel this call if interrupted. When
Falsethe call is treated as asynchronous: the conversation is not held while it runs, and a result that arrives after the conversation has moved on is injected via a developer message. A result that arrives before then settles in place like a synchronous call’s.group_id – Identifier shared by all function calls originating from the same LLM response batch. Used to determine when the last call in a group completes so the LLM can be triggered exactly once.
- class pipecat.frames.frames.VisionFullResponseStartFrame[source]
Bases:
LLMFullResponseStartFrameFrame indicating the beginning of a vision model response.
Used to indicate the beginning of a vision model response. Followed by one or more VisionTextFrames and a final VisionFullResponseEndFrame.
- class pipecat.frames.frames.VisionFullResponseEndFrame[source]
Bases:
LLMFullResponseEndFrameFrame indicating the end of a Vision model response.
- class pipecat.frames.frames.TTSStartedFrame(context_id: str | None = None, append_to_context: bool = True)[source]
Bases:
ControlFrameFrame indicating the beginning of a TTS response.
Used to indicate the beginning of a TTS response. Following TTSAudioRawFrames are part of the TTS response until a TTSStoppedFrame. These frames can be used for aggregating audio frames in a transport to optimize the size of frames sent to the session, without needing to control this in the TTS service.
- Parameters:
context_id – Unique identifier for this TTS context.
append_to_context – Whether the spoken text for this response will be appended to the LLM context. Mirrors the value carried by the response’s TTSTextFrames.
- class pipecat.frames.frames.TTSStoppedFrame(context_id: str | None = None)[source]
Bases:
ControlFrameFrame indicating the end of a TTS response.
- Parameters:
context_id – Unique identifier for this TTS context.
- class pipecat.frames.frames.ServiceUpdateSettingsFrame(settings: Mapping[str, Any]=<factory>, delta: TSettings | None = None, service: FrameProcessor | None = None, reach_inactive_services: bool = False)[source]
Bases:
ControlFrame,Generic[TSettings]Base frame for updating service settings.
Supports both a
settingsdict (for backward compatibility) and adeltaobject. When both are provided,deltatakes precedence.- Parameters:
settings –
Dictionary of setting name to value mappings.
Deprecated since version 0.0.104: Use
deltawith a typed settings object instead. Will be removed in 2.0.0.delta –
ServiceSettingsdelta-mode object describing the fields to change.service – Optional target service instance. When provided, only that service will apply the settings; other services will forward the frame unchanged.
reach_inactive_services – Whether these settings should reach every service a
ServiceSwitchermanages, rather than only the active one. Set this for provider-neutral settings that must survive a service switch.
- service: FrameProcessor | None = None
- class pipecat.frames.frames.LLMUpdateSettingsFrame(settings: Mapping[str, Any]=<factory>, delta: TSettings | None = None, service: FrameProcessor | None = None, reach_inactive_services: bool = False)[source]
Bases:
ServiceUpdateSettingsFrame[LLMSettings]Frame for updating LLM service settings.
- class pipecat.frames.frames.TTSUpdateSettingsFrame(settings: Mapping[str, Any]=<factory>, delta: TSettings | None = None, service: FrameProcessor | None = None, reach_inactive_services: bool = False)[source]
Bases:
ServiceUpdateSettingsFrame[TTSSettings]Frame for updating TTS service settings.
- class pipecat.frames.frames.STTUpdateSettingsFrame(settings: Mapping[str, Any]=<factory>, delta: TSettings | None = None, service: FrameProcessor | None = None, reach_inactive_services: bool = False)[source]
Bases:
ServiceUpdateSettingsFrame[STTSettings]Frame for updating STT service settings.
- class pipecat.frames.frames.UserTurnIdleFrame(quiet_secs: float)[source]
Bases:
SystemFrameThe user has been idle for the idle timeout: it is their turn, and they have said nothing.
Broadcast by the user aggregator (or a
UserTurnProcessor) when itsUserIdleControllerreports the user idle, together with itson_user_turn_idleevent, so a processor can act on the silence too. The user is idle while no background work is in progress; with background work in progress they are waiting, which aUserWaitingFramereports.- Parameters:
quiet_secs – How long nothing has been said, in seconds.
- class pipecat.frames.frames.UserWaitingFrame(quiet_secs: float)[source]
Bases:
SystemFrameThe user has waited quietly on background work for the waiting timeout.
Broadcast by the user aggregator (or a
UserTurnProcessor) when itsUserIdleControllerreports the user waiting, together with itson_user_waitingevent. Background work is what aBackgroundWorkStartedFrameannounced and noBackgroundWorkFinishedFramehas ended.- Parameters:
quiet_secs – How long nothing has been said, in seconds.
- class pipecat.frames.frames.UserIdleTimeoutUpdateFrame(timeout: float)[source]
Bases:
SystemFrameFrame for updating the user idle timeout at runtime.
Setting timeout to 0 disables idle detection. Setting a positive value enables it. Updates apply immediately: a running idle timer restarts with the new duration, and if the bot is waiting for the user to speak, with no background work in progress, the timer is armed right away.
- Parameters:
timeout – The new idle timeout in seconds. 0 disables idle detection.
- class pipecat.frames.frames.UserWaitingTimeoutUpdateFrame(timeout: float)[source]
Bases:
SystemFrameFrame for updating the user waiting timeout at runtime.
Setting timeout to 0 disables waiting detection. Setting a positive value enables it. Updates apply immediately: a running waiting timer restarts with the new duration, and if the user is waiting on background work the timer is armed right away.
- Parameters:
timeout – The new waiting timeout in seconds. 0 disables waiting detection.
- class pipecat.frames.frames.VADParamsUpdateFrame(params: VADParams)[source]
Bases:
ControlFrameFrame for updating VAD parameters.
A control frame containing a request to update VAD params. Intended to be pushed upstream from RTVI processor.
- Parameters:
params – New VAD parameters to apply.
- class pipecat.frames.frames.FilterControlFrame[source]
Bases:
ControlFrameBase control frame for audio filter operations.
- class pipecat.frames.frames.FilterUpdateSettingsFrame(settings: Mapping[str, Any])[source]
Bases:
FilterControlFrameFrame for updating audio filter settings.
- Parameters:
settings – Dictionary of filter setting name to value mappings.
- class pipecat.frames.frames.FilterEnableFrame(enable: bool)[source]
Bases:
FilterControlFrameFrame for enabling/disabling audio filters at runtime.
- Parameters:
enable – Whether to enable (True) or disable (False) the filter.
- class pipecat.frames.frames.AudioBufferStartRecordingFrame[source]
Bases:
ControlFrameFrame instructing audio buffer processors to start recording.
- class pipecat.frames.frames.AudioBufferStopRecordingFrame[source]
Bases:
ControlFrameFrame instructing audio buffer processors to stop recording and flush.
- class pipecat.frames.frames.MixerControlFrame[source]
Bases:
ControlFrameBase control frame for audio mixer operations.
- class pipecat.frames.frames.MixerUpdateSettingsFrame(settings: Mapping[str, Any])[source]
Bases:
MixerControlFrameFrame for updating audio mixer settings.
- Parameters:
settings – Dictionary of mixer setting name to value mappings.
- class pipecat.frames.frames.MixerEnableFrame(enable: bool)[source]
Bases:
MixerControlFrameFrame for enabling/disabling audio mixer at runtime.
- Parameters:
enable – Whether to enable (True) or disable (False) the mixer.
- class pipecat.frames.frames.VolumeFrame(volume: float)[source]
Bases:
ControlFrameFrame that sets the volume of the output transport’s audio.
The volume holds until the next
VolumeFrame, and starts at the transport’saudio_out_volume. Audio plays at the volume times the gain set byVolumeGainFrame. The frame takes effect in order with the audio before it, and an interruption doesn’t drop it.- Parameters:
volume – The volume, as a multiplier on the audio’s samples: 1.0 leaves it unchanged, 0.5 halves it.
- class pipecat.frames.frames.VolumeGainFrame(gain: float)[source]
Bases:
ControlFrameFrame that sets a gain on the output transport’s volume.
A gain adjusts the volume for some audio and is reset afterwards, for example
VolumeGainFrame(0.5)before aTTSSpeakFrameandVolumeGainFrame(1.0)after it, which plays that utterance at half the volume without changing the volume set byVolumeFrame. The frame takes effect in order with the audio before it, and an interruption doesn’t drop it.- Parameters:
gain – The gain, as a multiplier on the volume: 1.0 leaves it unchanged, 0.5 halves it.
- class pipecat.frames.frames.ServiceSwitcherFrame[source]
Bases:
ControlFrameA base class for frames that affect ServiceSwitcher behavior.
- class pipecat.frames.frames.ManuallySwitchServiceFrame(service: FrameProcessor)[source]
Bases:
ServiceSwitcherFrameA frame to request a manual switch in the active service in a ServiceSwitcher.
Handled by ServiceSwitcherStrategyManual to switch the active service.
- service: FrameProcessor