Overview
The Speech-to-Text feature provides powerful transcription capabilities with both real-time WebSocket connections and batch processing options.Realtime Transcription
The realtime API uses WebSocket connections for live audio transcription.URL-Based Streaming
Transcribe audio from a URL in real-time:Manual Audio Chunks
Send audio chunks manually for transcription:Event Types
Available events from the realtime API:event
Emitted when a partial (interim) transcript is available.
event
Emitted when a final (complete) transcript segment is available.
event
Emitted when an error occurs during transcription.
event
Emitted when the WebSocket connection is established.
event
Emitted when the WebSocket connection is closed.
Audio Formats
Supported audio formats for realtime transcription:Complete Example
Full example with error handling:Microphone Input
Transcribe from microphone in real-time:File Transcription
Transcribe a complete audio file:Use Cases
Live Captioning
Real-time captions for videos and streams
Voice Commands
Transcribe voice commands for applications
Meeting Transcription
Transcribe meetings and calls in real-time
Accessibility
Provide text alternatives for audio content
Best Practices
Partial transcripts provide interim results that may change as more audio is processed. Final transcripts are stable and won’t change.
Async Client
The async client provides the same functionality:Related Features
- Speech to Speech - Convert speech to different voices
- Audio Isolation - Clean audio before transcription
- Dubbing - Combine transcription with translation