Overview
DailyTransport
provides real-time audio and video communication capabilities using Daily’s hosted WebRTC platform. It supports bidirectional audio/video streams, transcription, voice activity detection, participant management, and advanced features like dial-in/out and recording without requiring your own WebRTC infrastructure.
DailyTransport API Reference
Transport methods and configuration options
Daily API Docs
Official Daily REST API documentation
Example Code
Working example with voice agent implementation
Daily Dashboard
Sign up for Daily API access
Installation
To useDailyTransport
, install the required dependencies:
DAILY_API_KEY
.
Get your API key by signing up at Daily
Dashboard.
Frames
Input
InputAudioRawFrame
- Audio data from room participantsUserImageRawFrame
- Video frames from participant camerasTranscriptionFrame
- Final speech transcriptionsInterimTranscriptionFrame
- Real-time transcription updatesTransportMessageUrgentFrame
- Application messages from participants
Output
OutputAudioRawFrame
- Audio data to room participantsOutputImageRawFrame
- Video frames to participantsOutputDTMFFrame
- DTMF tones for phone callsTransportMessageFrame
- Application messages to participantsTransportMessageUrgentFrame
- Urgent messages to participants
Key Features
- Hosted WebRTC: No infrastructure setup required - Daily handles all WebRTC complexity
- Multi-participant Support: Handle multiple participants with individual audio/video tracks
- Built-in Transcription: Real-time speech-to-text with Deepgram integration
- Dial-in/Dial-out: Connect to phone numbers via SIP/PSTN
- Recording & Streaming: Built-in call recording and live streaming capabilities
- Advanced Controls: Participant management, permissions, and media routing
Usage Example
Room Creation
Daily rooms must be created before connecting. Pipecat’s development runner provides a helper function to create room URL, token, and room name:Methods
DailyTransport
provides comprehensive methods for controlling calls and participants:
Room Management
participants()
- Get current participants in the roomparticipant_counts()
- Get participant count statisticssend_message()
- Send messages to participants
Media Control
send_image()
- Send image frames to the roomsend_audio()
- Send audio frames to the roomcapture_participant_video()
- Capture video from specific participantscapture_participant_audio()
- Capture audio from specific participants
Transcription Control
capture_participant_transcription()
- Enable transcription for participantsstart_transcription()
- Start room-wide transcriptionstop_transcription()
- Stop transcriptionupdate_transcription()
- Update transcription settings
Recording Control
start_recording()
- Start recording the callstop_recording()
- Stop active recordings
Dial Control
start_dialout()
- Initiate dial-out callsstop_dialout()
- Stop dial-out callssend_dtmf()
- Send DTMF tonessip_call_transfer()
- Transfer SIP callssip_refer()
- Send SIP REFER requests
Participant Management
update_remote_participants()
- Control participant permissions and settingsupdate_subscriptions()
- Manage media subscriptionsupdate_publishing()
- Control media publishing settings
Chat & Messaging
send_prebuilt_chat_message()
- Send messages to Daily Prebuilt chat
For complete method signatures, parameters, and examples, see the
DailyTransport
API
reference.Example Usage
Event Handling
DailyTransport
provides comprehensive event callbacks organized by category. Register callbacks using the @transport.event_handler()
decorator:
Connection Events
on_joined
- Bot successfully joined the roomon_left
- Bot left the roomon_call_state_updated
- Call state changeson_error
- Transport errors occur
Participant Events
on_first_participant_joined
- First participant joins (useful for starting conversations)on_participant_joined
- Any participant joinson_participant_left
- Participant leaveson_participant_updated
- Participant information changeson_client_connected
- Client (participant) connectson_client_disconnected
- Client (participant) disconnectson_active_speaker_changed
- Active speaker changes
Communication Events
on_app_message
- Application messages receivedon_transcription_message
- Speech transcription received
Dial Events
on_dialin_*
- Dial-in connection events (ready, connected, stopped, error, warning)on_dialout_*
- Dial-out call events (answered, connected, stopped, error, warning)
Recording Events
on_recording_started
- Recording beginson_recording_stopped
- Recording endson_recording_error
- Recording errors
For complete event details, parameters, and examples, see the
DailyTransport
API
reference.Example Usage
Additional Notes
- Scalability: Daily handles the WebRTC infrastructure, supporting many concurrent rooms
- Global Infrastructure: Daily’s global edge network ensures low latency worldwide
- Enterprise Features: Advanced routing, analytics, and compliance features available
- Browser Compatibility: Works with all modern browsers via Daily’s client SDKs
- Mobile Support: Native iOS and Android SDKs available for mobile applications
- SIP Integration: Enterprise-grade phone system integration with dial-in/out capabilities