Skip to main content
Configure STT behavior for different use cases and languages.

Model Selection

Choose the right model based on your needs:

Register Multiple Models

Switch Models at Runtime

Memory Management

Unload STT model when not needed to free memory:

Audio Preprocessing Tips

If your audio isn’t 16kHz, convert it before transcription: dart // Example: Convert 44.1kHz to 16kHz // Use a package like 'flutter_sound' for resampling
For noisy environments, consider preprocessing audio: - Apply a high-pass filter to remove low-frequency noise - Normalize audio levels - Remove silence at beginning/end
Always ensure correct format: - PCM16 (16-bit signed integer) - 16,000 Hz sample rate - Mono (single channel)

Error Handling

Best Practices

Start with the smallest model that meets your accuracy needs. You can always upgrade later if needed.
  1. Preload during idle time — Download and load STT model before user needs it
  2. Use English-specific models — They’re smaller and more accurate for English
  3. Handle empty audio — Check audio length before transcribing
  4. Provide feedback — Show transcription progress to users

See Also

transcribe()

Basic transcription

Voice Agent

Complete voice pipeline