Overview

SmallWebRTCTransport enables peer-to-peer (“serverless”) WebRTC connections between clients and your Pipecat application. It implements bidirectional audio, video and data channels using WebRTC for real-time communication. This transport is open source and self-contained, with no dependencies on any other infrastructure.
For detailed notes on how to decide between using the SmallWebRTCTransport or other WebRTC transports like the DailyTransport, see this post.

Installation

To use SmallWebRTCTransport, install the required dependencies:
pip install "pipecat-ai[webrtc]"

Prerequisites

WebRTC Application Setup

Before using SmallWebRTCTransport, you need:
  1. Signaling Server: Implement WebRTC offer/answer exchange (required)
  2. Client Implementation: Set up WebRTC client for browser or application use
  3. ICE Configuration: Configure STUN/TURN servers for NAT traversal (optional for local networks)
  4. Development Runner: Use Pipecat’s development runner for quick setup (recommended)
No API keys are required since this is a peer-to-peer transport implementation. For production deployments across different networks, you may need to configure STUN/TURN servers for NAT traversal.

Configuration Options

  • Development Runner: Automatic server infrastructure and web interface (recommended)
  • Manual Implementation: Custom signaling server for advanced use cases
  • ICE Servers: STUN/TURN configuration for network traversal
  • Media Configuration: Audio/video parameters and format handling

Key Features

  • Serverless Architecture: Direct peer-to-peer connections with no intermediate servers
  • Production Ready: Heavily tested and used in Pipecat examples
  • Bidirectional Media: Full-duplex audio and video streaming
  • Data Channels: Application messaging and signaling support
  • Development Tools: Built-in development runner with web interface

Usage

SmallWebRTCTransport requires both a signaling server for WebRTC handshake and your Pipecat bot implementation. The easiest approach is using Pipecat’s development runner which handles all server infrastructure automatically. See the complete examples for full implementations including:
  • Development runner setup with automatic web interface
  • Manual signaling server implementation
  • WebRTC client integration
  • ICE server configuration for production deployment