Quick Start
1
Give an Agent a transcription tool
2
Transcribe directly (Whisper default)
3
Generate speech from text
4
Use the async variants
5
Switch providers without changing code
How It Works
Calls route through LiteLLM to the provider that matches yourmodel string.
Configuration Options
transcribe(...) / atranscribe(...)
speech(...) / aspeech(...)
Result objects
Common Patterns
Transcribe → summarise pipeline
Multilingual dubbing
Word-level timestamps for captions
Best Practices
Pick the right model per provider
Pick the right model per provider
Use
whisper-1 for OpenAI parity, deepgram/nova-2 for lower latency, and tts-1-hd when audio fidelity matters more than cost.Set language when you know it
Set language when you know it
Passing
language="en" skips detection — faster and more accurate for short clips.Use save() on SpeechResult
Use save() on SpeechResult
SpeechResult.save("out.mp3") writes the bytes and returns the path — no manual file handling needed.Route through metadata for tracing
Route through metadata for tracing
Pass
metadata={"agent_id": ..., "session_id": ...} so LiteLLM callbacks correlate audio calls with an Agent turn.Related
Capabilities Overview
All LiteLLM parity capabilities
AudioAgent
Higher-level Agent abstraction for audio
Completions
Sibling chat/text completion capability
Audio CLI
Command-line and MCP tool equivalents

