---
title: "Add an AI Voice Assistant to a Twilio Video Room with Conversation Relay"
description: "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."
---

# Add an AI Voice Assistant to a Twilio Video Room with Conversation Relay

[Twilio](https://yomu.fyi/company/twilio) · Donal Toomey · Aug 18, 2026

**Type:** Tutorial

## 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.

**Tags:** [AI](https://yomu.fyi/topic/ai), [Node.js](https://yomu.fyi/topic/node-js), [WebSockets](https://yomu.fyi/topic/websockets)

- Source: [Twilio](https://www.twilio.com/en-us/blog/developers/tutorials/product/add-ai-voice-assistant-twilio-video-room-conversation-relay)
- Source URL: https://www.twilio.com/en-us/blog/developers/tutorials/product/add-ai-voice-assistant-twilio-video-room-conversation-relay
- Ingested by Yomu: 2026-09-09T13:34:56.250Z

[Read original post](https://www.twilio.com/en-us/blog/developers/tutorials/product/add-ai-voice-assistant-twilio-video-room-conversation-relay)
