Skip to content

Deepgram

Deepgram is a streaming speech-to-text provider. This bridge wires Teler call audio to Deepgram’s real-time API; the transcript flows back into your application logic.

VariableRequiredDefaultDescription
Deepgram_API_KEYyesnoneYour Deepgram API key.
TELER_API_KEYyesnoneYour Teler API key.
NGROK_AUTHTOKENyes (local)nonengrok auth token.
Terminal window
git clone https://github.com/frejun-tech/teler-deepgram-bridge
cd teler-deepgram-bridge
cp .env.example .env
docker compose up -d --build
Terminal window
curl -X POST http://localhost:8000/api/v1/calls/initiate-call \
-H "Content-Type: application/json" \
-d '{
"from_number": "+91XXXXXXXXXX",
"to_number": "+91XXXXXXXXXX"
}'

The bridge opens a WebSocket to Deepgram’s real-time STT endpoint and pipes caller audio in. Transcripts come back as they’re produced, typically every few hundred milliseconds.

To build a full agent on top of Deepgram, fork this repo and add:

  1. An LLM: call OpenAI, Anthropic, or your model with the transcript.
  2. A TTS, such as Cartesia, ElevenLabs, or OpenAI, to produce audio.
  3. Send the TTS audio back to Teler over the same WebSocket using the outbound audio message type.
SymptomLikely causeFix
Empty transcriptsWrong sample rate or codecCheck Deepgram model expects 8 kHz linear PCM
401 from DeepgramInvalid Deepgram_API_KEYRotate; check casing in .env
Bridge doesn’t speak backThis is STT onlyYou must add LLM + TTS in your fork