Twilio ConversationRelay is Twilio's speech layer for AI calls. Twilio turns speech into text for your app over a WebSocket and speaks its replies, for $0.07 a minute plus voice minutes. Dograh, the open-source AI voice agent platform we build, runs the whole agent on your Twilio number instead. You can self-host it or run it on Dograh Cloud.
Key Takeaways
- ConversationRelay runs speech-to-text and the voice. Your app still runs the model.
- Interruptions and backchannel filtering are set as attributes on its TwiML tag.
- Price the whole call, models included, before comparing it with a platform.
This post is part of our guide to Twilio pricing, where ConversationRelay is the $0.07-a-minute route that moves speech work onto Twilio. Here we go deeper into how it works, every setting it gives you, what you still build, one call priced in full, then the same number under Dograh.
What ConversationRelay does
ConversationRelay sits between the phone call and your code, and it trades audio for text. You point a Twilio number at TwiML with a Connect verb holding a ConversationRelay noun and a secure WebSocket address on your own server. When a call arrives, Twilio plays an optional welcome greeting, listens to the caller and sends your server each finished utterance as text.
Your server then does the thinking. Twilio's ConversationRelay overview describes the split plainly. Twilio converts the speech into text and sends it to your application, and your application uses AI to analyse the text and write a response. You send that response back as text, and Twilio speaks it to the caller.
So Twilio owns the two speech layers and your code owns the language model. That is the whole product. Twilio's other conversational AI products, such as Conversation Intelligence and Conversation Memory, are priced and sold on their own.
Twilio also publishes data labels for the speech providers. Each label says customer data does not train the provider's base model, and with ElevenLabs you can review the TwiML logs, including the spoken text, for up to 30 days.
The settings Twilio gives you
Most of what you can tune sits in attributes on the TwiML tag. The ConversationRelay TwiML reference lists the speech providers first. Speech-to-text runs on Google or Deepgram, with Deepgram as the default for newer accounts, and the voice runs on Google, Amazon or ElevenLabs, with ElevenLabs as the default.
Interruptions have several controls. interruptible decides whether caller speech can cut off the voice, and it defaults to any. interruptSensitivity defaults to high. ignoreBackchannel filters short sounds such as "uh-huh" and "okay" so they don't stop the agent mid-sentence, and welcomeGreetingInterruptible sets whether the caller can talk over the greeting.

Turn-taking and input have their own settings. speechTimeout is either automatic or a fixed 600 to 5,000 milliseconds, and eotThreshold sets how confident the end-of-turn model must be, from 0.5 to 0.9. dtmfDetection, for keypad presses, is off by default. hints lists brand names and hard words for the speech-to-text provider.
Languages have one catch. The default is en-US, and automatic language detection only works with Deepgram for speech-to-text and ElevenLabs for the voice. Twilio warns that other providers in that mode return an error.
What you still build yourself
ConversationRelay hands you text, and everything an agent does with it is your code. You host and scale the WebSocket server that receives each utterance, and you keep it running for every live call. You write the prompt and call the language model, and you manage the conversation's state from turn to turn.
The agent's actions are yours too. Booking an appointment or looking up an order means your code calling your own systems mid-call. Handing a caller to a person means building the transfer, and deciding what happens when nobody answers. Recording, transcripts, a call log your team can search and any review of call quality are also your work.
That split is by design, since ConversationRelay is a speech layer. The real question is whether you want to build the agent around it, or start from an agent platform that already has those parts.
Open Source Alternative to Vapi / Retell
Self-hosted voice agent platform — no per-minute fees
dograh-hq/dograh
Star on GitHub
One 5-minute call on each route
Here is one worked example, a 5-minute inbound call to a US local Twilio number priced on both routes with every line counted. ConversationRelay is $0.07 a minute on Twilio's conversational AI prices, and voice minutes are billed separately at $0.0085 a minute to receive a call.
For the language model, we use the example 5-minute call from our guide to LLM API pricing for voice agents, which comes to about $0.0127 on gpt-4.1-mini and about 2,400 spoken characters. The model line is the same on both routes. On the Dograh route, speech-to-text and the voice come from Deepgram's prices, with Nova-3 streaming at $0.0077 a minute and Aura-2 at $0.030 per 1,000 characters.
| Line | ConversationRelay route | Dograh Cloud on the same number |
|---|---|---|
| Twilio minutes | 5 x $0.0085 = $0.0425 | 5 x $0.0085 = $0.0425 |
| Audio to the agent | ConversationRelay 5 x $0.07 = $0.3500 | Media Streams 5 x $0.0044 = $0.0220 |
| Speech-to-text | Included in ConversationRelay | Deepgram Nova-3 5 x $0.0077 = $0.0385 |
| Voice | Included in ConversationRelay | Deepgram Aura-2 2,400 characters = $0.0720 |
| Language model | gpt-4.1-mini, about $0.0127 | gpt-4.1-mini, about $0.0127 |
| Platform | Your own WebSocket server | 5 x $0.01 = $0.0500 |
| Call total | About $0.4052 plus your server | About $0.2377 |
Self-hosted, the Dograh column loses its $0.05 platform line and gains a server, as the ConversationRelay route already has. The voice line can drop further on the Dograh route if recorded clips replace the generated voice on the lines the agent says most. Your own totals will move with your providers and with how long the agent talks.
A full platform on the same Twilio number
The other route keeps Twilio as the carrier and runs the agent on a platform. Under Dograh, you connect Twilio with your Account SID and Auth Token, and the call's raw audio reaches the agent through Media Streams. ConversationRelay never comes into it, and your numbers stay on your own Twilio account.
Speech, model and voice are then your choice. You bring your own keys for providers such as Deepgram, OpenAI, Google, ElevenLabs, Cartesia and many more, or run open models on your own servers. Pre-recorded clips can play the lines the agent says most, with a generated voice for the rest, as our guide to mixing pre-recorded audio with TTS shows.
The settings have counterparts too. On the Start Call node, Allow Greeting Interruption is on by default, with Minimum Words to Interrupt set to 2, and each agent step has its own Allow Interruption switch, off by default. Hard words go in the agent's Dictionary, the counterpart to hints. Our post on barge-in, endpointing and turn-taking explains how those choices change a call.
What you skip is the build. The visual workflow builder holds the conversation, HTTP API tools call your systems mid-call, and Transfer Call hands callers to a person, with an optional spoken introduction on Twilio. Every call gets a full trace and built-in QA. Self-hosted Dograh has no per-minute platform fee, but servers, model keys and phone minutes still cost money. Dograh Cloud charges a 1¢-a-minute platform fee. For the wider choice between Twilio's AI products and owning the agent, see our open-source alternative to Twilio voice AI.
Join the Dograh Community
Dograh is an OSS alternative to Vapi. Join our Slack community for queries, releases, best practices & community interactions.
Glossary
- ConversationRelay
- Twilio's speech layer for AI calls. Twilio runs speech-to-text and the voice, and your application receives and sends text over a WebSocket, for $0.07 a minute on top of voice minutes.
- Media Streams
- Twilio's raw audio feed. It sends the call's audio to your server over a WebSocket and plays back what your server sends, for $0.0044 a minute, leaving speech and voice to your own providers.
- Backchannel
- Short sounds a listener makes to show they are following, such as "uh-huh" or "okay". ConversationRelay's ignoreBackchannel setting stops them from interrupting the agent.
- End-of-turn threshold
- How sure a model must be that the caller has finished speaking before the agent replies. ConversationRelay's eotThreshold takes a value from 0.5 to 0.9.

