transport

Daily transport implementation for Pipecat.

This module provides comprehensive Daily video conferencing integration including audio/video streaming, transcription, recording, dial-in/out functionality, and real-time communication features.

class pipecat.transports.daily.transport.DailyOutputTransportMessageFrame(message: Any, participant_id: str | None = None)[source]

Bases: OutputTransportMessageFrame

Frame for transport messages in Daily calls.

Parameters:

participant_id – Optional ID of the participant this message is for/from.

participant_id: str | None = None
class pipecat.transports.daily.transport.DailyOutputTransportMessageUrgentFrame(message: Any, participant_id: str | None = None)[source]

Bases: OutputTransportMessageUrgentFrame

Frame for urgent transport messages in Daily calls.

Parameters:

participant_id – Optional ID of the participant this message is for/from.

participant_id: str | None = None
class pipecat.transports.daily.transport.DailyInputTransportMessageFrame(message: Any, participant_id: str | None = None)[source]

Bases: InputTransportMessageFrame

Frame for input urgent transport messages in Daily calls.

Parameters:

participant_id – Optional ID of the participant this message is for/from.

participant_id: str | None = None
class pipecat.transports.daily.transport.DailySIPTransferFrame(settings: Mapping[str, ~typing.Any]=<factory>)[source]

Bases: DataFrame

SIP call transfer frame for transport queuing.

A SIP call transfer that will be queued. The transfer will happen after any preceding audio finishes playing, allowing the bot to complete its current utterance before the transfer occurs.

Parameters:

settings – SIP call transfer settings.

settings: Mapping[str, Any]
class pipecat.transports.daily.transport.DailySIPReferFrame(settings: Mapping[str, ~typing.Any]=<factory>)[source]

Bases: DataFrame

SIP REFER frame for transport queuing.

A SIP REFER that will be queued. The REFER will happen after any preceding audio finishes playing, allowing the bot to complete its current utterance before the REFER occurs.

Parameters:

settings – SIP REFER settings.

settings: Mapping[str, Any]
class pipecat.transports.daily.transport.DailyUpdateRemoteParticipantsFrame(remote_participants: Mapping[str, ~typing.Any]=<factory>)[source]

Bases: DataFrame

Frame to update remote participants in Daily calls.

Parameters:

remote_participants – See https://reference-python.daily.co/api_reference.html#daily.CallClient.update_remote_participants.

remote_participants: Mapping[str, Any]
class pipecat.transports.daily.transport.DailyOutputDTMFFrame(button: KeypadEntry | None = None, buttons: list[KeypadEntry] | None = None, session_id: str | None = None, digit_duration_ms: int | None = None, method: str | None = None)[source]

Bases: OutputDTMFFrame

DTMF output frame with Daily-specific options for transport queuing.

A DTMF keypress output that will be queued after any preceding audio has finished playing. Inherits buttons from OutputDTMFFrame; the extra fields are forwarded to Daily’s send_dtmf as sessionId, digitDurationMs and method.

Parameters:
  • session_id – Target participant session id. When None, Daily sends the tones to the default destination for the call.

  • digit_duration_ms – Duration of each DTMF digit in milliseconds. When None, Daily’s default duration is used.

  • method – DTMF delivery method (e.g. "telephone-event", "sip-info" or auto). When None, Daily’s default method is used.

session_id: str | None = None
digit_duration_ms: int | None = None
method: str | None = None
class pipecat.transports.daily.transport.DailyOutputDTMFUrgentFrame(button: KeypadEntry | None = None, buttons: list[KeypadEntry] | None = None, session_id: str | None = None, digit_duration_ms: int | None = None, method: str | None = None)[source]

Bases: OutputDTMFUrgentFrame

DTMF output frame with Daily-specific options for immediate sending.

A DTMF keypress output that will be sent right away. Inherits buttons from OutputDTMFUrgentFrame; the extra fields are forwarded to Daily’s send_dtmf as sessionId, digitDurationMs and method.

Parameters:
  • session_id – Target participant session id. When None, Daily sends the tones to the default destination for the call.

  • digit_duration_ms – Duration of each DTMF digit in milliseconds. When None, Daily’s default duration is used.

  • method – DTMF delivery method (e.g. "telephone-event", "sip-info" or auto). When None, Daily’s default method is used.

session_id: str | None = None
digit_duration_ms: int | None = None
method: str | None = None
class pipecat.transports.daily.transport.WebRTCVADAnalyzer(*, sample_rate: int | None = None, params: VADParams | None = None)[source]

Bases: VADAnalyzer

Voice Activity Detection analyzer using WebRTC.

Implements voice activity detection using Daily’s native WebRTC VAD.

__init__(*, sample_rate: int | None = None, params: VADParams | None = None)[source]

Initialize the WebRTC VAD analyzer.

Parameters:
  • sample_rate – Audio sample rate in Hz.

  • params – VAD configuration parameters.

num_frames_required() int[source]

Get the number of audio frames required for VAD analysis.

Returns:

The number of frames needed (equivalent to 10ms of audio).

voice_confidence(buffer) float[source]

Analyze audio buffer and return voice confidence score.

Parameters:

buffer – Audio buffer to analyze.

Returns:

Voice confidence score between 0.0 and 1.0.

class pipecat.transports.daily.transport.DailyDialinSettings(*, call_id: str = '', call_domain: str = '')[source]

Bases: BaseModel

Settings for Daily’s dial-in functionality.

Parameters:
  • call_id – CallId is represented by UUID and represents the sessionId in the SIP Network.

  • call_domain – Call Domain is represented by UUID and represents your Daily Domain on the SIP Network.

call_id: str
call_domain: str
class pipecat.transports.daily.transport.DailyTranscriptionSettings(*, language: str = 'en', model: str = 'nova-2-general', profanity_filter: bool = True, redact: bool = False, endpointing: bool = True, punctuate: bool = True, includeRawResponse: bool = True, extra: Mapping[str, Any] = {'interim_results': True})[source]

Bases: BaseModel

Configuration settings for Daily’s transcription service.

Parameters:
  • language – ISO language code for transcription (e.g. “en”).

  • model – Transcription model to use (e.g. “nova-2-general”).

  • profanity_filter – Whether to filter profanity from transcripts.

  • redact – Whether to redact sensitive information.

  • endpointing – Whether to use endpointing to determine speech segments.

  • punctuate – Whether to add punctuation to transcripts.

  • includeRawResponse – Whether to include raw response data.

  • extra – Additional parameters passed to the Deepgram transcription service.

language: str
model: str
profanity_filter: bool
redact: bool
endpointing: bool
punctuate: bool
includeRawResponse: bool
extra: Mapping[str, Any]
class pipecat.transports.daily.transport.DailyCustomVideoTrackParams(*, width: int = 1024, height: int = 768, color_format: str = 'RGB', send_settings: dict[str, Any] | None = None)[source]

Bases: BaseModel

Configuration for a custom video track.

If send_settings is not provided, the track will use the default video publishing settings (framerate, bitrate, codec, etc.).

Parameters:
width: int
height: int
color_format: str
send_settings: dict[str, Any] | None
class pipecat.transports.daily.transport.DailyCustomAudioTrackParams(*, sample_rate: int | None = None, channels: int = 1, send_settings: dict[str, Any] | None = None)[source]

Bases: BaseModel

Configuration for a custom audio track.

If send_settings is not provided, the track will use the default audio publishing settings (bitrate, channel config, etc.).

Parameters:
sample_rate: int | None
channels: int
send_settings: dict[str, Any] | None
class pipecat.transports.daily.transport.DailyParams(*, audio_out_enabled: bool = False, audio_out_sample_rate: int | None = None, audio_out_channels: int = 1, audio_out_bitrate: int = 96000, audio_out_10ms_chunks: int = 4, audio_out_mixer: Mapping[str | None, ~pipecat.audio.mixers.base_audio_mixer.BaseAudioMixer] | None=None, audio_out_destinations: list[str] = <factory>, audio_out_end_silence_secs: int = 2, audio_out_auto_silence: bool = True, audio_in_enabled: bool = False, audio_in_sample_rate: int | None = None, audio_in_channels: int = 1, audio_in_filter: BaseAudioFilter | None = None, audio_in_stream_on_start: bool = True, audio_in_passthrough: bool = True, video_in_enabled: bool = False, video_out_enabled: bool = False, video_out_is_live: bool = False, video_out_width: int = 1024, video_out_height: int = 768, video_out_bitrate: int | None = None, video_out_framerate: int = 30, video_out_color_format: str = 'RGB', video_out_codec: str | None = None, video_out_destinations: list[str] = <factory>, api_url: str = 'https://api.daily.co/v1', api_key: str = '', audio_in_user_tracks: bool = True, camera_out_enabled: bool = True, camera_out_send_settings: dict[str, ~typing.Any] | None=None, custom_audio_track_params: Mapping[str, ~pipecat.transports.daily.transport.DailyCustomAudioTrackParams] | None=None, custom_video_track_params: Mapping[str, ~pipecat.transports.daily.transport.DailyCustomVideoTrackParams] | None=None, dialin_settings: DailyDialinSettings | None = None, microphone_out_enabled: bool = True, transcription_enabled: bool = False, transcription_settings: DailyTranscriptionSettings = DailyTranscriptionSettings(language='en', model='nova-2-general', profanity_filter=True, redact=False, endpointing=True, punctuate=True, includeRawResponse=True, extra={'interim_results': True}))[source]

Bases: TransportParams

Configuration parameters for Daily transport.

Parameters:
  • api_url – Daily API base URL.

  • api_key – Daily API authentication key.

  • audio_in_user_tracks – Receive users’ audio in separate tracks

  • camera_out_enabled – Whether to enable the main camera output track.

  • camera_out_send_settings – Camera output track publishing settings.

  • custom_audio_track_params – Per-destination configuration for custom audio tracks.

  • custom_video_track_params – Per-destination configuration for custom video tracks.

  • dialin_settings – Optional settings for dial-in functionality.

  • microphone_out_enabled – Whether to enable the main microphone track.

  • transcription_enabled – Whether to enable speech transcription.

  • transcription_settings – Configuration for transcription service.

api_url: str
api_key: str
audio_in_user_tracks: bool
camera_out_enabled: bool
camera_out_send_settings: dict[str, Any] | None
custom_audio_track_params: Mapping[str, DailyCustomAudioTrackParams] | None
custom_video_track_params: Mapping[str, DailyCustomVideoTrackParams] | None
dialin_settings: DailyDialinSettings | None
microphone_out_enabled: bool
transcription_enabled: bool
transcription_settings: DailyTranscriptionSettings
class pipecat.transports.daily.transport.DailyCallbacks(*, on_active_speaker_changed: Callable[[Mapping[str, Any]], Awaitable[None]], on_joined: Callable[[Mapping[str, Any]], Awaitable[None]], on_left: Callable[[], Awaitable[None]], on_before_leave: Callable[[], Awaitable[None]], on_error: Callable[[str], Awaitable[None]], on_app_message: Callable[[Any, str], Awaitable[None]], on_call_state_updated: Callable[[str], Awaitable[None]], on_client_connected: Callable[[Mapping[str, Any]], Awaitable[None]], on_client_disconnected: Callable[[Mapping[str, Any]], Awaitable[None]], on_dialin_connected: Callable[[Any], Awaitable[None]], on_dialin_ready: Callable[[str], Awaitable[None]], on_dialin_stopped: Callable[[Any], Awaitable[None]], on_dialin_error: Callable[[Any], Awaitable[None]], on_dialin_warning: Callable[[Any], Awaitable[None]], on_dialout_answered: Callable[[Any], Awaitable[None]], on_dialout_connected: Callable[[Any], Awaitable[None]], on_dialout_stopped: Callable[[Any], Awaitable[None]], on_dialout_error: Callable[[Any], Awaitable[None]], on_dialout_warning: Callable[[Any], Awaitable[None]], on_dtmf_event: Callable[[Any], Awaitable[None]], on_participant_joined: Callable[[Mapping[str, Any]], Awaitable[None]], on_participant_left: Callable[[Mapping[str, Any], str], Awaitable[None]], on_participant_updated: Callable[[Mapping[str, Any]], Awaitable[None]], on_transcription_message: Callable[[Mapping[str, Any]], Awaitable[None]], on_transcription_stopped: Callable[[str, bool], Awaitable[None]], on_transcription_error: Callable[[str], Awaitable[None]], on_recording_started: Callable[[Mapping[str, Any]], Awaitable[None]], on_recording_stopped: Callable[[str], Awaitable[None]], on_recording_error: Callable[[str, str], Awaitable[None]])[source]

Bases: BaseModel

Callback handlers for Daily events.

Parameters:
  • on_active_speaker_changed – Called when the active speaker of the call has changed.

  • on_joined – Called when bot successfully joined a room.

  • on_left – Called when bot left a room.

  • on_before_leave – Called when bot is about to leave the room.

  • on_error – Called when an error occurs.

  • on_app_message – Called when receiving an app message.

  • on_call_state_updated – Called when call state changes.

  • on_client_connected – Called when a client (participant) connects.

  • on_client_disconnected – Called when a client (participant) disconnects.

  • on_dialin_connected – Called when dial-in is connected.

  • on_dialin_ready – Called when dial-in is ready.

  • on_dialin_stopped – Called when dial-in is stopped.

  • on_dialin_error – Called when dial-in encounters an error.

  • on_dialin_warning – Called when dial-in has a warning.

  • on_dialout_answered – Called when dial-out is answered.

  • on_dialout_connected – Called when dial-out is connected.

  • on_dialout_stopped – Called when dial-out is stopped.

  • on_dialout_error – Called when dial-out encounters an error.

  • on_dialout_warning – Called when dial-out has a warning.

  • on_dtmf_event – Called when a DTMF tone happens.

  • on_participant_joined – Called when a participant joins.

  • on_participant_left – Called when a participant leaves.

  • on_participant_updated – Called when participant info is updated.

  • on_transcription_message – Called when receiving transcription.

  • on_transcription_stopped – Called when transcription is stopped.

  • on_transcription_error – Called when transcription encounters an error.

  • on_recording_started – Called when recording starts.

  • on_recording_stopped – Called when recording stops.

  • on_recording_error – Called when recording encounters an error.

on_active_speaker_changed: Callable[[Mapping[str, Any]], Awaitable[None]]
on_joined: Callable[[Mapping[str, Any]], Awaitable[None]]
on_left: Callable[[], Awaitable[None]]
on_before_leave: Callable[[], Awaitable[None]]
on_error: Callable[[str], Awaitable[None]]
on_app_message: Callable[[Any, str], Awaitable[None]]
on_call_state_updated: Callable[[str], Awaitable[None]]
on_client_connected: Callable[[Mapping[str, Any]], Awaitable[None]]
on_client_disconnected: Callable[[Mapping[str, Any]], Awaitable[None]]
on_dialin_connected: Callable[[Any], Awaitable[None]]
on_dialin_ready: Callable[[str], Awaitable[None]]
on_dialin_stopped: Callable[[Any], Awaitable[None]]
on_dialin_error: Callable[[Any], Awaitable[None]]
on_dialin_warning: Callable[[Any], Awaitable[None]]
on_dialout_answered: Callable[[Any], Awaitable[None]]
on_dialout_connected: Callable[[Any], Awaitable[None]]
on_dialout_stopped: Callable[[Any], Awaitable[None]]
on_dialout_error: Callable[[Any], Awaitable[None]]
on_dialout_warning: Callable[[Any], Awaitable[None]]
on_dtmf_event: Callable[[Any], Awaitable[None]]
on_participant_joined: Callable[[Mapping[str, Any]], Awaitable[None]]
on_participant_left: Callable[[Mapping[str, Any], str], Awaitable[None]]
on_participant_updated: Callable[[Mapping[str, Any]], Awaitable[None]]
on_transcription_message: Callable[[Mapping[str, Any]], Awaitable[None]]
on_transcription_stopped: Callable[[str, bool], Awaitable[None]]
on_transcription_error: Callable[[str], Awaitable[None]]
on_recording_started: Callable[[Mapping[str, Any]], Awaitable[None]]
on_recording_stopped: Callable[[str], Awaitable[None]]
on_recording_error: Callable[[str, str], Awaitable[None]]
pipecat.transports.daily.transport.completion_callback(future)[source]

Create a completion callback for Daily API calls.

Parameters:

future – The asyncio Future to set the result on.

Returns:

A callback function that sets the future result.

class pipecat.transports.daily.transport.DailyAudioTrack(source: CustomAudioSource, track: CustomAudioTrack)[source]

Bases: object

Container for Daily audio track components.

Parameters:
  • source – The custom audio source for the track.

  • track – The custom audio track instance.

source: CustomAudioSource
track: CustomAudioTrack
class pipecat.transports.daily.transport.DailyVideoTrack(source: CustomVideoSource, track: CustomVideoTrack)[source]

Bases: object

Container for Daily video track components.

Parameters:
  • source – The custom video source for the track.

  • track – The custom video track instance.

source: CustomVideoSource
track: CustomVideoTrack
class pipecat.transports.daily.transport.DailyTransportClient(*args, **kwargs)[source]

Bases: EventHandler

Core client for interacting with Daily’s API.

Manages the connection to Daily rooms and handles all low-level API interactions including room management, media streaming, transcription, and event handling.

__init__(room_url: str, token: str | None, bot_name: str, params: DailyParams, callbacks: DailyCallbacks, transport_name: str)[source]

Initialize the Daily transport client.

Parameters:
  • room_url – URL of the Daily room to connect to.

  • token – Optional authentication token for the room.

  • bot_name – Display name for the bot in the call.

  • params – Configuration parameters for the transport.

  • callbacks – Event callback handlers.

  • transport_name – Name identifier for the transport.

property room_url: str

Get the Daily room URL.

Returns:

The room URL this client is connected to.

property participant_id: str

Get the participant ID for this client.

Returns:

The participant ID assigned by Daily.

property in_sample_rate: int

Get the input audio sample rate.

Returns:

The input sample rate in Hz.

property out_sample_rate: int

Get the output audio sample rate.

Returns:

The output sample rate in Hz.

async send_message(frame: OutputTransportMessageFrame | OutputTransportMessageUrgentFrame) str | None[source]

Send an application message to participants.

Parameters:

frame – The message frame to send.

Returns:

An error description or None.

Return type:

error

async read_next_audio_frame() InputAudioRawFrame | None[source]

Reads the next 20ms audio frame from the virtual speaker.

async register_audio_destination(destination: str, auto_silence: bool | None = True)[source]

Register a custom audio destination for multi-track output.

Parameters:
  • destination – The destination identifier to register.

  • auto_silence – If True, the audio source inserts silence when no audio is available. If False, the source waits for audio data. Defaults to True.

async register_video_destination(destination: str)[source]

Register a video destination for multi-track output.

Built-in destination (“camera”) is configured at join time so it’s skipped here.

Parameters:

destination – The destination identifier to register.

async write_audio_frame(frame: OutputAudioRawFrame) bool[source]

Write an audio frame to the appropriate audio track.

Parameters:

frame – The audio frame to write.

Returns:

True if the audio frame was written successfully, False otherwise.

async write_video_frame(frame: OutputImageRawFrame) bool[source]

Write a video frame to the appropriate video track.

Parameters:

frame – The image frame to write.

Returns:

True if the video frame was written successfully, False otherwise.

async setup(setup: FrameProcessorSetup)[source]

Setup the client with task manager and event queues.

Parameters:

setup – The frame processor setup configuration.

async cleanup()[source]

Cleanup client resources and cancel tasks.

async start(frame: StartFrame)[source]

Start the client and initialize audio/video components.

Parameters:

frame – The start frame containing initialization parameters.

async join()[source]

Join the Daily room with configured settings.

async leave()[source]

Leave the Daily room and cleanup resources.

participants() Mapping[str, Any][source]

Get current participants in the room.

Returns:

Dictionary of participants keyed by participant ID.

participant_counts() Mapping[str, Any][source]

Get participant count information.

Returns:

Dictionary with participant count details.

async start_dialout(settings) tuple[str, str | None][source]

Start a dial-out call to a phone number.

Parameters:

settings – Dial-out configuration settings.

Returns:

Dail-out session ID. error: An error description or None.

Return type:

session_id

async stop_dialout(participant_id) str | None[source]

Stop a dial-out call for a specific participant.

Parameters:

participant_id – ID of the participant to stop dial-out for.

Returns:

An error description or None.

Return type:

error

async send_dtmf(settings) str | None[source]

Send DTMF tones during a call.

Parameters:

settings – DTMF settings including tones and target session.

Returns:

An error description or None.

Return type:

error

async sip_call_transfer(settings) str | None[source]

Transfer a SIP call to another destination.

Parameters:

settings – SIP call transfer settings.

Returns:

An error description or None.

Return type:

error

async sip_refer(settings) str | None[source]

Send a SIP REFER request.

Parameters:

settings – SIP REFER settings.

Returns:

An error description or None.

Return type:

error

async start_recording(streaming_settings, stream_id, force_new) tuple[str, str | None][source]

Start recording the call.

Parameters:
  • streaming_settings – Recording configuration settings.

  • stream_id – Unique identifier for the recording stream.

  • force_new – Whether to force a new recording session.

Returns:

Unique identifier for the recording stream. error: An error description or None.

Return type:

stream_id

async stop_recording(stream_id) str | None[source]

Stop recording the call.

Parameters:

stream_id – Unique identifier for the recording stream to stop.

Returns:

An error description or None.

Return type:

error

async start_transcription(settings) str | None[source]

Start transcription for the call.

Parameters:

settings – Transcription configuration settings.

Returns:

An error description or None.

Return type:

error

async stop_transcription() str | None[source]

Stop transcription for the call.

Returns:

An error description or None.

Return type:

error

async send_prebuilt_chat_message(message: str, user_name: str | None = None) str | None[source]

Send a chat message to Daily’s Prebuilt main room.

Parameters:
  • message – The chat message to send.

  • user_name – Optional user name that will appear as sender of the message.

Returns:

An error description or None.

Return type:

error

async capture_participant_transcription(participant_id: str)[source]

Enable transcription capture for a specific participant.

Parameters:

participant_id – ID of the participant to capture transcription for.

async capture_participant_audio(participant_id: str, callback: Callable, audio_source: str = 'microphone', sample_rate: int = 16000, callback_interval_ms: int = 20)[source]

Capture audio from a specific participant.

Parameters:
  • participant_id – ID of the participant to capture audio from.

  • callback – Callback function to handle audio data.

  • audio_source – Audio source to capture (microphone, screenAudio, or custom).

  • sample_rate – Desired sample rate for audio capture.

  • callback_interval_ms – Interval between audio callbacks in milliseconds.

async capture_participant_video(participant_id: str, callback: Callable, framerate: int = 30, video_source: str = 'camera', color_format: str = 'RGB')[source]

Capture video from a specific participant.

Parameters:
  • participant_id – ID of the participant to capture video from.

  • callback – Callback function to handle video frames.

  • framerate – Desired framerate for video capture.

  • video_source – Video source to capture (camera, screenVideo, or custom).

  • color_format – Color format for video frames.

async add_custom_audio_track(track_name: str, params: DailyCustomAudioTrackParams | None = None, auto_silence: bool | None = True) DailyAudioTrack[source]

Add a custom audio track for multi-stream output.

Parameters:
  • track_name – Name for the custom audio track.

  • params – Optional per-track configuration for sample rate, channels, and sendSettings.

  • auto_silence – If True, the audio source inserts silence when no audio is available. If False, the source waits for audio data. Defaults to True.

Returns:

The created DailyAudioTrack instance.

async remove_custom_audio_track(track_name: str) str | None[source]

Remove a custom audio track.

Parameters:

track_name – Name of the custom audio track to remove.

Returns:

An error description or None.

Return type:

error

async add_custom_video_track(track_name: str, params: DailyCustomVideoTrackParams | None = None) DailyVideoTrack[source]

Add a custom video track for multi-stream output.

Parameters:
  • track_name – Name for the custom video track.

  • params – Optional per-track configuration for dimensions, color format, and sendSettings.

Returns:

The created DailyVideoTrack instance.

async remove_custom_video_track(track_name: str) str | None[source]

Remove a custom video track.

Parameters:

track_name – Name of the custom video track to remove.

Returns:

An error description or None.

Return type:

error

async update_transcription(participants=None, instance_id=None) str | None[source]

Update transcription settings for specific participants.

Parameters:
  • participants – List of participant IDs to enable transcription for.

  • instance_id – Optional transcription instance ID.

Returns:

An error description or None.

Return type:

error

async update_subscriptions(participant_settings=None, profile_settings=None) str | None[source]

Update media subscription settings.

Parameters:
  • participant_settings – Per-participant subscription settings.

  • profile_settings – Global subscription profile settings.

Returns:

An error description or None.

Return type:

error

async update_publishing(publishing_settings: Mapping[str, Any]) str | None[source]

Update media publishing settings.

Parameters:

publishing_settings – Publishing configuration settings.

Returns:

An error description or None.

Return type:

error

async update_remote_participants(remote_participants: Mapping[str, Any]) str | None[source]

Update settings for remote participants.

Parameters:

remote_participants – Remote participant configuration settings.

Returns:

An error description or None.

Return type:

error

on_active_speaker_changed(participant)[source]

Handle active speaker change events.

Parameters:

participant – The new active speaker participant info.

on_app_message(message: Any, sender: str)[source]

Handle application message events.

Parameters:
  • message – The received message data.

  • sender – ID of the message sender.

on_call_state_updated(state: str)[source]

Handle call state update events.

Parameters:

state – The new call state.

on_dialin_connected(data: Any)[source]

Handle dial-in connected events.

Parameters:

data – Dial-in connection data.

on_dialin_ready(sip_endpoint: str)[source]

Handle dial-in ready events.

Parameters:

sip_endpoint – The SIP endpoint for dial-in.

on_dialin_stopped(data: Any)[source]

Handle dial-in stopped events.

Parameters:

data – Dial-in stop data.

on_dialin_error(data: Any)[source]

Handle dial-in error events.

Parameters:

data – Dial-in error data.

on_dialin_warning(data: Any)[source]

Handle dial-in warning events.

Parameters:

data – Dial-in warning data.

on_dialout_answered(data: Any)[source]

Handle dial-out answered events.

Parameters:

data – Dial-out answered data.

on_dialout_connected(data: Any)[source]

Handle dial-out connected events.

Parameters:

data – Dial-out connection data.

on_dialout_stopped(data: Any)[source]

Handle dial-out stopped events.

Parameters:

data – Dial-out stop data.

on_dialout_error(data: Any)[source]

Handle dial-out error events.

Parameters:

data – Dial-out error data.

on_dialout_warning(data: Any)[source]

Handle dial-out warning events.

Parameters:

data – Dial-out warning data.

on_dtmf_event(data: Any)[source]

Handle incoming DTMF events.

Parameters:

data – DTMF data.

on_participant_joined(participant)[source]

Handle participant joined events.

Parameters:

participant – The participant that joined.

on_participant_left(participant, reason)[source]

Handle participant left events.

Parameters:
  • participant – The participant that left.

  • reason – Reason for leaving.

on_participant_updated(participant)[source]

Handle participant updated events.

Parameters:

participant – The updated participant info.

on_transcription_started(status)[source]

Handle transcription started events.

Parameters:

status – Transcription start status.

on_transcription_stopped(stopped_by, stopped_by_error)[source]

Handle transcription stopped events.

Parameters:
  • stopped_by – Who stopped the transcription.

  • stopped_by_error – Whether stopped due to error.

on_transcription_error(message)[source]

Handle transcription error events.

Parameters:

message – Error message.

on_transcription_message(message)[source]

Handle transcription message events.

Parameters:

message – The transcription message data.

on_recording_started(status)[source]

Handle recording started events.

Parameters:

status – Recording start status.

on_recording_stopped(stream_id)[source]

Handle recording stopped events.

Parameters:

stream_id – ID of the stopped recording stream.

on_recording_error(stream_id, message)[source]

Handle recording error events.

Parameters:
  • stream_id – ID of the recording stream with error.

  • message – Error message.

class pipecat.transports.daily.transport.DailyInputTransport(transport: BaseTransport, client: DailyTransportClient, params: DailyParams, **kwargs)[source]

Bases: BaseInputTransport

Handles incoming media streams and events from Daily calls.

Processes incoming audio, video, transcriptions and other events from Daily room participants, including participant media capture and event forwarding.

__init__(transport: BaseTransport, client: DailyTransportClient, params: DailyParams, **kwargs)[source]

Initialize the Daily input transport.

Parameters:
  • transport – The parent transport instance.

  • client – DailyTransportClient instance.

  • params – Configuration parameters.

  • **kwargs – Additional arguments passed to parent class.

async start_audio_in_streaming()[source]

Start receiving audio from participants.

async setup(setup: FrameProcessorSetup)[source]

Setup the input transport with shared client setup.

Parameters:

setup – The frame processor setup configuration.

async cleanup()[source]

Cleanup input transport and shared resources.

async start(frame: StartFrame)[source]

Start the input transport and join the Daily room.

Parameters:

frame – The start frame containing initialization parameters.

async stop(frame: EndFrame)[source]

Stop the input transport and leave the Daily room.

Parameters:

frame – The end frame signaling transport shutdown.

async cancel(frame: CancelFrame)[source]

Cancel the input transport and leave the Daily room.

Parameters:

frame – The cancel frame signaling immediate cancellation.

async process_frame(frame: Frame, direction: FrameDirection)[source]

Process incoming frames, including user image requests.

Parameters:
  • frame – The frame to process.

  • direction – The direction of frame flow in the pipeline.

async push_transcription_frame(frame: TranscriptionFrame | InterimTranscriptionFrame)[source]

Push a transcription frame downstream.

Parameters:

frame – The transcription frame to push.

async push_app_message(message: Any, sender: str)[source]

Push an application message as an urgent transport frame.

Parameters:
  • message – The message data to send.

  • sender – ID of the message sender.

async capture_participant_audio(participant_id: str, audio_source: str = 'microphone', sample_rate: int = 16000)[source]

Capture audio from a specific participant.

Parameters:
  • participant_id – ID of the participant to capture audio from.

  • audio_source – Audio source to capture from.

  • sample_rate – Desired sample rate for audio capture.

async capture_participant_video(participant_id: str, framerate: int = 30, video_source: str = 'camera', color_format: str = 'RGB')[source]

Capture video from a specific participant.

Parameters:
  • participant_id – ID of the participant to capture video from.

  • framerate – Desired framerate for video capture.

  • video_source – Video source to capture from.

  • color_format – Color format for video frames.

async request_participant_image(frame: UserImageRequestFrame)[source]

Request a video frame from a specific participant.

Parameters:

frame – The user image request frame.

class pipecat.transports.daily.transport.DailyOutputTransport(transport: BaseTransport, client: DailyTransportClient, params: DailyParams, **kwargs)[source]

Bases: BaseOutputTransport

Handles outgoing media streams and events to Daily calls.

Manages sending audio, video and other data to Daily calls, including audio destination registration and message transmission.

__init__(transport: BaseTransport, client: DailyTransportClient, params: DailyParams, **kwargs)[source]

Initialize the Daily output transport.

Parameters:
  • transport – The parent transport instance.

  • client – DailyTransportClient instance.

  • params – Configuration parameters.

  • **kwargs – Additional arguments passed to parent class.

async setup(setup: FrameProcessorSetup)[source]

Setup the output transport with shared client setup.

Parameters:

setup – The frame processor setup configuration.

async cleanup()[source]

Cleanup output transport and shared resources.

async start(frame: StartFrame)[source]

Start the output transport and join the Daily room.

Parameters:

frame – The start frame containing initialization parameters.

async stop(frame: EndFrame)[source]

Stop the output transport and leave the Daily room.

Parameters:

frame – The end frame signaling transport shutdown.

async cancel(frame: CancelFrame)[source]

Cancel the output transport and leave the Daily room.

Parameters:

frame – The cancel frame signaling immediate cancellation.

async send_message(frame: OutputTransportMessageFrame | OutputTransportMessageUrgentFrame)[source]

Send a transport message to participants.

Parameters:

frame – The transport message frame to send.

async register_video_destination(destination: str)[source]

Register a video output destination.

Parameters:

destination – The destination identifier to register.

async register_audio_destination(destination: str)[source]

Register an audio output destination.

Parameters:

destination – The destination identifier to register.

Returns:

True if the audio frame was written successfully, False otherwise.

async write_audio_frame(frame: OutputAudioRawFrame) bool[source]

Write an audio frame to the Daily call.

Parameters:

frame – The audio frame to write.

Returns:

True if the audio frame was written successfully, False otherwise.

async write_video_frame(frame: OutputImageRawFrame) bool[source]

Write a video frame to the Daily call.

Parameters:

frame – The video frame to write.

Returns:

True if the video frame was written successfully, False otherwise.

async write_transport_frame(frame: Frame)[source]

Handle queued SIP frames after preceding audio has been sent.

Parameters:

frame – The frame to handle.

class pipecat.transports.daily.transport.DailyTransport(room_url: str, token: str | None, bot_name: str, params: DailyParams | None = None, input_name: str | None = None, output_name: str | None = None)[source]

Bases: BaseTransport

Transport implementation for Daily audio and video calls.

Provides comprehensive Daily integration including audio/video streaming, transcription, recording, dial-in/out functionality, and real-time communication features for conversational AI applications.

Event handlers available:

  • on_joined: Called when the bot joins the room. Args: (data: dict)

  • on_connected: Called when the bot connects to the room (alias for on_joined). Args: (data: dict)

  • on_left: Called when the bot leaves the room.

  • on_before_leave: [sync] Called just before the bot leaves the room.

  • on_error: Called when a transport error occurs. Args: (error: str)

  • on_call_state_updated: Called when the call state changes. Args: (state: str)

  • on_first_participant_joined: Called when the first participant joins. Args: (participant: dict)

  • on_participant_joined: Called when any participant joins. Args: (participant: dict)

  • on_participant_left: Called when a participant leaves. Args: (participant: dict, reason: str)

  • on_participant_updated: Called when a participant’s state changes. Args: (participant: dict)

  • on_client_connected: Called when a participant connects (alias for on_participant_joined). Args: (participant: dict)

  • on_client_disconnected: Called when a participant disconnects (alias for on_participant_left). Args: (participant: dict)

  • on_active_speaker_changed: Called when the active speaker changes. Args: (participant: dict)

  • on_app_message: Called when an app message is received. Args: (message: Any, sender: str)

  • on_transcription_message: Called when a transcription message is received. Args: (message: dict)

  • on_recording_started: Called when recording starts. Args: (status: str)

  • on_recording_stopped: Called when recording stops. Args: (stream_id: str)

  • on_recording_error: Called when a recording error occurs. Args: (stream_id: str, message: str)

  • on_dialin_connected: Called when a dial-in call connects. Args: (data: dict)

  • on_dialin_ready: Called when the SIP endpoint is ready. Args: (sip_endpoint: str)

  • on_dialin_stopped: Called when a dial-in call stops. Args: (data: dict)

  • on_dialin_error: Called when a dial-in error occurs. Args: (data: dict)

  • on_dialin_warning: Called when a dial-in warning occurs. Args: (data: dict)

  • on_dialout_answered: Called when a dial-out call is answered. Args: (data: dict)

  • on_dialout_connected: Called when a dial-out call connects. Args: (data: dict)

  • on_dialout_stopped: Called when a dial-out call stops. Args: (data: dict)

  • on_dialout_error: Called when a dial-out error occurs. Args: (data: dict)

  • on_dialout_warning: Called when a dial-out warning occurs. Args: (data: dict)

Example:

@transport.event_handler("on_first_participant_joined")
async def on_first_participant_joined(transport, participant):
    await task.queue_frame(TTSSpeakFrame("Hello!"))

@transport.event_handler("on_participant_left")
async def on_participant_left(transport, participant, reason):
    await task.queue_frame(EndFrame())

@transport.event_handler("on_app_message")
async def on_app_message(transport, message, sender):
    logger.info(f"Message from {sender}: {message}")
__init__(room_url: str, token: str | None, bot_name: str, params: DailyParams | None = None, input_name: str | None = None, output_name: str | None = None)[source]

Initialize the Daily transport.

Parameters:
  • room_url – URL of the Daily room to connect to.

  • token – Optional authentication token for the room.

  • bot_name – Display name for the bot in the call.

  • params – Configuration parameters for the transport.

  • input_name – Optional name for the input transport.

  • output_name – Optional name for the output transport.

input() DailyInputTransport[source]

Get the input transport for receiving media and events.

Returns:

The Daily input transport instance.

output() DailyOutputTransport[source]

Get the output transport for sending media and events.

Returns:

The Daily output transport instance.

property room_url: str

Get the Daily room URL.

Returns:

The room URL this transport is connected to.

property participant_id: str

Get the participant ID for this transport.

Returns:

The participant ID assigned by Daily.

set_log_level(level: LogLevel)[source]

Set the logging level for Daily’s internal logging system.

Parameters:

level – The log level to set. Should be a member of the DailyLogLevel enum, such as DailyLogLevel.Info, DailyLogLevel.Debug, etc.

Example

transport.set_log_level(DailyLogLevel.Info)

async send_image(frame: OutputImageRawFrame | SpriteFrame)[source]

Send an image frame to the Daily call.

Parameters:

frame – The image frame to send.

async send_audio(frame: OutputAudioRawFrame)[source]

Send an audio frame to the Daily call.

Parameters:

frame – The audio frame to send.

participants() Mapping[str, Any][source]

Get current participants in the room.

Returns:

Dictionary of participants keyed by participant ID.

participant_counts() Mapping[str, Any][source]

Get participant count information.

Returns:

Dictionary with participant count details.

async send_dtmf(settings) str | None[source]

Send DTMF tones during a call.

Parameters:

settings – DTMF settings including tones and target session.

Returns:

An error description or None.

Return type:

error

async start_dialout(settings=None) tuple[str, str | None][source]

Start a dial-out call to a phone number.

Parameters:

settings – Dial-out configuration settings.

Returns:

Dail-out session ID. error: An error description or None.

Return type:

session_id

async stop_dialout(participant_id) str | None[source]

Stop a dial-out call for a specific participant.

Parameters:

participant_id – ID of the participant to stop dial-out for.

Returns:

An error description or None.

Return type:

error

async sip_call_transfer(settings) str | None[source]

Transfer a SIP call to another destination.

Parameters:

settings – SIP call transfer settings.

Returns:

An error description or None.

Return type:

error

async sip_refer(settings) str | None[source]

Send a SIP REFER request.

Parameters:

settings – SIP REFER settings.

Returns:

An error description or None.

Return type:

error

async start_recording(streaming_settings=None, stream_id=None, force_new=None) tuple[str, str | None][source]

Start recording the call.

Parameters:
  • streaming_settings – Recording configuration settings.

  • stream_id – Unique identifier for the recording stream.

  • force_new – Whether to force a new recording session.

Returns:

Unique identifier for the recording stream. error: An error description or None.

Return type:

stream_id

async stop_recording(stream_id=None) str | None[source]

Stop recording the call.

Parameters:

stream_id – Unique identifier for the recording stream to stop.

Returns:

An error description or None.

Return type:

error

async start_transcription(settings=None) str | None[source]

Start transcription for the call.

Parameters:

settings – Transcription configuration settings.

Returns:

An error description or None.

Return type:

error

async stop_transcription() str | None[source]

Stop transcription for the call.

Returns:

An error description or None.

Return type:

error

async send_prebuilt_chat_message(message: str, user_name: str | None = None) str | None[source]

Send a chat message to Daily’s Prebuilt main room.

Parameters:
  • message – The chat message to send.

  • user_name – Optional user name that will appear as sender of the message.

Returns:

An error description or None.

Return type:

error

async capture_participant_transcription(participant_id: str)[source]

Enable transcription capture for a specific participant.

Parameters:

participant_id – ID of the participant to capture transcription for.

async capture_participant_audio(participant_id: str, audio_source: str = 'microphone', sample_rate: int = 16000)[source]

Capture audio from a specific participant.

Parameters:
  • participant_id – ID of the participant to capture audio from.

  • audio_source – Audio source to capture from.

  • sample_rate – Desired sample rate for audio capture.

async capture_participant_video(participant_id: str, framerate: int = 30, video_source: str = 'camera', color_format: str = 'RGB')[source]

Capture video from a specific participant.

Parameters:
  • participant_id – ID of the participant to capture video from.

  • framerate – Desired framerate for video capture.

  • video_source – Video source to capture from.

  • color_format – Color format for video frames.

async update_publishing(publishing_settings: Mapping[str, Any]) str | None[source]

Update media publishing settings.

Parameters:

publishing_settings – Publishing configuration settings.

Returns:

An error description or None.

Return type:

error

async update_subscriptions(participant_settings=None, profile_settings=None) str | None[source]

Update media subscription settings.

Parameters:
  • participant_settings – Per-participant subscription settings.

  • profile_settings – Global subscription profile settings.

Returns:

An error description or None.

Return type:

error

async update_remote_participants(remote_participants: Mapping[str, Any]) str | None[source]

Update settings for remote participants.

Parameters:

remote_participants – Remote participant configuration settings.

Returns:

An error description or None.

Return type:

error