Overview
TheOpenAIRealTimeWebRTCTransport
is a fully functional Pipecat Transport
. It provides a framework for implementing real-time communication directly with the OpenAI Realtime API using WebRTC voice-to-voice service. It handles media device management, audio/video streams, and state management for the connection.
Transports of this type are designed primarily for development and testing purposes. For production applications, you will need to build a server component with a server-friendly transport, like the DailyTransport, to securely handle API keys.
Usage
Basic Setup
API Reference
Constructor Options
Below is the transport’s type definition for the OpenAI Session configuration you need to pass in to thecreate()
method. See the OpenAI Realtime API documentation for more details on each of the options and their defaults.
TransportConnectionParams
TheOpenAIRealTimeWebRTCTransport
does not take connection parameters. It connects directly to the OpenAI Realtime API using the API key provided as part of the initial configuration.
Events
The transport implements the variousPipecatClient
event handlers. Check out the docs or samples for more info.
More Information
Package
@pipecat-ai/openai-realtime-webrtc-transport