STTOptions struct allows you to customize speech-to-text behavior including language, timestamps, and audio format.
STTOptions
Parameters
Language Support
Whisper models support 99 languages. Common language codes:Auto-Detection
Leave language unspecified or set to empty string for auto-detection:Force Language
Word Timestamps
Enable word-level timing for subtitles, karaoke, or word highlighting:WordTimestamp Structure
Subtitle Generation Example
Voice Activity Detection (VAD)
VAD filters out silent segments before transcription:Sample Rate
The SDK expects audio at 16kHz by default. If your audio has a different sample rate, specify it:TranscriptionMetadata
Get information about the transcription process:Alternative Transcriptions
Access alternative interpretations:Complete Example
transcribe()
Basic transcription →
Streaming STT
Real-time transcription →