Skip to main content
Deprecated: This transport connects directly from the browser to a third-party LLM API rather than through a Pipecat server, so it can’t use most Pipecat server-side features and drifts out of sync with that API over time. It is no longer supported and will not receive further updates. Published npm versions will remain installable, but since this transport depends directly on a third-party API that changes over time, it may stop working correctly as that API evolves.For production applications, use a server-friendly transport like the DailyTransport with a Pipecat server component to securely handle API keys and access the full Pipecat feature set.

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.

Usage

Basic Setup

API Reference

Constructor Options

Below is the transport’s type definition for the OpenAI Session configuration you pass to the constructor. 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