A lightweight WebRTC transport for peer-to-peer audio and video communication in Pipecat
SmallWebRTCTransport
, install the required dependencies:
InputAudioRawFrame
- Audio data from WebRTC peerUserImageRawFrame
- Video frames from peer’s cameraTransportMessageUrgentFrame
- Application messages from peerOutputAudioRawFrame
- Audio data to WebRTC peerOutputImageRawFrame
- Video frames to peerTransportMessageFrame
- Application messages to peerTransportMessageUrgentFrame
- Urgent messages to peer/api/offer
with WebRTC offerSmallWebRTCConnection
and initializes it with the offerrun_bot()
in background with the connectionSmallWebRTCTransport
using the connectioniceServers
configuration provides a list of STUN and TURN servers that WebRTC uses to find the best way to connect two peers.