Integrations / Bandwidth
Bandwidth voice agents with Cartesia speech on every call
A small server answers Bandwidth's webhook and streams the call's 8 kHz mu-law audio to Cartesia and back without resampling.
What you can do with Bandwidth
What teams build when they put Cartesia and Bandwidth together.
No resampling
Bandwidth carries 8 kHz mu-law and both Cartesia sockets accept pcm_mulaw at 8000 Hz, so audio crosses the bridge as is.
Few dependencies
The example bridge needs only fastapi, uvicorn, httpx, websockets and python-dotenv on Python 3.11 or later.
Your logic in the middle
Your server sits between the two sockets, so the reply text the agent speaks can come from any LLM you choose to call.
Set it up
A documented bridge you run yourself. Bandwidth carries the call and your server connects it to Cartesia's sockets. This is not a Managed Agents number route. Vendor details read in October 2026.
Get the accounts
A Cartesia API key and voice ID, and a Bandwidth account with Voice API credentials, a number and a Voice Application.
Expose your server
Use an HTTPS tunnel that supports WebSockets while you develop.
Return BXML
Answer Bandwidth's webhook with a
StartStreamverb in bidirectional mode.Bridge the sockets
Forward caller audio to the speech to text socket, and speak each final transcript through text to speech.
Before you build
Your server, your responsibility
You run the bridge on your own server, so you own its uptime and how it handles the call audio that passes through it.
Want Cartesia to host the agent?
A Managed Agent runs the whole loop for you. Any carrier that sends SIP over TLS or TCP can reach one. See the SIP trunking page.
More integrations
Bandwidth integration FAQs
Can Bandwidth connect to an AI voice agent?
Yes, through a server you run. Bandwidth answers the call, your server returns BXML with a bidirectional StartStream verb, and the server passes the call audio to Cartesia speech to text and speaks replies with Cartesia text to speech. Bandwidth's developer docs have their own Cartesia integration page.
Is this the same as a Managed Agent?
What audio format does Bandwidth stream?
8 kHz mu-law in both directions. Both Cartesia sockets accept pcm_mulaw at 8000 Hz, and Ink 2 reads it directly, so nothing is resampled on the way through the bridge.
What does the Bandwidth bridge cost?
Three separate bills. Bandwidth charges for the call, your LLM provider charges for the replies, and Cartesia charges API credits on your plan. Sonic text to speech costs 1 credit per character and Ink speech to text 3 credits per second of audio. The Free plan includes 20K credits a month, and paid plans start at $5/month.
Can I run the Bandwidth bridge locally while I develop?
Yes. Expose your server through an HTTPS tunnel that supports WebSockets, so Bandwidth can reach your BXML webhook and open the stream. Once it is live, you run the bridge on your own server and own its uptime and how it handles the call audio.
Get started today
Talk to an expert.
Connect with a member of our team and learn how Cartesia can help you build world-class voice experiences.
Start building.
Access our models via API and bring a voice agent into production in minutes.