Twilio published a developer tutorial that shows how to add an AI voice assistant to a Twilio Video room by combining Twilio Programmable Video, Conversation Relay and an LLM. The tutorial demonstrates an audio-only AI participant that listens, transcribes speech, and responds using text-to-speech, all coordinated over a single WebSocket connection to an application server.
Key Details
The tutorial, published by Twilio on 18 August 2026, presents a worked example for telehealth-style use cases where a patient waits in a video room and an AI intake assistant collects information before a provider joins. It shows how to bridge a Video room to Conversation Relay by creating a two-leg Voice call: one leg joins the Video room as an audio-only participant, the other leg connects to Conversation Relay.
Conversation Relay handles speech-to-text transcription, text-to-speech synthesis, interruption detection and turn-taking, while streaming events to a WebSocket endpoint on your server. The application server receives transcribed text events and sends back text responses (the tutorial example uses the OpenAI API but notes the WebSocket handler is provider-agnostic).
The tutorial provides step-by-step code and configuration guidance: initialising a Node.js project, installing dependencies (express, twilio, openai, ws, dotenv), creating a .env with Twilio and OpenAI credentials, programmatically creating a TwiML App with a setup script, building an Express server (server.js) with routes for Video token generation, TwiML endpoints (/voice-handler and /join-room), an /invite-ai endpoint that places the bridged call, a /cleanup endpoint, and a WebSocket server at /ai-ws to handle Conversation Relay messages.
Who May Be Affected
The tutorial targets developers building Twilio Video applications, with a specific example oriented to telehealth waiting-room workflows. Requirements listed by Twilio include an upgraded Twilio account (not Trial), Node.js v18 or higher, npm, ngrok, an OpenAI API key (or another LLM provider), a Twilio phone number, and a Twilio API Key and API Secret.
Organisations or teams using Twilio Programmable Video and voice bridges to add automated intake, conversational assistants or other real-time voice AI features will find the end-to-end example directly applicable.
Why It Matters For Voice AI
For developers and businesses exploring voice AI, Conversation Relay provides a way to offload the low-level voice handling: Twilio manages the audio connection to the room and the streaming of transcription and audio synthesis, and your server handles higher-level conversation logic and LLM calls. The tutorial exposes the TwiML and API calls needed to create a bridged call where one participant sits in the Video room and the other is connected to Conversation Relay.
AiDial analysis: Using an audio-only AI participant to collect intake during waiting-room time can reduce manual form work and streamline provider workflows. Organisations should treat this tutorial as a technical blueprint rather than operational guidance: you will need to map the example to your own privacy, consent and clinical processes before deploying in production.
What To Watch Next
Twilio’s tutorial is a code-first example: the post points to a complete source repository on GitHub if you want to run or adapt the sample. Key implementation touchpoints to consider when adopting the pattern include handling credentials in .env, running ngrok for local endpoints, creating the TwiML App programmatically, and ensuring your server implements the WebSocket handler for Conversation Relay events and LLM requests.
Operational steps the tutorial highlights include adding cleanup logic to end the bridge call and optionally complete the Video room, and implementing the /invite-ai and /cleanup routes so the frontend can control when the AI joins and when resources are released.
Sources
Add an AI Voice Assistant to a Twilio Video Room with Conversation Relay (Twilio blog, published 18 August 2026).
This article is general information and not legal advice.
AiDial closing: If you’re building voice AI into video workflows, Twilio’s tutorial provides a practical pattern you can prototype with. Consider the sample as a technical starting point and align implementation with your compliance and clinical requirements before production use.

