---
title: "Voice coding on a Mac in 2026: commands, or prompts to an AI agent"
description: "The two ways to code by voice on a Mac: speaking code and commands with Talon or Voice Control, or talking to an AI coding agent in Cursor, VS Code, Xcode or the terminal. What each needs, where each fails, and how to set up dictation for technical words."
url: "https://speechbee.app/guides/voice-coding-mac"
---

# Voice coding on a Mac

Voice coding used to mean saying symbols out loud: open paren, camel case, next line. Since AI coding agents arrived, a lot of it means something easier: you describe the change and the agent writes the code. Both still exist, and they suit different people. Here is how each works on a Mac.

By the SpeechBee team, who make SpeechBee. Checked on 15 October 2026.

> ### The short version
>
> - **To write and edit code entirely by voice,** with no keyboard, use a command system: Talon, or Voice Control built into macOS. It takes practice.
> - **To talk to an AI coding agent,** any dictation that types at the cursor works: in Cursor, VS Code, Xcode, a browser or the terminal. This needs no training.
> - **For technical words,** add your function names, libraries and project terms to a dictionary once.

## Two kinds of voice coding

| | Commands (Talon, Voice Control) | Prompts to an AI agent |
|---|---|---|
| What you say | Code, symbols, editor commands | What you want changed, in plain words |
| Hands-free | Yes, fully | No, you still review, click and send |
| Learning curve | Weeks | Minutes |
| Good for | Repetitive strain, no keyboard at all | Speed, longer and clearer prompts |
| Tools | Talon, macOS Voice Control | Any dictation that types at the cursor |

Many people end up using both: the agent for the bulk of the change, a keyboard or command tool for the precise edits.

## Coding with voice commands

**Talon** is the tool most people who code entirely by voice use. It runs on macOS, Windows and Linux, combines commands with dictation, lets you write your own commands in small script files, and can control the pointer with eye tracking on supported hardware. Plan on real time to learn it.

**Voice Control** is built into macOS. Turn it on in **System Settings**, **Accessibility**, **Voice Control**. It clicks, scrolls, opens apps and edits text by voice, and you can add custom words and commands. It is general-purpose, so code symbols take effort, but it costs nothing.

If typing hurts and you need to drive the whole Mac by voice, start here. Our guide on [dictation when your hands hurt](https://speechbee.app/guides/dictation-for-hand-pain) covers the hybrid approach.

## Talking to an AI coding agent

When an agent writes the code, your job is to explain the change, and explaining is what speech is good at. A spoken prompt is usually longer and carries more context than a typed one, because talking is cheaper than typing.

Where it works on a Mac:

- **Cursor:** the Agent chat has its own microphone, or dictate straight into the chat box. See [voice prompts in Cursor](https://speechbee.app/guides/voice-prompts-cursor-mac).
- **VS Code:** built-in dictation with Option-Command-V for the editor and Copilot chat. See [dictation in VS Code](https://speechbee.app/guides/dictation-in-vs-code-mac).
- **Xcode:** there is no microphone button, but Apple Dictation and any dictation app type into the editor and into the coding assistant's chat, because both are text fields.
- **The terminal:** command-line coding agents take text input, so dictation that types at the cursor works there too.
- **ChatGPT and Claude in the browser:** see [talking to ChatGPT on a Mac](https://speechbee.app/guides/voice-to-chatgpt-mac).

### One dictation key for all of them

SpeechBee, which we make, gives you the same key in every one of those places. Hold the right ⌘ key, describe the change, let go, and the prompt appears at the cursor. It transcribes on your Mac, so your code and your client's project names never leave it.

Three things make it better for code than plain dictation:

- **A dictionary.** Add `useEffect`, `kubectl` or your service names once and they come out right every time.
- **The Prompt for AI writing mode.** It turns a spoken ramble into a structured prompt, goal first, then context and constraints. Set it per app so Cursor and Xcode get it automatically. It runs on your Mac with Apple Intelligence on macOS 26.
- **Snippets.** Say "test command" and get your full test invocation.

It does not run commands, press Enter for you, or control the editor. It types; you review and send.

## Tips for spoken prompts

- **Goal first:** "Make the export work offline. Right now it calls the API on every click."
- **Name the file and the function.** Then the agent starts in the right place.
- **Say what must not change.** "Don't touch the public API" is easy to say and easy to forget to type.
- **Read before you send.** A misheard file name sends the agent somewhere else.

## Questions

### Can you code by voice on a Mac?

Yes. To write code itself by voice, use Talon or macOS Voice Control. To have an AI agent write it, dictate your request into Cursor, VS Code, Xcode or the terminal with any dictation tool.

### What is the best voice coding software for Mac?

For fully hands-free coding, Talon. For prompting AI coding agents, a dictation app with a custom dictionary, so technical terms come out right, and a shortcut that works in every app.

### Does Xcode have voice input?

Xcode has no dedicated microphone button. Apple Dictation and dictation apps such as SpeechBee type into the Xcode editor and its chat like any text field.

### Is my code sent anywhere when I dictate?

With SpeechBee, no. It transcribes on your Mac. Whatever you then send to an AI coding agent goes to that agent's provider, as it would if you typed it.

## Keep reading

- [Dictation for developers](https://speechbee.app/guides/dictation-for-developers)
- [Voice prompts in Cursor](https://speechbee.app/guides/voice-prompts-cursor-mac)
- [Dictate in VS Code on a Mac](https://speechbee.app/guides/dictation-in-vs-code-mac)
- [AI dictation on a Mac](https://speechbee.app/guides/ai-dictation-mac)

## More on dictation

- [Every dictation guide and comparison](https://speechbee.app/guides/voice-typing-mac)
- [Google Docs voice typing](https://speechbee.app/guides/voice-typing-google-docs)
- [Voice typing on iPhone keyboards](https://speechbee.app/guides/voice-typing-iphone-keyboard)
- [Writing Tools vs dictation cleanup](https://speechbee.app/compare/apple-intelligence-writing-tools-vs-dictation)
- [OpenWhispr alternatives](https://speechbee.app/compare/openwhispr-alternatives)
- [Willow alternatives](https://speechbee.app/compare/willow-alternatives)
- [Every read-aloud guide and comparison](https://speechbee.app/guides/read-text-aloud)

## Sources

- [Talon](https://talonvoice.com/)
- [Apple: Use Voice Control commands on Mac](https://support.apple.com/guide/mac-help/use-voice-control-commands-mh40719/mac)
- [VS Code: voice and dictation](https://code.visualstudio.com/docs/configure/accessibility/voice)
- SpeechBee facts from our [homepage](https://speechbee.app/) and [privacy policy](https://speechbee.app/privacy)