Guide

Read code and docs aloud in VS Code on Mac: what works and what doesn't

Developers spend their day reading in VS Code — READMEs, docs, Copilot chat answers, review comments — and the editor itself has no listen button. Microsoft's official Speech extension only covers Copilot Chat responses and dictation, not the file in front of you. The good news: everything in the editor and the integrated terminal is selectable text, so Mac speech and reader apps work fine, and Terminal can read a whole file with one command.

Updated 22 November 2026.

Short answerVS Code has no built-in read-aloud for editor content. Microsoft's official VS Code Speech extension adds text-to-speech, but it's scoped to Copilot Chat responses (plus dictation the other way) — it won't read the file you're editing. What does work on a Mac: select text in the editor or terminal and press Option-Esc (Speak Selection), or Control-Option-S in Aloud to read it with word-by-word highlight. For whole files, cat README.md | say or pbpaste | say in Terminal. Marketplace select-and-speak extensions exist too — some run on the Mac's own voices, some need cloud API keys.

What's worth listening to in VS Code (and what isn't)

VS Code holds two kinds of text. The listen-worthy kind is prose: Markdown files (READMEs, docs, changelogs, your own notes), AI chat answers in the Copilot or other chat panels, code comments and docstrings, commit messages you're drafting, and long error messages or log output you keep re-reading. The unlistenable kind is the code itself — a speech engine reads function ( args ) { literally, so you hear "open-paren," "open-brace" and every semicolon. Listening to a function read aloud rarely beats skimming it; listening to the three paragraphs of explanation around it often does.

Option-Esc: the fastest answer

  1. Turn on Speak Selection once: System Settings → Accessibility → Read & Speak (Spoken Content on older macOS) → Speak selection.
  2. In VS Code, select the prose you want — paragraphs in a Markdown file, a chat answer, a doc comment.
  3. Press Option-Esc. Your Mac reads the selection in its current voice.

This works in the editor, the integrated terminal, chat panels, and Markdown preview (it's HTML, so the text stays selectable). It doesn't work on text baked into images. Skip Command-A on a source file: it reads the code exactly as written — every brace and semicolon.

The official Speech extension — and its limit

Microsoft's VS Code Speech extension (publisher: Microsoft, id ms-vscode.vscode-speech) adds real text-to-speech and speech-to-text, processed locally on your Mac. But it's built for the chat surface: it can read Copilot Chat responses aloud and lets you dictate into chat and the editor. It offers no "read this file/selection" command, so for listening to docs it's not the answer — the built-in Option-Esc route or a reader app is.

Terminal one-liners for whole files

If you already live in the integrated terminal, macOS's say command reads any text you pipe it — no extension, no setup:

  • cat README.md | say — reads a whole file start to finish.
  • pbpaste | say — reads whatever's on the clipboard.
  • gh pr view 45 --comments | say — reads a GitHub thread without opening a browser.
  • cat long-doc.md | say -o notes.aiff — renders to an audio file instead of playing it.

The voice is your Mac's default, with no highlight or pause control — fine for a short file, clunky for a long one.

Marketplace extensions: what to expect

The Marketplace has several select-and-speak extensions that add a "Read Aloud" command for editor selections. Two honest caveats: the better-sounding ones route through cloud providers that need your own API key (OpenAI, ElevenLabs, Azure, Gemini), and the offline ones mostly wrap the same macOS say voice that Option-Esc already uses. An extension earns its install if you want in-editor controls (pause, seek, per-provider voices); if you just want prose read well, a dedicated reader app covers VS Code and every other app at once.

The traps that make VS Code sound wrong

  • Command-A on a source file — reads the syntax literally: braces, semicolons, indentation as dead air.
  • Diffs and patch views — +, - and @@ hunk markers are text and get spoken.
  • Chat answers with code blocks — an AI answer that mixes explanation and code reads the explanation fine, then turns into punctuation soup mid-way. Select the prose paragraphs instead.
  • Status bar and breadcrumbs aren't selectable — not a speech problem, but don't expect them read.
  • Screen reader mode is something else — VS Code's screen-reader-optimized mode plus VoiceOver is full spoken navigation for blind users, powerful but a different job than listening to a document end to end.

A read-aloud setup that covers VS Code and everything else

The pragmatic pattern: read code with your eyes, listen to the prose around it. With Aloud (ours, $19 once per Mac, macOS 14 or later):

  • Control-Option-S reads a selection in any app — the VS Code editor, the integrated terminal, a chat panel, your browser with the docs open.
  • Control-Option-O reads unselectable text — drag a screen area over text baked into an image, a diagram caption, or a remote-desktop window.
  • Export to .m4a — turn a spec or a long RFC into an audio file for the commute.
  • Word-by-word highlight with click-to-seek, 0.75x–2x speed, a sleep timer, and resume from the last sentence.
  • Natural voices: your Mac's Enhanced and Premium voices, the on-device Kokoro neural voice (Apple silicon, macOS 15+), or ElevenLabs (v4, v4 Turbo or v3) or Cartesia with your own API key.

Buy Aloud, $19 once   No subscription, no account.

Questions

Can VS Code read text aloud?

Not on its own — there is no built-in read-aloud command for editor content. Microsoft's official VS Code Speech extension adds text-to-speech but only for Copilot Chat responses (it also does dictation). To hear what's in the editor on a Mac, select the text and press Option-Esc (Speak Selection), use a select-and-speak Marketplace extension, or a reader app like Aloud (Control-Option-S).

How do I make VS Code read a file aloud on Mac?

For a whole file, the Terminal is fastest: cat README.md | say reads it in your Mac's voice, and cat file.md | say -o out.aiff renders it to an audio file. For part of a file, select the paragraphs and press Option-Esc with Speak Selection enabled, or use a reader app's selection shortcut. Stick to prose — code read literally sounds like punctuation soup.

Is there a read-aloud extension for VS Code?

Yes — several Marketplace extensions add a "Read Aloud" command for selected text. Check two things before installing: whether it uses free offline voices (usually wrapping the Mac's own say command) or a cloud provider that needs your API key, and whether it works on macOS — some are Windows-first. Microsoft's official Speech extension is the exception: it's polished but only reads Copilot Chat answers.

Why does VS Code read-aloud sound like gibberish?

You selected code. Speech engines read syntax literally — braces, brackets, semicolons, plus/minus in diffs — which comes out as punctuation soup. Read-aloud works on prose: Markdown files, comments, chat answers, error messages. Select the paragraphs and skip the code blocks.

More Mac utilities from the developer: SnapState puts your Mac windows, apps and browser tabs back after sleep or a monitor reconnect. $9.99 one-time.