Skip to content

PipecatAgentAdapter

Drives a custom Pipecat bot. Connects to your bot's WebSocket endpoint (which speaks the Twilio Media Streams binary protocol) or to a WebRTC signaling endpoint.

Constructor

import scenario
 
adapter = scenario.PipecatAgentAdapter(
    url="ws://localhost:8765/stream",
    audio_format="mulaw",
    sample_rate=8000,
)

Other keyword-only arguments: signaling_url (for transport="webrtc"), transport ("websocket" default or "webrtc"), stream_sid, call_sid.

Capabilities

streaming_transcriptsnative_vaddtmfinterruptioninput_formatsoutput_formats
pcm16/24000, mulaw/8000, opuspcm16/24000, mulaw/8000, opus

Worked examples