TOOL WIKI · VOICE & REALTIME

Deepgram

Provides speech-processing APIs for voice application components.

Download example files Code + setup + checks in a ZIP
Jump to a section 10 sections

EXAMPLE USE CASE

Transcribe one support-call recording

A spoken support interface needs capture, turn handling, transcription or playback with explicit media formats and a verifiable outcome.

Input
A short approved WAV recording with a clear spoken sentence.
Expected output
A transcript and returned word timing/count information.
  • Success check: Use a WAV with one clear spoken sentence; inspect the transcript and word timestamps.
  • Try a failure: Silence or poor audio should be investigated as transcription coverage, not replaced by fabricated words.

Example scope: Actual prerecorded speech-to-text API request; no reasoning or reply generation is implemented.

Official reference · Deepgram

WHAT IT ISSpeech platform
WHERE IT FITSVoice & realtime
SEE HOW THE SYSTEM FITS TOGETHERSELECT A COMPONENT
inputprocessresultcheckoutputMicrophone or fileAuthorized audioTurn handlingVAD and interruptionDeepgramSpeech platformAgent + toolsGrounded task workSpeech synthesisReply audioPlaybackCancel stale output
  1. Use an audio source with explicit format and retention rules.

  2. Choose how your application identifies speech and conversation turns.

  3. Adding transcription or other speech services to an agent pipeline. Evaluate transcription with your accents, vocabulary, and audio conditions.

  4. Use the recognized text as input and authorize every business operation.

  5. Use a separate synthesis stage when your selected recognition workflow returns text.

  6. Handle interruption, network failure, and end-of-session cleanup.

    Result or stopping point
Deepgram

Adding transcription or other speech services to an agent pipeline. Evaluate transcription with your accents, vocabulary, and audio conditions.

Follow the arrows, then select a component to inspect its responsibility. On mobile, downward arrows connect the next step; bent arrows identify branches and return paths. Select a destination to jump to that component.

When to consider it

  • Adding transcription or other speech services to an agent pipeline.

A design decision to make

  • Evaluate transcription with your accents, vocabulary, and audio conditions.

Prerequisites and setup

  • A Deepgram key and a short local sample.wav. Set a supported STT model for your project.
Shell
python3 -m venv .venv
source .venv/bin/activate
pip install requests
export DEEPGRAM_API_KEY="YOUR_KEY"
export DEEPGRAM_MODEL="nova-3"

Try a small integration

transcribe.py

Python · transcribe.py
import os
import requests

with open("sample.wav","rb") as audio:
    response = requests.post("https://api.deepgram.com/v1/listen", timeout=60,
        params={"model":os.environ["DEEPGRAM_MODEL"],"smart_format":"true"},
        headers={"Authorization":"Token "+os.environ["DEEPGRAM_API_KEY"],"Content-Type":"audio/wav"},
        data=audio)
response.raise_for_status()
result = response.json()["results"]["channels"][0]["alternatives"][0]
print(result["transcript"])
print("Words:",len(result.get("words",[])))

Run and check the result

Shell
python transcribe.py
  • Use a WAV with one clear spoken sentence; inspect the transcript and word timestamps.
  • An empty transcript for silence is valid. Do not manufacture text to make an STT test appear successful.

Common failures

  • No audio: verify input/output codecs, sample rate, channel count, permission and selected device separately.
  • Handle provider errors and interrupted streams explicitly; do not interpret a disconnected call as a completed business action.

Production decisions

  • Keep permanent credentials on a trusted server; use short-lived session credentials for clients. Define audio/transcript retention and consent.
  • Measure end-of-turn latency, interruption handling, silence, reconnects, tool deadlines and session cost with real microphones and networks.
  • For streaming, distinguish interim hypotheses from finalized turns and handle endpointing; do not execute a business tool on an unstable partial transcript.

Keep exploring

A realtime voice agent with OpenAIA voice agent with Google Gemini Live

Explore the same layer

OpenAI RealtimeGoogle Gemini LiveLiveKit AgentsPipecat

Compare candidates on your own workload. This entry describes a product’s role; it is not a claim that products in the category are interchangeable.