TOOL WIKI · VOICE & REALTIME
Deepgram
Provides speech-processing APIs for voice application components.
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.
Use an audio source with explicit format and retention rules.
Choose how your application identifies speech and conversation turns.
processTo 03 · DeepgramAdding transcription or other speech services to an agent pipeline. Evaluate transcription with your accents, vocabulary, and audio conditions.
resultTo 04 · Agent + toolsUse the recognized text as input and authorize every business operation.
Use a separate synthesis stage when your selected recognition workflow returns text.
outputTo 06 · PlaybackHandle interruption, network failure, and end-of-session cleanup.
Result or stopping point
Adding transcription or other speech services to an agent pipeline. Evaluate transcription with your accents, vocabulary, and audio conditions.
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.
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
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
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
Explore the same layer
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.