Guides

How to use voice to text in VS Code on a Mac

VS Code has voice to text built in. Press Option + Command + V and talk. This guide shows how to dictate comments, commit messages and Copilot prompts on a Mac.

VS Code has voice to text built in. You press Option + Command + V, talk, and VS Code types your words where your cursor is. You don't need an extension on a Mac with Apple silicon.

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 I use speech to text in VS Code?

Yes. VS Code has dictation built in, made by Microsoft. It is on by default.

On a Mac, check two things first:

  • Your Mac has Apple silicon. On a Mac with an Intel chip, the built-in dictation isn't available. Our guide on how to check if your Mac has Apple silicon shows how to check.
  • AI features are on in VS Code. The built-in dictation only works when they are.

The first time you dictate, VS Code downloads a speech model. After that, it turns your speech into text on your Mac.

You can dictate in five places:

  • The editor, for comments, docs and Markdown files
  • The Source Control box, for commit messages
  • Pull request comments, for code reviews
  • The chat, for prompts to Copilot
  • The terminal, for commands

How to dictate in VS Code?

Press Option + Command + V and talk. VS Code types what you say at your cursor.

Time needed About 1 minute.

  1. Click where you want the text to go.
  2. Press Option + Command + V. Or press Shift + Command + P to open the Command Palette, type "voice", and choose Voice: Start Dictation in Editor.
  3. The first time, your Mac asks if VS Code can use the microphone. Click Allow.
  4. Talk. A small microphone appears at your cursor while VS Code listens.
  5. To stop, click the microphone at your cursor, or choose Voice: Stop Dictation in Editor in the Command Palette.

You can also hold the shortcut. If you hold Option + Command + V, VS Code listens until you let go of the keys.

To dictate a commit message:

  1. Open Source Control in the bar on the left, or press Control + Shift + G.
  2. Click in the message box above the Commit button.
  3. Press Option + Command + V and say what you changed and why.
  4. Click the microphone to stop. Read the message, and commit.

Dictation works the same way in pull request comments.

Each dictation stops by itself after 20 minutes, and keeps the text it typed. Press Option + Command + V to start again.

Dictation is good for comments and prose. For code itself, type it. Our guide on how to code by voice on a Mac explains why, and shows the commands for symbols.

How do I use voice with Copilot chat in VS Code?

Press Command + I in the chat box to dictate a prompt, or turn on Voice Mode to talk with the agent out loud. Dictation types your words into the chat, and doesn't send the prompt until you do.

To dictate a prompt:

  1. Open the chat in VS Code.
  2. Press Command + I, or click the microphone.
  3. Talk. Say what is broken, what you already tried, and what Copilot must not change.
  4. Press Command + I again to stop, or press Escape to cancel.
  5. Read the prompt, and send it.

VS Code also has Voice Mode, an experimental spoken conversation with an agent. You talk, and it reads its answers aloud and listens for your next question. To try it, turn on the setting agents.voice.enabled, then press Shift + Command + Space. Shift + Command + M mutes your microphone.

How do I use voice in the VS Code terminal?

Open the Command Palette and choose Voice: Start Dictation in Terminal. VS Code's documentation lists no shortcut for it.

  1. Click in the terminal panel.
  2. Press Shift + Command + P, type "dictation in terminal", and choose Voice: Start Dictation in Terminal.
  3. Say the command.
  4. Read it before you press Return.

In the terminal, VS Code changes what you say to fit a command line. It removes ordinary punctuation, turns spoken symbol names into symbols, and changes the capital letter at the start.

Terminal dictation keeps listening until you stop it. To stop it after a silence instead, set accessibility.voice.speechTimeout to a number above zero.

Do I need the VS Code Speech extension?

Not on a Mac with Apple silicon. VS Code's dictation is built in there. Microsoft's VS Code Speech extension is for computers where the built-in dictation isn't available, like Macs with an Intel chip.

The extension also adds voice chat, reading chat answers aloud, and "Hey Code", which starts voice chat when you say those words.

Does VS Code speech work with Claude Code?

The Claude Code extension has its own dictation. Click in the Claude prompt box and press Command + D, or click its microphone button.

It needs you to be signed in to Claude Code with a Claude account. If you haven't set a language in Claude Code, it uses VS Code's speech language, the accessibility.voice.speechLanguage setting. Our guide to voice input in Claude Code covers the extension and the terminal.

If you use Cursor or Codex instead, see our guides to voice input in Cursor and voice input in Codex.

Why is VS Code speech not working?

The most common reason is that AI features are off. VS Code's dictation only works when they are on.

Try these fixes in order:

  1. Check that AI features are turned on in VS Code's settings.
  2. Check that the setting dictation.enabled is on.
  3. Open System Settings, click Privacy & Security, then click Microphone. Find Visual Studio Code in the list and turn it on. Quit VS Code with Command + Q and open it again.
  4. Open System Settings, click Sound, then Input. Check that the right microphone is selected and that the input level moves when you talk.
  5. Check your chip. On a Mac with an Intel chip, install the VS Code Speech extension instead.

If you dictate for long stretches because typing hurts, our guide on voice typing for RSI shows how to set up the rest of your Mac too.

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. Inside VS Code, its own dictation 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.

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 VS Code, Roar leaves the names in your code exactly as you said them.

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.