TwilioDonal ToomeyTutorial
Add an AI Voice Assistant to a Twilio Video Room with Conversation Relay
Summary
The tutorial addresses wasted patient time in telehealth waiting rooms by adding an AI voice assistant to a Twilio Video room for intake collection. It combines Twilio Programmable Video, Conversation Relay, and an LLM, with the assistant joining as an audio-only participant and handling questions about visit reasons, symptoms, and medications. A two-leg Voice call bridges the room to Conversation Relay: one leg participates in the room, while the other sends transcribed audio to a WebSocket server and returns spoken LLM responses. The tutorial uses Node.js, Express, the Twilio helper library, OpenAI, ws, dotenv, and ngrok, and explains setup, browser interaction, and troubleshooting. Its stated result is a working application in which a patient converses naturally with the AI before a provider joins, with GPT-4o-mini processing speech.
Context
Telehealth applications can leave patients waiting in empty rooms before a provider joins. The tutorial uses this waiting period as an opportunity to collect intake information, including the reason for a visit, symptom updates, and current medications.
Approach / What changed
The implementation bridges a Twilio Video room and Conversation Relay through a two-leg Twilio Voice call. One call leg joins the room as an audio participant, while the other connects to Conversation Relay, which handles speech-to-text, text-to-speech, interruption detection, and turn-taking over a WebSocket connection. The server passes transcribed text to an LLM and sends text responses back.
Takeaways
Twilio Programmable Voice calls can join a Twilio Video room as audio-only participants, allowing an AI assistant to hear and speak with room participants.
Conversation Relay manages transcription, speech synthesis, interruption detection, and turn-taking, so the application WebSocket handler exchanges text with the voice system.
The demonstrated application lets a patient interact with an AI intake assistant before a provider joins; the test flow uses GPT-4o-mini for response processing.
Source and freshness
- Source
- twilio.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.