GUIDE

Text to speech for Codex, Cursor and VS Code

Coding agents work for minutes at a time, and a spoken alert tells you when they are done without watching the screen. Some editors can also read answers aloud.

This guide covers VS Code, Codex CLI and Cursor, with a free offline voice made by the SuperClonica engine.

Make the voice once

Install the free engine (python -m pip install superclonica-cpu) and make a short clip in any of about 190 voices: superclonica --text "Done!" --voice F2 --lang en --output done.wav. Put it in a sounds folder in your home directory. The examples below play it with afplay on macOS; on Linux use paplay, and on Windows a small script that plays the WAV file.

VS Code: read chat answers aloud

With the VS Code Speech extension, each chat response has a speaker icon that reads it aloud, and Escape stops it. The setting accessibility.voice.autoSynthesize (off by default) reads replies automatically when you asked by voice. Newer versions also have an experimental Voice Mode (agents.voice.enabled) that reads agent responses and listens for follow-ups.

Codex CLI: a sound when a turn ends

Codex runs the program named by notify in ~/.codex/config.toml when a turn completes; the setting is ignored in a project’s own config. Codex adds one JSON argument, so call the player through a shell: notify = ["sh", "-c", "afplay $HOME/sounds/done.wav", "codex"]. The JSON includes last-assistant-message, so a small script can also voice the answer itself with the engine and play it.

Cursor: a stop hook

Cursor reads hooks from ~/.cursor/hooks.json (or .cursor/hooks.json in a project). The stop event fires when the agent finishes, with a status of completed, aborted or error on standard input: {"version": 1, "hooks": {"stop": [{"command": "afplay ~/sounds/done.wav"}]}}. A script can check the status and play a different clip for an error.

Voice text on request with MCP

To have an agent voice text in a character or narrator voice when you ask, connect the SuperClonica MCP server at https://superclonica.com/mcp with a free API key. It works in VS Code, Cursor and Claude Code and returns a link to the audio file.