Integration: Twilio Voice + Deepgram Voice Agent API
Origin
Requested in #26: "A Node.js application that connects Twilio Voice (inbound and outbound calls) to Deepgram's Voice Agent API, enabling developers to build AI-powered phone agents that can answer calls, transcribe speech in real-time, and respond with Deepgram TTS."
What this should show
- Express server with Twilio webhook endpoints and WebSocket bridge to Deepgram Voice Agent API
- Inbound call handling: Twilio MediaStream → Deepgram Agent WebSocket (bidirectional)
- Outbound call initiation via Twilio REST API
- Audio format conversion between Twilio mulaw 8kHz and Deepgram linear16
- Agent TTS audio streamed back to the caller through Twilio MediaStream
- At least one function call / tool use within the voice agent (e.g., order status lookup)
- Clean WebSocket lifecycle management (connect, stream, disconnect)
Note on existing example
020-twilio-media-streams-node covers STT-only transcription. This example should focus on the Voice Agent API for full bidirectional conversational AI over the phone.
Credentials likely needed
DEEPGRAM_API_KEY
TWILIO_ACCOUNT_SID
TWILIO_AUTH_TOKEN
TWILIO_PHONE_NUMBER
Reference
Queued by PM from #26 on 2026-03-29
Integration: Twilio Voice + Deepgram Voice Agent API
Origin
Requested in #26: "A Node.js application that connects Twilio Voice (inbound and outbound calls) to Deepgram's Voice Agent API, enabling developers to build AI-powered phone agents that can answer calls, transcribe speech in real-time, and respond with Deepgram TTS."
What this should show
Note on existing example
020-twilio-media-streams-nodecovers STT-only transcription. This example should focus on the Voice Agent API for full bidirectional conversational AI over the phone.Credentials likely needed
DEEPGRAM_API_KEYTWILIO_ACCOUNT_SIDTWILIO_AUTH_TOKENTWILIO_PHONE_NUMBERReference
Queued by PM from #26 on 2026-03-29