Guides

How to use voice input in Claude Code on a Mac

Claude Code has voice input built in. Type /voice, hold the Space bar and talk. This guide shows how to set it up on a Mac, in the terminal and in VS Code.

Claude Code has voice input built in. You turn it on once, and then you hold a key and talk instead of typing your prompt.

We have built Roar, a dictation app that is light years ahead of Apple Dictation. There's a link to try Roar for free at the end of this article.

Can Claude Code take voice input?

Yes. Claude Code has voice dictation built in, and you switch it on with the /voice command. It types what you say into the prompt, so you can mix talking and typing in the same message.

Before you start, check three things:

  • You sign in with a Claude account. Voice dictation only works when you sign in to Claude Code with your Claude account. It doesn't work when Claude Code uses an API key, Amazon Bedrock, or another cloud provider.
  • The microphone is on your Mac. Voice dictation doesn't work over SSH or in cloud sessions, because the microphone has to be on the same computer as Claude Code.
  • You are online. Your recording is sent to Claude's servers to be turned into text. It isn't processed on your Mac.

Dictation doesn't use your Claude messages or tokens, and it doesn't count toward your usage limits.

Claude Code is tuned for coding words. It knows terms like regex, OAuth, JSON and localhost, and it uses your project name and your git branch name as hints.

How do I turn on voice mode in Claude Code?

Type /voice in Claude Code and press Return. Claude Code calls this voice mode, but it is dictation: you talk, and Claude Code types. It doesn't talk back.

Time needed About 1 minute.

  1. Open Terminal, or the terminal app you use, and start Claude Code.
  2. Type /voice and press Return.
  3. The first time, your Mac asks if your terminal app can use the microphone. Click Allow.
  4. Claude Code shows a line like this one:
Turned on voice mode (hold). Hold space to record. Dictation language: en (/config to change).

Voice mode stays on in every new session until you turn it off. You can choose how the key works:

Type thisWhat it does
/voiceTurns voice mode on or off, and keeps the mode you had
/voice holdHold mode: you hold the key while you talk. This is the default.
/voice tapTap mode: you tap the key once to start, and once more to stop and send
/voice offTurns voice mode off

How do I talk to Claude Code with voice?

Hold the Space bar, talk, and let go. Your words appear in the prompt while you speak, and they turn solid when Claude Code finishes the text.

  1. Click in your terminal window, so the Claude Code prompt is active.
  2. Hold the Space bar. At the bottom, Claude Code shows "keep holding…" for a moment, then "listening…".
  3. Talk. Say what is broken, what you already tried, and what Claude must not change.
  4. Let go of the Space bar.
  5. Read the prompt. Fix anything with the keyboard, or hold the Space bar again to add more.
  6. Press Return to send it.

There is a short wait before recording starts, because Claude Code has to see that you are holding the key and not just typing a space. A quick tap of the Space bar still types a space.

To cancel a recording, press Escape or Control + C. Claude Code throws away what you said and puts the prompt back the way it was.

In tap mode it works a little differently:

  1. With the prompt empty, tap the Space bar once. Claude Code shows "REC · tap to send".
  2. Talk. You don't have to hold anything.
  3. Tap the Space bar again. Claude Code types your words and sends the prompt.

Tap mode only sends the prompt when you said at least three words, so a tap by mistake doesn't send a stray word. A recording also stops by itself after 15 seconds of silence, or after two minutes.

If the Space bar doesn't suit you, you can move dictation to another key. Add this to the file ~/.claude/keybindings.json to use Option + K instead:

{
  "bindings": [
    {
      "context": "Chat",
      "bindings": {
        "meta+k": "voice:pushToTalk"
      }
    }
  ]
}

A key with Option or Control starts recording on the first press, with no wait. In this file, meta means the Option key on a Mac. Don't use a single letter key in hold mode, because the letter types into the prompt while you hold it.

How do I use Claude Code voice input in VS Code?

In the Claude Code extension for VS Code, click in the Claude prompt box and press Command + D. You can also click the microphone button in the prompt box.

  1. Open the Claude Code panel in VS Code.
  2. Click in the prompt box, so Claude has the focus. Command + D only works while it does.
  3. Press Command + D, or click the microphone button, and talk.
  4. Press Command + D again to stop. Read the prompt, and send it.

The extension needs the same Claude account sign-in as the terminal. It has two limits: a recording stops after 15 seconds without any words, and after two minutes in total. The words you already said stay in the prompt box, so click the microphone again to add more.

Voice dictation doesn't work in VS Code Remote sessions, like SSH, Dev Containers and Codespaces, because the extension runs on the other computer and the microphone is on your Mac.

Why is Claude Code voice mode not available?

The most common reason is the sign-in. Voice mode only works when you are signed in with a Claude account. If an API key is set, Claude Code uses it first and hides /voice.

What you seeWhat to do
Unknown command: /voice

Type /login and sign in with your Claude account. If ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN is set in your shell, remove it and restart Claude Code.

Voice mode requires a Claude.ai accountType /login and sign in again.
Voice mode is disabled by your organization's policyYour company has turned voice off. Ask your administrator.
Microphone access is denied

Open System Settings, click Privacy & Security, then Microphone, and turn on your terminal app. Then type /voice again.

Nothing happens when you hold the Space bar

If spaces keep appearing, voice mode is off: type /voice hold. If only one or two spaces appear, key repeat may be off on your Mac. Type /voice tap to use tap mode instead.

No audio detected from microphone

Open System Settings, click Sound, then Input, and choose the right microphone. Check that its input level isn't at zero.

No speech detected

Speak closer to the microphone, and check that your dictation language matches the language you speak.

If your terminal app isn't in the Microphone list, there is no switch to turn on. Reset the permission so your Mac asks again:

  1. In your terminal, type tccutil reset Microphone com.apple.Terminal and press Return. For iTerm2, use com.googlecode.iterm2 instead of com.apple.Terminal.
  2. Quit the terminal app with Command + Q. Closing the window isn't enough.
  3. Open the terminal again, start Claude Code, and type /voice. Click Allow when your Mac asks.

How do I change the dictation language in Claude Code?

Type /config and change the language setting. Claude Code uses the same setting for the language you dictate in and the language Claude answers in. If it is empty, dictation is in English.

Claude Code dictation supports 20 languages, including Spanish, French, German, Japanese and Korean. If you choose a language it doesn't support, /voice warns you and uses English for dictation.

When should you pay for a dictation app?

For simple, short text, like a text message, a web search or a quick reply, Apple Dictation works fine in most cases. For prompts inside Claude Code, its own voice input is a good start.

A paid app makes sense if you write for hours every day, and if you don't want to fix the dictation errors that Apple Dictation makes. You probably also write outside Claude Code: in pull requests, code reviews, tickets and Slack. Our guide on how to code by voice on a Mac covers those too, and our guide on how to dictate into ChatGPT and Claude on a Mac covers the Claude app.

We've built Roar, the best way to write with your voice. Roar cleans up and formats text based on where you're writing to retain your exact meaning. Think of how emails, LinkedIn posts and AI prompts all need to be formatted differently. It keeps your exact words, to the best extent possible. In Terminal and iTerm2, Roar adds no punctuation you did not say, and nothing runs until you press Return.

Roar keeps no recordings of your voice and no transcripts on our servers. It does not use your data to train AI models. Roar works on Macs with macOS 14 Sonoma or later and Apple silicon (M1 or newer).

Your first 5 dictations on Roar are free. You can read how Roar works for developers or download Roar for Mac.

Roar

Download Roar. Your first five dictations are on us.

Press a key and talk. Everything you dictate is formatted cleanly, punctuated correctly, spelled perfectly, and appears wherever your cursor is.

Get Roar for Mac

Download Roar for Mac. Requires macOS 14 Sonoma or later and Apple silicon (M1 or newer).

First five dictations are free, no credit card needed.