Vocs: fast local dictation on macOS with whisper.cpp, and the settings that backfired
- Models & engines
- whisper.cpp for local speech-to-text
- Key gotcha
- Whisper's encoder always works on a 30-second window and whisper.cpp pads shorter audio, so 1-second chunks cost roughly 10x the total compute of 10-second ones.
What they built
INAMUL HASAN is building Vocs, a free, open-source dictation app for macOS made with Tauri, Rust and whisper.cpp. You press a key, talk, press it again, and the text is pasted, so the time from stop to paste has to stay flat whether you spoke for five seconds or five minutes.
The post collects the Whisper lessons that cost the most time, from why tiny chunks are slower to two settings that were harmless alone and broke output together.
Everything described is in the MIT-licensed repo.
Setup
- macOS desktop app built with Tauri and Rust
- whisper.cpp for local speech-to-text
- earshot, a small pure-Rust WebRTC voice activity detector, to find pauses
How it works
- Audio is cut at silence boundaries rather than on a timer: the first chunk closes at the first pause after 4 seconds of speech, and chunks are capped at 12 seconds.
- Chunks are transcribed in the background while you talk, so when you press stop only the last fragment is left to decode.
- Each decode scales whisper.cpp's audio_ctx to the fragment length instead of the full 30-second window.
- Chunks with no detected speech never reach the model, and decoder state is reset between chunks (no_context = true).
- Output is cleaned in plain code: sound-effect tags are stripped and repeated phrases collapsed, with one retry before a looping chunk is discarded.
Results & numbers
- A 1.7-second fragment decoded in 221 ms at audio_ctx 256 versus 1783 ms at the default 1500, about 8x faster for the same text.
- Keeping full context on background chunks made one decode take 2.3 seconds, so pressing stop during it meant 2.6 seconds to paste; every chunk now uses the shrunk context.
- With no_timestamps = true the tail decode took 340 ms and returned the sentence repeated 24 times; with false it took 113 ms and was correct.
Gotchas
- Whisper's encoder always works on a 30-second window and whisper.cpp pads shorter audio, so 1-second chunks cost roughly 10x the total compute of 10-second ones.
- whisper.cpp's temperature fallback can retry a failed decode up to 6 extra times, turning 200 ms into 1.4 seconds; turning it off also removes the safety net against repetition.
- Timestamp tokens are how the decoder knows when to stop, so disabling them together with fallback produced runaway repeats.
- Most invented 'thanks for watching' text comes from silence sent to the model.
- A pre-roll buffer keeps the macOS orange microphone indicator lit all the time, so by default the mic opens on the keypress (roughly 20 to 80 ms).
“Treat decoder output as untrusted input, the way you would user input.”— INAMUL HASAN
Do it yourself
- Use a voice activity detector to cut audio at pauses, with a minimum and maximum chunk length.
- Transcribe chunks in the background so only the final fragment is on the critical path.
- Set audio_ctx per fragment with the formula below, as whisper.cpp's own stream example does.
- Keep no_timestamps = false, set no_context = true between chunks, and skip chunks with no detected speech.
- Strip *...*, [...] and (...) tags and collapse repeated phrases before pasting; the full app is at github.com/HackX-IN/vocs.
audio_ctx = clamp(ceil(duration_seconds / 30 * 1500) + 128, 256, 1500)Similar setups
A mock-interview coach where a local 4B model must quote you to mark you down
Yuva Kunaal built Local AI Interviewer, an open-source app that runs mock interviews on your own computer with qwen3.5:4b through Ollama and only reports a mistake when the model can quote it from your answer.
Séance: local Whisper and Gemma 4 turn a grandmother's Malayalam voice notes into a searchable family archive
Clivin John built Séance, which transcribes and translates his grandmother's voice notes on his laptop, has Gemma 4 write memory cards, and answers questions only with her exact, verified words.
Couch Commander: an offline voice remote for YouTube that understands Pidgin
Benny built Couch Commander, which chains openWakeWord, Whisper and Gemma 4 E2B in Ollama on a Mac so spoken commands in English or Nigerian Pidgin control YouTube in Chrome with no internet.
Hearth: a household assistant on Ollama, and proving nothing leaves the house
Hearth answers family questions from manuals and papers with citations, handles voice, notes and reminders, and runs on one home computer; its builders tested small models, prompt injection, and three ways of proving no data leaves.