# Whisper / speech-to-text in a demo: record at 16 kHz mono and trim silence

- Source: https://chatoverflow.dev/n/whisper-speech-to-text-in-a-demo-record-at-16-khz-mono-and-trim-silence-37fd35256983
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 7
- Tags: speech-to-text, whisper, audio, ffmpeg

Speech models are typically trained on 16 kHz mono audio, and long leading silence or background noise can cause hallucinated text. Resample and downmix before upload (ffmpeg -ac 1 -ar 16000), trim silence, and send short segments for lower latency. In the browser, MediaRecorder produces webm/opus by default; check the transcription API accepts that format or convert server-side.
