Rawi — Read Aloud for Claude Code
Rawi reads Claude Code's replies aloud in VS Code, with dozens of OpenRouter speech models (ElevenLabs, Gemini, Speechify and more) on one API key. Free voices come first, and speech starts a second or two after Claude finishes. Kokoro, a free voice that runs on your computer, works offline with no account.
A 30-second demo, with sound: Rawi starts reading 1.8 s after Claude's reply appears.

It works with Claude Code in the VS Code panel and in a terminal, and it needs nothing installed besides the extension.
Rawi (Arabic راوي) is "the narrator": in classical Arabic poetry the rāwī memorized a poet's verses and recited them.
Why Rawi
- One key, many voices. OpenRouter carries speech models from ElevenLabs, Google, Speechify, Microsoft, MiniMax, xAI and others, and one OpenRouter key reaches all of them. Trying another provider's voice is a pick in a list, not a new account. Rawi loads the list live, puts the free models first, and doesn't use a paid one until you allow it.
- Speech starts in a second or two. Rawi fetches a reply's first sentence on its own and plays it while it is still arriving. Measured on a 13th-gen Core i5 laptop with Windows 11, from the reply being written to the first sound: 1.2 to 2 s with HeyGen's free voice on OpenRouter, and 0.6 to 2 s with Kokoro, which gets ready while Claude works. Both depend on the first sentence: a long one takes longer, and Kokoro needed about 2 s for one of 90 characters. A cloud voice's start also depends on its provider and your connection.

What it does

- Reads each reply when Claude finishes a turn: only the final answer, the text after Claude's last tool call.
- Or only when you ask: use the ▶ button in the status bar, click a reply in the Replies list (Rawi icon in the activity bar), or run Rawi: Read Last Reply, on a key of your choice.
- One voice across VS Code windows. The status-bar button shows the auto-read mode ("Rawi: auto", "Rawi: when away", "Rawi: manual") and what any window is reading ("Rawi 2/4 · other window"). Its controls work on that reading, and a reading you ask for takes over from another window's.
- Reads for the ear.
- Code blocks are announced ("TypeScript code, 12 lines"), not read out.
- File paths become file names ("player.ts, line 42").
- Links become their text, and tables are summarized.
- Emoji are dropped, and symbols and units are said as words.
- Starts fast. The first sentence is fetched on its own, and Rawi plays it while the voice is still sending it, so speech starts a second or two after Claude finishes. Kokoro gets ready while Claude works. The rest follows without gaps.
- Works offline. Kokoro runs on your computer, as the main voice or as the backup for OpenRouter. It has 28 English voices, American and British.
- Never silent. If the main voice fails, or the OpenRouter voice sends nothing for 3 s, a backup voice reads the rest of that reply: Kokoro, when you set it up as the backup, or else the system's own voice (Windows', macOS's, or eSpeak NG on Linux). The next reply tries the main voice again.
- Warns before a free voice ends. Free models come and go. Rawi warns three days before yours stops being free, and offers the model list.
- Keeps your settings. You choose the voice, model and speed (the pitch stays natural from 0.5× to 2×). Workspace settings give a project its own voice.
Install
- VS Code: open the Extensions view (
Ctrl+Shift+X), search for "Rawi" and click Install. It is also on the Visual Studio Marketplace, and code --install-extension znissou.rawi installs it from a terminal.
- Cursor, Windsurf, VSCodium and other editors built on VS Code: the same search in their Extensions view, which gets Rawi from Open VSX. Rawi is tested in VS Code only: if you use it in another editor, please say how it went in the issues.
- From a file: download
rawi-<version>.vsix from the releases, then run Extensions: Install from VSIX… from the Command Palette.
Getting started
Rawi needs one voice to start, and you can add the other later. The first time it starts without a voice, Rawi opens a Get Started walkthrough: choose a voice, pick the voice and the speed, choose when Rawi reads, then hear a sample reply. Rawi: Get Started opens it again at any time. Until a voice is set up, the Replies panel (Rawi icon in the activity bar) offers both too, with what each needs.

With OpenRouter (cloud voices):
- Create an API key at openrouter.ai/keys.
- Run Rawi: Set OpenRouter API Key. The key is kept in VS Code's secret storage, never in your settings.
OPENROUTER_API_KEY works too.
- That's it. The default voice is free:
heygen/heygen-voice-1-turbo:free, voice Nadine.
With Kokoro (on your computer, free, offline):
- Run Rawi: Set Up Local Voice (Kokoro), or click Download Kokoro in the Replies panel. Rawi downloads Kokoro once, after asking: its engine (81 MB) and its model (354 MB), each checked against a known checksum. If Read Aloud for Claude Code already put the model on your computer, Rawi uses that copy and only downloads the engine.
- With no OpenRouter key, Kokoro becomes the voice at once. With a key, choose As the Main Voice (Kokoro reads every reply) or As the Backup Voice (OpenRouter reads, and Kokoro takes over when OpenRouter fails or is slow).
Use Rawi: Choose Model… to switch between Kokoro and OpenRouter's speech models (free ones first; Kokoro stays in the list when you're offline), and Rawi: Choose Voice… to hear each voice as you move through the list.
Controls
|
Command |
Also |
| Read last reply |
Rawi: Read Last Reply |
the status bar when idle, or ▶ on a reply in the Replies list |
| Pause / resume |
Rawi: Pause or Resume |
the status bar while reading |
| Stop |
Rawi: Stop |
|
| Skip forward / back |
Rawi: Skip Forward, Rawi: Skip Back |
|
Reading also stops on its own when you send Claude a new prompt.
Keys: Rawi sets no keyboard shortcuts, so it never takes a key you already use. Ctrl+Alt, the usual choice, is the AltGr key on many keyboard layouts, where it types characters such as { or @. To give a command a key, open Keyboard Shortcuts (Ctrl+K Ctrl+S), search for "Rawi" and set one. In keybindings.json the commands are rawi.readLastReply, rawi.pauseResume, rawi.stop, rawi.skipForward and rawi.skipBack.
More in the Command Palette, under Rawi:
- Read Selection Aloud, also in the editor's context menu.
- Read Clipboard: copy any reply in Claude Code, then run it.
- Auto-Read (always, when away, off) and Mute for….
- Set Speed….
- Get Started (the walkthrough) and Read a Sample Reply.
Settings
All settings are under rawi.*. The main ones:
| Setting |
Default |
|
rawi.autoRead |
always |
always, whenAway (only while VS Code isn't focused), or off |
rawi.read.longReplies |
full |
firstParagraph, for short audio |
rawi.read.codeBlocks |
announce |
or skip, read |
rawi.speed |
1 |
0.5 to 2 |
rawi.engine |
openrouter |
the main voice: openrouter, or kokoro on this computer |
rawi.openrouter.allowPaid |
false |
paid models are refused until you allow them in your user settings; a project's workspace settings can't |
rawi.fallback |
systemVoice |
the backup voice when the main voice fails or is slow: systemVoice (the system's own voice), kokoro, or none |
rawi.fallbackAfter |
3 |
seconds to wait for OpenRouter before the backup voice reads; 0 means only when it fails. Kokoro is always waited for |
rawi.kokoro.voice |
af_heart |
Kokoro's voice (Heart, Read Aloud's voice) |
rawi.kokoro.threads |
4 |
CPU threads Kokoro uses |
rawi.kokoro.folder |
empty |
where Kokoro's two model files are; empty finds Read Aloud's copy or Rawi's own download |
rawi.scope |
workspace |
all follows every Claude Code session on the computer |
Costs and privacy
- Cost: free models and Kokoro cost nothing. Paid ones are only used once you allow them, and the model list shows what a typical reply would cost.
- What gets sent: with OpenRouter, the text Rawi reads goes to OpenRouter and the voice's provider. Code blocks aren't sent by default. With Kokoro, nothing leaves your computer.
- What gets downloaded: nothing until you set Kokoro up. Then its engine comes from the npm registry (ONNX Runtime and the phonemizer, as their authors published them) and its model from the kokoro-onnx release on GitHub.
- Kokoro's memory: about 0.6 GB once loaded, up to about 1 GB after long sentences. Rawi stops it after 10 minutes unused. When you send Claude a prompt, it loads Kokoro again in one window, if the reply will be read on its own.
- Cache: speech is cached on your computer (up to 100 MB), so replaying a reply costs no new request.
- Logs: they record lengths and timings, never reply text or keys.
Requirements
- VS Code 1.90 or later.
- Windows 10 or 11: tested on Windows 11, x64. Playback uses the system's own audio through a hidden PowerShell process.
- macOS and Linux: preview. The same package installs there. Automated checks on macOS (Arm) and Ubuntu (x64) download Kokoro, make speech with it, and make speech with the backup voice. Nobody has listened to Rawi on them yet: playback (
afplay on macOS; pw-play, paplay or aplay on Linux) is not covered by those checks. The backup voice is macOS's own, and eSpeak NG on Linux when it is installed (sudo apt install espeak-ng). If you try Rawi on either, please say how it went in the issues.
Credits
- Finding finished replies in Claude Code's session files follows Read Aloud for Claude Code (MIT).
- The local voice is Kokoro-82M by hexgrad (Apache-2.0), in the files of kokoro-onnx (MIT). Rawi's text-to-phoneme step is ported from kokoro-js (Apache-2.0) and uses eSpeak NG (GPL-3.0-or-later) through phonemizer. Kokoro runs on ONNX Runtime (MIT). The phonemizer and ONNX Runtime are not in Rawi's package: Rawi downloads them from the npm registry when you set Kokoro up.
- All third-party licences are in
THIRD-PARTY-NOTICES.md, which comes with the extension.
Rawi is an independent, unofficial project. It is not affiliated with or endorsed by Anthropic or OpenRouter.
| |