blog / guides
Voice coding: talk to Claude Code and Codex instead of typing
Speak your prompts to Claude Code or Codex: how to dictate goals, constraints and file names, why local Whisper beats cloud dictation, and when to type.

Most prompts to a coding agent are too short. Typing three paragraphs of context feels like work, so you send one line and hope the agent guesses the rest. It usually guesses wrong.
Speaking fixes that. You talk much faster than you type, and when you talk you naturally explain why: what you tried, what broke, what must not change. That context is exactly what Claude Code, Codex and other CLI agents need to do the right thing on the first try.
Why voice works for agent prompts
A coding agent is not autocomplete. It reads your request, explores the repo, makes a plan and edits files. The quality of that plan depends almost entirely on what you told it. Voice helps in three ways:
- More context for the same effort. A one-minute spoken prompt easily carries what you would never bother to type: the goal, the edge case, the file you suspect.
- You think out loud. Explaining a bug to someone (even an agent) is rubber-duck debugging. Half the time you notice the real cause while saying it.
- Your hands stay free. Keep the diff or the logs in front of you while you describe what you see.

How to dictate a good prompt
Dictation is a skill. A rambling voice note gives the agent a rambling task. A simple structure keeps it sharp:
- Say the goal first. "Add rate limiting to the login endpoint." One sentence the agent can anchor on.
- Then the constraints. "Don't touch the session logic. Keep the existing error format. No new dependencies."
- Then the places. Name the files, functions and commands: "the handler is in
auth/login.ts, tests run withnpm test." - Then the finish line. "Done means the tests pass and a sixth attempt within a minute gets a 429."
A few habits make the transcript cleaner:
- Pause briefly between thoughts. Short pauses give the speech model clean sentence boundaries. Long ones may end your recording, depending on the tool.
- Spell identifiers you care about. Speech models write
user idwhen you meanuserId. Say "camel case user I D" or just spell it, and the agent will usually map it to the real symbol anyway once it reads the code. - Read the transcript before you send it. This is the most important rule. A misheard "don't" becomes "do", and the agent will happily do the opposite of what you meant. Five seconds of reading saves a bad run.
Privacy: local vs cloud speech recognition
When you dictate, your voice has to become text somewhere. There are two places that can happen:
- Cloud dictation sends the audio to a server. It is often accurate and needs no setup, but your recording, which may include client names, internal URLs or the bug in your payment code, leaves your machine.
- Local speech recognition runs the model on your own computer. Open models such as OpenAI's Whisper (and the
whisper.cppport) run well on a normal laptop. Nothing is uploaded; the trade-off is a one-time model download and some CPU time per recording.
For code, local recognition is the sensible default. Note that the agent itself still sends your prompt text to its model provider, as it would if you had typed it; local recognition only keeps the audio at home.
When voice is a bad idea
Voice is great for intent and terrible for precision. Type instead when:
- You need exact code. Regexes, SQL, a specific CLI flag or a JSON snippet. Dictating
^[a-z0-9_-]+$is pain. Paste it. - You are in an open office or on a call. Your colleagues don't want to hear your prompts, and you may not want them to hear about the bug.
A good pattern is to mix: speak the context, then type or paste the exact piece.
Voice coding in Bettr
Bettr is a desktop terminal for running AI coding agents side by side, and it has voice built in. Voice is part of Bettr Pro.
Dictation. In Settings › Voice, switch on Voice transcription. Bettr can set up a local Whisper for you (a whisper.cpp binary plus a speech model; on Linux you install whisper.cpp from your package manager and Bettr downloads the model), and transcription runs on your machine; nothing is uploaded. You get the toolbar mic and a Voice shortcut you record yourself: hold to talk, or tap to toggle the Voice panel.
Use anywhere. With the system-wide backend, the same shortcut works in any app: hold it, speak, release, and the transcript goes into the focused app. Options include Auto-paste into the focused app (off keeps the transcript on the clipboard) and Restore the clipboard after pasting. On macOS, the Permissions row links to the Mic, Accessibility and Input Monitoring settings, and a Test button checks the whole flow without the shortcut.
Voice conversation. This is the hands-free mode. Right-click a pane and choose Voice conversation:
- You speak. Three seconds of silence ends your turn, and what you said is typed into the agent.
- The mic closes while the agent works.
- When it finishes, the answer is condensed to a sentence or two and read aloud, then you hear "You can speak now." and the mic reopens.
Permission prompts are read out too: "yes" picks option 1, "no" picks option 2 (the phrases follow your Whisper language setting). Stop with Esc while it is listening, or by clicking the pane chip. It runs in one pane at a time and ends if the agent exits. It works with Claude Code and with other CLI agents. Speech recognition is local; the short spoken summary is produced by a quick Claude call (claude -p --model haiku).
Frequently asked questions
Can I use voice with Claude Code and Codex without any extra tool? Yes. Any dictation tool that types into the focused window works with a terminal agent, because the agent just receives text. A dedicated tool adds conveniences such as local recognition, a push-to-talk shortcut and spoken answers.
Is local Whisper accurate enough for programming? For describing tasks, yes: goals, constraints and file names come through well. Exact symbols and punctuation are its weak spot, so spell the identifiers that matter, read the transcript before sending, and paste literal code.
Does local speech recognition make my prompts private? It keeps your audio on your machine. The transcribed text still goes to whichever agent you send it to, exactly as typed text would, so the agent's own data policy still applies.


