createPipecatAdapter wraps the standard PipecatClient and consumes its RTVI events. It is
transport-agnostic: the same orb-ui adapter works with Pipecat Cloud and Daily, self-hosted
SmallWebRTC, or another Pipecat client transport.
The simple setup
Pipecat applications already choose a client transport. Configure that normal PipecatClient, then
give orb-ui the client and the callback your app uses to connect it. The adapter owns RTVI event
mapping, remote audio playback, input/output level shaping, and cleanup. Transport selection and
agent deployment remain in your application.
Install
Install Pipecat’s client and the transport used by your agent:
Pipecat Cloud or Daily
Your server endpoint should start the deployed agent and return Daily connection details. Keep
private service credentials on the server.
Pipecat Cloud’s public start API returns dailyRoom and dailyToken; DailyTransport normalizes
those fields automatically.
Self-hosted SmallWebRTC
Point the transport at the /api/offer endpoint exposed by a matching server-side
SmallWebRTCTransport.
State mapping
- transport initialization/authentication/connection ->
connecting
- bot ready and user speaking ->
listening
- user stopped speaking, LLM started, or TTS started ->
thinking
- bot started speaking ->
speaking
- bot stopped speaking ->
listening
- client, message, or device error ->
error
- disconnected ->
idle
RTVI LocalAudioLevel becomes inputVolume; bot RemoteAudioLevel becomes outputVolume. The
adapter also meters the PipecatClient local and bot MediaStreamTrack values directly when they
are available. That browser fallback keeps both levels working with SmallWebRTC and with transports
whose RTVI level events are unavailable or sparse. The adapter shapes low raw gain values and
attaches remote bot audio tracks automatically. Use isBotParticipant to filter audio in a
multi-participant session, or set playRemoteAudio: false when your app owns playback.
Output calibration
The default output curve is tuned against a real Pipecat Cloud agent session using the cloud
theme and works for both RTVI gain events and browser-track RMS samples. It is a provider baseline,
so a different theme, transport, or audio mix may benefit from a partial override:
Pass a getter instead of an object to tune the values while a session is active. Set
createAudioContext to a custom factory—or return undefined—when your runtime needs to own or
disable browser-track metering.
Custom session startup
The connect callback can call any Pipecat client startup path and pass transport-specific
parameters. disconnect defaults to client.disconnect() and can also be overridden.
Last modified on July 22, 2026