---
title: "Integrate Deepgram Flux with Twilio's Conversation Relay"
description: "Twilio's ConversationRelay connects phone calls to an AI stack while handling speech-to-text, text-to-speech, and the WebSocket session, leaving application code focused on the LLM and conversation logic. This tutorial updates a Node.js ConversationRelay application to use Deepgram Flux, which combines transcription and turn detection and is described as reducing response latency by up to 200–600 milliseconds and false interruptions by around 30 percent. It walks through cloning a Fastify demo, exposing it with ngrok, configuring environment variables, and adding Flux settings to the ConversationRelay TwiML, including eotThreshold, speechTimeout, and ignoreBackchannel. The supplied configuration uses an end-of-turn threshold of 0.8, a 3,000-millisecond speech timeout, and enabled backchannel ignoring, while the tutorial also explains partial prompts, smart formatting, and recognition hints."
---

# Integrate Deepgram Flux with Twilio's Conversation Relay

[Twilio](https://yomu.fyi/company/twilio) · Dhruv Patel · Sep 8, 2026

**Type:** Tutorial

## Summary

Twilio's ConversationRelay connects phone calls to an AI stack while handling speech-to-text, text-to-speech, and the WebSocket session, leaving application code focused on the LLM and conversation logic. This tutorial updates a Node.js ConversationRelay application to use Deepgram Flux, which combines transcription and turn detection and is described as reducing response latency by up to 200–600 milliseconds and false interruptions by around 30 percent. It walks through cloning a Fastify demo, exposing it with ngrok, configuring environment variables, and adding Flux settings to the ConversationRelay TwiML, including eotThreshold, speechTimeout, and ignoreBackchannel. The supplied configuration uses an end-of-turn threshold of 0.8, a 3,000-millisecond speech timeout, and enabled backchannel ignoring, while the tutorial also explains partial prompts, smart formatting, and recognition hints.

## Context

The tutorial addresses turn detection in voice agents. Separate voice activity detection, endpointing, and speech-recognition components measure silence without understanding whether a pause occurs mid-sentence or at the end of a thought, which can contribute to latency and false interruptions.

## Approach / What changed

It modifies a Node.js Fastify ConversationRelay demo to use Deepgram Flux by adding transcriptionProvider="Deepgram", speechModel="flux", eotThreshold="0.8", speechTimeout="3000", and ignoreBackchannel="true" to the ConversationRelay TwiML. The setup also uses ngrok, environment variables, and a Twilio voice number for testing.

## Takeaways

- Deepgram Flux combines transcription and turn detection in one model, with the tutorial describing up to 200–600 milliseconds lower response latency and around 30% fewer false interruptions.
- Flux-only controls include eotThreshold, partialPrompts, and speechTimeout; eotThreshold ranges from 0.5 to 0.9, while speechTimeout accepts 600–5000 milliseconds or auto.
- The tutorial leaves partialPrompts disabled because eager end-of-turn handling requires cancelling withdrawn LLM requests and duplicating responses when the final transcript matches.

**Tags:** [Deepgram](https://yomu.fyi/topic/deepgram), [Node.js](https://yomu.fyi/topic/node-js), [Twilio](https://yomu.fyi/topic/twilio)

- Source: [Twilio](https://www.twilio.com/en-us/blog/developers/tutorials/integrations/deepgram-flux-twilio-conversation-relay)
- Source URL: https://www.twilio.com/en-us/blog/developers/tutorials/integrations/deepgram-flux-twilio-conversation-relay
- Ingested by Yomu: 2026-09-09T20:01:47.170Z

[Read original post](https://www.twilio.com/en-us/blog/developers/tutorials/integrations/deepgram-flux-twilio-conversation-relay)
