Retext

How to Use Voice with Claude Code, Codex and Cursor

Claude Code has built-in voice dictation: run /voice, then hold Space and talk. Cursor has a dictation button in its agent chat, plus a voice chat mode. Codex has a /voice conversation mode in CLI builds that support it, and voice chat and dictation in the ChatGPT desktop app. These built-in options only work inside their own tool. If you want one way to talk that works in every terminal, editor and chat box, use a system-wide dictation app like macOS Dictation or Retext.

Steps checked November 9, 2026.

Why speak your prompts

Coding agents do better with context: what you're trying to do, what you already tried, which files matter and what done looks like. That's a lot to type, so most people cut it short. Saying it out loud takes less effort, so the prompt tends to come out longer and more complete.

Speech can also be faster. A Stanford study found that speaking was about three times faster than typing on a phone keyboard, with fewer errors. A good typist on a full keyboard closes some of that gap, but explaining a bug out loud is still quicker than writing it up.

  • Talk through the problem the way you'd explain it to a colleague.
  • Name the files, functions and error messages you're looking at.
  • Say what you want back: a plan first, a diff, or a test that fails.

Claude Code: turn on /voice

Claude Code has voice dictation built into the CLI. It types what you say into the prompt, so you can mix talking and typing in one message. It's dictation, not a spoken conversation: Claude still answers in text.

  1. Sign in with a Claude.ai account. Run /login if you need to.
  2. Run /voice. Claude Code checks your microphone, and on a Mac, macOS asks to give your terminal microphone access. Allow it.
  3. Hold Space and talk. After a short warmup the footer shows listening… and your words appear in the prompt.
  4. Let go of Space. The text stays in the prompt, so you can edit it.
  5. Press Enter to send.

Run /voice tap to switch to tap mode: tap Space to start, talk, and tap Space again to send. In tap mode, recording stops after 15 seconds of silence or two minutes in total.

Press Esc to cancel a recording and put the prompt back the way it was.

Dictation is tuned for coding words like regex, OAuth and JSON, and it uses your project and git branch names as hints. To change the language, set it in /config.

To use a different key, bind voice:pushToTalk in ~/.claude/keybindings.json. A modifier combo like meta+k starts recording with no warmup.

The Claude Code extension for VS Code has voice dictation too.

Claude Code streams your audio to Anthropic's servers to transcribe it. /voice doesn't work with an Anthropic API key, Amazon Bedrock or other cloud providers, in SSH sessions, or in Claude Code on the web. Transcription doesn't count toward your usage limits.

Codex: /voice and the ChatGPT desktop app

Codex's voice options depend on where you run it, and they've changed several times this year.

  • Codex CLI: in builds and sessions that support voice, /voice or F8 starts or stops a spoken conversation with Codex. /voice mute turns your microphone on or off, /voice stop ends the conversation, and /voice settings picks the voice Codex answers with. It's a back-and-forth conversation, not dictation into the prompt.
  • ChatGPT desktop app: Codex lives in the ChatGPT desktop app, which has ChatGPT Voice. Select Start voice chat in a task, or Start new voice chat for a new one. You can set a hotkey in Settings > Voice > Voice chat hotkey. The app also has voice dictation, which turns your speech into prompt text before you send it.

ChatGPT Voice needs a Plus, Pro, Business, Edu or Enterprise plan, and it's still rolling out, so you may not see it yet. Only one voice chat can run at a time. On a Mac it can take an image of your front window for context, so close anything sensitive first.

If you want to talk a prompt into the Codex CLI and read it before you send it, use a system-wide dictation app. The steps are below.

Cursor: dictation and voice chat

Cursor has two separate voice features in its agent chat. Dictation types what you say into the chat box. Voice chat is a spoken conversation where the agent answers out loud and hands the work to the coding agent.

  1. Click into the agent chat.
  2. To dictate, click the microphone button (Voice Input in the editor, Start voice input in the Agents Window). In the editor you can press Cmd-Shift-Space instead. In the Agents Window, hold Ctrl-M and talk.
  3. Read the text, fix anything that's wrong, and send it.
  4. To talk with the agent instead, click the waveform button, Start voice chat. It shows where Send is when the agent is idle and the box is empty.

Voice chat needs a signed-in Cursor account; sessions that use an API key can't start it. It hangs up after about 10 minutes of silence while the agent has nothing running, and there's a daily limit on calls. With Privacy Mode on, voice chat runs with zero data retention.

Cursor's voice tools only work in the agent chat. For code comments, commit messages or the built-in terminal, use a system-wide dictation app.

Dictating long prompts with a system-wide app

A system-wide dictation app types wherever your cursor is: Terminal, iTerm2, Cursor, VS Code, a GitHub issue or a Slack thread. You learn one key and it works in every coding tool, including ones with no voice mode.

With macOS Dictation, which is free and built in:

  1. Open System Settings > Keyboard, go to Dictation and turn it on.
  2. Pick a shortcut from the Shortcut pop-up menu, such as pressing Fn twice.
  3. Click into the terminal or editor where the prompt goes, press the shortcut and talk.
  4. Press Esc or the shortcut again to stop. Dictation also stops after 30 seconds without speech.

Our guide to Mac dictation covers the commands and what to do when it stops working.

With Retext, hold the right Option key, talk, and let go. Retext types what you said at your cursor in any app and puts your clipboard back the way it was. For a long prompt, double-tap right Option (or right Shift, set in Settings) for hands-free (beta): each time you pause, what you said is typed, and Esc stops it. Hands-free pauses itself in password fields.

With the Local engine, the default, Retext transcribes with Apple's on-device speech engine, so your audio never leaves your Mac. Polish (beta) runs on your Mac too, and you can pick a mode per app. Set your terminal and editor to Verbatim so file names and flags come through exactly as you said them. Dictation needs macOS 26 and an Apple silicon Mac.

Retext is also a text expander. Save prompt chunks you reuse, like your house rules or a review checklist, as snippets, then type ;trigger or say "insert snippet" and its name (a beta voice command) to drop one in. With per-app snippets, you can limit coding snippets to your terminal and editor.

Tips for dictating code prompts

  • Say file and function names the way they're written: "the parse config function in config dot ts." Then check the prompt and fix the spelling before you send it.
  • Spell symbols and flags you need exactly, or type them. Dictation is good at sentences and bad at --no-verify.
  • Paste error messages and stack traces instead of reading them out.
  • Review before you press Enter. In Claude Code, keep the default hold mode if you want to read every prompt; tap mode sends on its own.
  • Start with the goal, then the context, then the constraint: "Add retry to the upload client. It fails on timeouts from S3. Don't change the public API."
  • Keep the parts you say every time as snippets, and use prompt templates for Claude Code or the coding prompt templates as a starting point.

Built-in voice vs system-wide dictation

Voice options for coding tools, checked November 2026
ToolBuilt-in voiceHow to startNotes
Claude Code (CLI)Dictation/voice, then hold SpaceNeeds a Claude.ai account. Audio goes to Anthropic. Not over SSH or with an API key.
Codex CLIVoice conversation/voice or F8Only in builds and sessions that support voice. Spoken back-and-forth, not dictation.
Codex in the ChatGPT appVoice chat and dictationStart voice chat, or a hotkey set in Settings > VoiceVoice chat needs a paid ChatGPT plan and is still rolling out.
CursorDictation and voice chatMicrophone button, Cmd-Shift-Space, or hold Ctrl-M in the Agents WindowAgent chat only. Voice chat needs a signed-in account and has a daily limit.
macOS DictationWorks in any appYour Dictation shortcut, such as Fn twiceFree and built in. Stops after 30 seconds of silence.
RetextWorks in any appHold right Option, or double-tap it for hands-free (beta)On-device with the Local engine. Snippets and "insert snippet" (beta) in the same app. macOS 26, Apple silicon.

Frequently Asked Questions

Does Claude Code have a voice mode?

Yes. Run /voice in the Claude Code CLI, then hold Space and talk. Your words are typed into the prompt and you press Enter to send. It needs a Claude.ai sign-in and a local microphone, and it sends your audio to Anthropic to transcribe. It doesn't speak back; Claude answers in text.

Why does Claude Code say "Unknown command: /voice"?

/voice only shows up when you're signed in with a Claude.ai account. If you use an Anthropic API key, an auth token or a cloud provider like Amazon Bedrock, that takes precedence. Remove it, restart Claude Code and run /login. Or use a system-wide dictation app, which works no matter how you sign in.

Can I dictate into the Codex CLI?

Codex CLI's /voice starts a spoken conversation, and only in builds that support it. To speak a prompt into the terminal and read it before you send it, use macOS Dictation or a dictation app like Retext, which types into the terminal like a keyboard.

How do I use voice in Cursor?

Click the microphone button in the agent chat, or press Cmd-Shift-Space in the editor, and talk. Your words go into the chat box for you to send. The waveform button starts voice chat instead, where the agent talks back.

Is it private to dictate code?

Claude Code sends your audio to Anthropic's servers to transcribe it. Cursor's voice chat runs with zero data retention when Privacy Mode is on. Check each tool's privacy settings before you dictate anything sensitive. macOS Dictation can run on your Mac; check the line under Dictation in Keyboard settings. With the Local engine, Retext transcribes with Apple's on-device engine, so your audio stays on your Mac.

Will dictation get code syntax right?

Not reliably. Dictation is good for describing what you want in plain words, which is what coding agents need. Type or paste exact syntax, flags and error messages, and check names before you send the prompt.

Ready to try Retext?

Get started with text expansion. Free to try with up to 5 snippets. Upgrade to Pro for unlimited snippets and AI-generated content.

Related

Sources