Skip to main content

Overview

The OpenAIRealTimeWebRTCTransport 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 the create() method. See the OpenAI Realtime API documentation for more details on each of the options and their defaults.

TransportConnectionParams

The OpenAIRealTimeWebRTCTransport 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 various PipecatClient event handlers. Check out the docs or samples for more info.

More Information

Demo

OpenAI Realtime Basic Demo

Source

OpenAIRealTimeWebRTCTransport

Package

@pipecat-ai/openai-realtime-webrtc-transport