Skip to main content
Sprag builds speech and language models for voice agents. Together with Vobiz, they give your Pipecat agent a phone number: Vobiz carries the call, and Sprag listens, thinks and speaks. Source code: vobiz-ai/Vobiz-Sprag-Pipecat, the complete agent with setup instructions and a call simulator for testing without a phone.

How it works

A caller phones a Vobiz number. Vobiz streams the call audio over a WebSocket to a Pipecat pipeline, where Sprag Rhythm transcribes it, Symphony writes the reply and Chorus speaks it back to the caller.A caller phones a Vobiz number. Vobiz streams the call audio over a WebSocket to a Pipecat pipeline, where Sprag Rhythm transcribes it, Symphony writes the reply and Chorus speaks it back to the caller.
1

Someone calls your Vobiz number

Vobiz answers and asks your agent what to do. The agent replies with Stream XML, and Vobiz starts streaming the call’s audio to it over a WebSocket.
2

Rhythm hears the caller

Sprag’s speech-to-text model turns the caller’s words into text as they speak. Pipecat detects when they’ve finished their turn.
3

Symphony writes the reply

Sprag’s own model reads the conversation so far and writes what the agent says next.
4

Chorus speaks it on the call

Sprag’s text-to-speech model turns the reply into a natural voice. Vobiz plays it to the caller, and the conversation continues.

Who does what

Pipecat sits in the middle and runs the conversation. It hands audio from Vobiz to Sprag, and Sprag’s spoken reply back to Vobiz.

What you need

  • A Vobiz account with a phone number, and your Auth ID and Auth Token.
  • A Sprag API key, from sprag.ai.
  • Python 3.11 or later, and a public HTTPS URL for the agent (a tunnel such as ngrok works while you build).

Set it up

1

Get the agent

Clone vobiz-ai/Vobiz-Sprag-Pipecat and follow its README to install it and add your Sprag and Vobiz keys.
2

Try it without a phone

Run the repository’s call simulator. It plays the part of Vobiz, asks the agent a question, and saves the agent’s spoken reply so you can listen to it.
3

Give the agent a public URL

Start the agent and expose it over HTTPS, for example with a tunnel. Note the URL.
4

Point your Vobiz number at the agent

Create an application with its Answer URL set to your agent’s /answer address, then attach your number to it.
5

Call your number

The agent greets you, and you can talk to it. To have the agent call someone instead, make a call with the same Answer URL.
Calls are billed to your Vobiz account, and Sprag usage is billed to your Sprag account. Start with your own number.

Audio quality

Vobiz streams calls as standard phone audio (μ-law at 8 kHz) or as wideband audio (L16 at 16 kHz); see audio formats. Chorus speaks at 24 kHz, and pipecat-vobiz converts its voice to the call’s format, so the agent sounds clear on both.

Make it yours

  • Personality and greeting: change what the agent says in the repository’s bot.py.
  • Voice: pick another Chorus voice from Sprag’s voice presets.
  • Turn-taking: use Sprag’s own turn detection, described in the pipecat-sprag README.

Example repository

The complete agent and a call simulator

Pipecat

Vobiz with Pipecat

Sprag's Pipecat guide

Sprag’s own guide to pipecat-sprag

Stream XML

How Vobiz streams call audio