Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.vobiz.ai/llms.txt

Use this file to discover all available pages before exploring further.

Stream raw Vobiz audio over WebSocket into a Pipecat AI pipeline - no LiveKit or third-party WebRTC SDK required.

View on GitHub

Clone and run the full working example

Getting started

git clone https://github.com/vobiz-ai/Vobiz-x-Pipecat.git
cd Vobiz-x-Pipecat
pip install -r requirements.txt
python server.py

Overview

When a caller dials in, Vobiz is instructed via XML to open a raw WebSocket to your server. Pipecat’s WebsocketServerTransport receives the audio stream and routes it through a sequential AI pipeline - VAD → STT → LLM → TTS - before streaming synthesized audio back to the caller.

Architecture

Caller → Vobiz SIP → XML: <Connect><Stream url="wss://your-server/ws"/></Connect>

                              WebsocketServerTransport (Pipecat)

                              SileroVADAnalyzer (voice activity)

                              Deepgram STT (speech → text)

                              OpenAI LLM (text → response)

                              ElevenLabs TTS (response → audio)

                              WebSocket → Vobiz → Caller

How it works

1

Incoming call

When an inbound call triggers your webhook, respond with Vobiz XML instructing Vobiz to open a WebSocket stream to your server.
2

Pipecat transport

WebsocketServerTransport receives the raw audio stream. Vobiz sends base64-encoded G.711 μ-law audio frames as JSON events, which Pipecat decodes and buffers automatically.
3

Sequential pipeline

Audio flows through the Pipecat pipeline - VAD detects speech, Deepgram transcribes it, OpenAI generates a response, and ElevenLabs synthesizes speech.
4

Audio response

Encode the synthesized audio and send it back over the WebSocket. Vobiz plays it to the caller in real time.

Vobiz XML hook

Your webhook endpoint must return this XML when a call arrives:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Connect>
    <Stream url="wss://your-server.com/ws" />
  </Connect>
</Response>

Environment variables

.env
DEEPGRAM_API_KEY=your-deepgram-key
OPENAI_API_KEY=sk-...
ELEVENLABS_API_KEY=your-elevenlabs-key
HTTP_PORT=8000
PUBLIC_URL=https://your-server.com  # or leave blank to use ngrok