Skip to content
punt-labsPublic

About

Speech for Claude Code and friends: Text-to-speech CLI, MCP server, and Claude Code plugin (ElevenLabs, AWS Polly, OpenAI)

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

1,038 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vox

Voice and audio for your AI coding assistant.

License CI PyPI Python Working Backwards

vox adds text-to-speech (TTS) and background music to Claude Code and to your own scripts. It speaks when a task finishes, hits an error, or needs approval, with a voice you choose and a mood (the "vibe") that sets ElevenLabs expressive tags. It works with five TTS providers and falls back to the operating system's voice (say on macOS, espeak-ng on Linux) with no setup. It can also generate instrumental background music in a genre you describe.

Platforms: macOS, Linux

Quick Start

curl -fsSL https://raw.githubusercontent.com/punt-labs/vox/b737c24/install.sh | sh

Restart Claude Code, then turn vox on for the current repository:

/vox enable

Ask for a spoken summary of what just happened:

/vox:recap

CLI-Only Install (No Claude Code Plugin)

This installs the vox command without the Claude Code plugin, for use with another coding assistant (Codex, Cursor), a plain terminal, or a Claude Code setup where plugins are blocked. The command, the audio daemon, its directories and sample content still install; only the marketplace and plugin steps are skipped. Turn a repository on with vox enable.

Pass the flag:

curl -fsSL https://raw.githubusercontent.com/punt-labs/vox/b737c24/install.sh | sh -s -- --no-plugin

Or set the environment variable, for places where passing arguments is awkward (CI templates, proxies):

curl -fsSL https://raw.githubusercontent.com/punt-labs/vox/b737c24/install.sh | VOX_NO_PLUGIN=1 sh

VOX_NO_PLUGIN skips the plugin only when set to exactly 1; any other value is ignored. The installer also skips the plugin when claude or git is not installed.

Manual install (if you already have uv)
uv tool install punt-vox
vox install
vox doctor
Verify before running
curl -fsSL https://raw.githubusercontent.com/punt-labs/vox/b737c24/install.sh -o install.sh
shasum -a 256 install.sh
cat install.sh
sh install.sh

Features

  • Spoken notifications --- a spoken summary when a task finishes, a chime when Claude needs input
  • Session vibe --- /vibe sets a mood that changes how ElevenLabs voices speak; see Set the Vibe
  • Five providers --- ElevenLabs, OpenAI, AWS Polly, macOS say, and Linux espeak-ng; see Providers
  • Off by default --- hooks are silent and mic MCP tools stay dormant in a repository until you run /vox enable (or vox enable) there; explicit CLI commands like vox say still run
  • Voice or chime --- /mute switches to two notification tones and makes no TTS API calls
  • Optional for Claude Code --- Claude Code runs normally when vox is not installed
  • Claude Code plugin --- slash commands, hooks, and an MCP server named mic
  • Audio daemon --- voxd plays one sound at a time, drops identical requests from several sessions, and caches results
  • Background music --- /music on generates up to 12 instrumental tracks with the ElevenLabs Music API; see Background Music
  • Music Player (lux) --- a clickable album list and play controls in the lux display; see Music Player
  • Control Panel (lux) --- a lux menu entry for notification and voice settings; see Control Panel
  • Voice calls --- talk to Vox and delegate coding to persistent workers; see Vox Call

What It Looks Like

Hear It

Real samples generated by vox with ElevenLabs v3. The first three are the same recap with different /vibe moods: the expressive tags change how the voice sounds without changing the words.

Sample Vibe Voice
Task recap neutral sarah listen
Same recap [excited] sarah listen
Same recap [weary] [sighs] sarah listen
Task complete neutral matilda listen

Enable Notifications

> /vox enable

Vox enabled. You'll hear when tasks finish or need approval.
Pick a voice with /vox:voice.

/vox enable defaults to personal scope (--scope local, gitignored CLAUDE.local.md and .claude/settings.local.json, automatically adding local ignore rules to .git/info/exclude if the repo does not ignore them yet). Pass /vox enable project (or vox enable --scope project) to enable vox for the whole repository in CLAUDE.md and .claude/settings.json; see Permissions.

Get a Recap

> /vox:recap

Speaking: "I refactored the authentication module into three files, added
comprehensive tests for the token refresh flow, and fixed a race condition
in the session middleware. All 47 tests pass."

Set the Vibe

> /vibe banging my head against the wall

Vibe: banging my head against the wall → [frustrated] [sighs] [manual]

In auto mode (the default) the agent sets the mood from the conversation, prompted by a periodic reminder. A run of failures moves the voice toward [frustrated] and then [weary]; once work goes well again it returns to [happy], through a [relieved] step. Expressive tags work only with ElevenLabs.

Switch to Chime-Only

> /mute

Muted — chimes only.

There are two chimes: one for task completion and one for a permission prompt. The vibe changes the spoken voice, not the chimes.

Commands

Slash Commands

Command What it does
/vox enable Turn vox on for this repository
/vox disable Turn vox off for this repository
/vox:recap Speak a short summary of Claude's last response
/vox:voice [<name>] Set the session voice (no argument opens a picker)
/vox:provider [<name>] Switch TTS provider (no argument opens a picker)
/vox:model [<name>] Switch TTS model (no argument opens a picker)
/unmute Speak notifications
/mute Chimes only, no voice
/vibe <mood> Set the session mood
/vibe auto Let the agent set the mood from the session (default)
/vibe off Turn the vibe off; the voice is neutral
/music on Start generated background music in the current style
/music on style techno Start music with a style; the style persists across calls
/music on --title focus-beats Generate and save under a title, or replay it if it exists
/music next Jump to another track now
/music prev Step back one track
/music pause Pause playback
/music resume Resume playback
/music play <name> Replay a saved album by name (zero credits)
/music play Replay the last-played album
/music list List saved albums
/music status Show the current music state (same as /music)
/music stop Stop background music
/call --headset Talk to voxd's call agent, which delegates coding to persistent workers
/call status Show voxd's call: state, tool calls, transcript so far
/call stop Hang up

CLI

vox also works as a standalone TTS tool, without Claude Code.

Speech and Session Settings

Command What it does
vox say "Hello world" Synthesize and play text; reads stdin when piped
vox say "Wall broadcast" --once 600 Skip the play if the same text played in the last 600 seconds
vox vibe excited Set the session mood and use it as a speech cue on ElevenLabs v3
vox notify normal Notify on task completion and permission prompts
vox notify continuous Also announce real-time signals
vox speak n Chimes only (vox speak y turns speech back on)
vox voice List the voices for the active provider
vox voice --provider openai List OpenAI voices without switching providers
vox voice matilda Set the session voice
vox voice alloy --provider openai Set the session voice only if OpenAI is active
vox provider List the five providers and mark the current one
vox provider openai Set the TTS provider
vox model List the models the current provider offers
vox model v3 Set the TTS model (shorthands: v3, flash, turbo, multilingual)
vox enable Turn vox on for this repository
vox disable Turn vox off for this repository
vox status Show the daemon, voice, vibe, notification, and Claude Desktop state

Recordings

Command What it does
vox rec new "Hello world" Synthesize into the recording store and print its id
vox rec list List stored recordings
vox rec play 5b9fc536a112.mp3 Play a stored recording on the daemon's machine
vox rec get 5b9fc536a112.mp3 Copy a recording into the current directory
vox rec remove 5b9fc536a112.mp3 Delete a recording from the store

Without --name, the recording id depends only on the text. Recording the same text again silently replaces the earlier take, even if you change the voice or rate. Use a different --name for each take (for example, --name take-1.mp3 and --name take-2.mp3) to keep them separate. --name only works for a single text segment.

Batch Segment Output

vox say --from segments.json and vox rec new --from segments.json read a JSON array of strings or objects with a string text field. Blank segments are skipped. With --json, stdout is JSON Lines, not a JSON array: each successful segment produces one JSON object per line, in input order.

vox rec new --from segments.json --json

A rejected segment or a lost connection ends the output with a final {"error": "..."} object and a nonzero exit; earlier results stay in the output. See docs/guide-batch-output.md for the failure cases and a script that reads partial results.

Music

Command What it does
vox music play --style techno Play a style radio
vox music play focus-beats Replay a saved album by name (zero credits)
vox music play 7f3a91 Replay a saved album by id
vox music play Replay the last-played album
cat pool.json | vox music on --style techno Start music from a 12-track pool you write ({base_prompt, variations})
vox music new "warm analog pads, D minor" --title night-pads Generate one track from your exact prompt into a new album
vox music next Jump to another track
vox music prev Step back one track
vox music pause Pause playback
vox music resume Resume playback
vox music status Show what is playing
vox music list List saved albums
vox music get 7f3a91 Copy an album into the current directory
vox music get 7f3a91 --dest ~/Music Copy an album into a directory you name
vox music remove 7f3a91 Delete an album (a playing album is refused)
vox music stop Stop background music

Voice Calls

Command What it does
vox call --headset Talk to voxd's call agent while wearing a headset; prints a live status line, then the transcript
vox call --aec Use an audio path already configured for acoustic echo cancellation
vox call --script greet.jsonl Feed recorded caller turns ({"pcm_path": ..., "pause_s": ...} per line) instead of the microphone
vox call status Show voxd's call: state, tool calls, transcript so far
vox call teardown Delete the managed ElevenLabs agent and tools; the next call provisions them again
vox call stop Hang up without stopping workers
vox call context --session <id> Inspect curated Claude Code hook context and sequence gaps

Installation and the Daemon

Command What it does
vox install Install the Claude Code plugin and the daemon service
vox uninstall Remove the Claude Code plugin
vox doctor Check the setup
vox version Print the version
vox daemon install Register voxd as a service, seed keys.env, and start it
vox daemon uninstall Remove the voxd service
vox daemon start Start voxd and confirm it runs the installed version
vox daemon stop Stop voxd and confirm it exited
vox daemon restart Stop, then start
vox daemon status Report running, unresponsive, unknown, or not_running (exit code 0 only when running)
vox daemon status --json Report the daemon's health as JSON
vox log debug Set the daemon's log level (info or debug)
vox cache status Show the synthesis cache's entry count, size, and path
vox cache clear Delete all cached MP3 files
vox desktop install Register the MCP server with Claude Desktop
vox desktop uninstall Remove the Claude Desktop registration
vox mcp Run the MCP server over stdio
voxd Run the audio daemon in the foreground

API

vox is also a Python library. It talks to the same voxd daemon as the plugin and the CLI; vox install is the only setup.

from punt_vox import SynthesisSpec, VoxClientSync

spec = SynthesisSpec(voice="sarah", provider="elevenlabs")
VoxClientSync().synthesize("Build finished", spec)

The spec must name a provider; the daemon rejects a request without one. ElevenLabs needs an API key (see Configure Providers); with none, use SynthesisSpec(provider="say") on macOS or SynthesisSpec(provider="espeak") on Linux, where espeak-ng or espeak must be on the daemon's PATH. VoxClientSync connects per call; VoxClient is the async version. Every failure raises a VoxError subclass, results are typed, and the package ships type information (py.typed). See the Python Library Guide for both clients, recording and fetching MP3 bytes, voice listing, and the full list of public names.

Setup

Configure Providers

The Quick Start uses the operating system's built-in voice: say on macOS, espeak-ng on Linux. For a more natural voice, configure a cloud provider. The /vibe expressive tags ([excited], [weary], [sighs], and so on) need ElevenLabs; no other provider supports them.

1. Get an API Key

Provider Where to sign up Free tier
ElevenLabs (recommended) elevenlabs.io → Settings → API Keys 10k characters/month
OpenAI platform.openai.com → API Keys None — pay-as-you-go
AWS Polly Any AWS account; create an IAM user with the AmazonPollyReadOnlyAccess policy 5M chars/month, first 12 months

2. Add the Keys to ~/.punt-labs/vox/keys.env

The keys file is in your home directory and owned by you, so you can edit it without sudo. Open it in any editor:

nano ~/.punt-labs/vox/keys.env

Add the lines that apply. All are optional; vox detects which providers are configured.

# ElevenLabs — recommended
ELEVENLABS_API_KEY=sk_...

# OpenAI
OPENAI_API_KEY=sk-proj-...

# AWS Polly via an aws CLI profile (recommended if you use the AWS CLI)
AWS_PROFILE=default
AWS_DEFAULT_REGION=us-east-1

# AWS Polly via raw credentials (alternative to a profile)
# AWS_ACCESS_KEY_ID=AKIA...
# AWS_SECRET_ACCESS_KEY=...
# AWS_DEFAULT_REGION=us-east-1

# Optional: prefer this provider when enabling a repo, if the provider is ready.
TTS_PROVIDER=elevenlabs

vox daemon install also copies into keys.env any provider keys set in the shell that runs the install, so keys set in .envrc or similar before installing work too. A key already stored in keys.env is kept when the shell holds a different value, and the install output names it; run vox daemon install --rotate-keys to replace stored keys with the shell's. Settings (TTS_PROVIDER, AWS_PROFILE, AWS_DEFAULT_REGION) still follow the shell. After install, edit the file directly.

3. Restart the Daemon

vox daemon restart

Run it as your normal user, not under sudo. On macOS it needs no password, because voxd is a user LaunchAgent. On Linux it asks for your sudo password once, only for the systemctl call that manages the system service.

4. Select the Provider in Your Repository

Adding credentials does not change a repository's existing provider. From the repository you want to switch, run, for example:

vox provider elevenlabs

5. Verify

Report system checks and per-provider readiness:

vox doctor

List the voices your provider offers:

vox voice

Speak through the default provider:

vox say "hello from vox"

vox doctor reports the Python version, whether ffmpeg and espeak are present, the daemon status, and which providers the daemon has credentials for and which one it prefers. It checks the daemon's environment, not your shell's: an ELEVENLABS_API_KEY exported in your terminal does not change the report. Edit keys.env and run vox daemon restart to change what the daemon sees.

If something does not work, check the daemon log at ~/.punt-labs/vox/logs/vox.log. It records the player command, the audio session environment, the exit code, the elapsed time, and the player's error output.

Providers

ElevenLabs is the only provider with expressive tags, so /vibe changes the voice only with ElevenLabs. The other providers work without it.

Provider API Key Default Voice Notes
ElevenLabs ELEVENLABS_API_KEY matilda Recommended. Expressive tags via /vibe
OpenAI OPENAI_API_KEY nova
AWS Polly AWS credentials joanna
macOS say — samantha No setup on macOS, works offline
espeak-ng — en No setup on Linux, works offline

During setup, if no preferred provider is ready, vox tries ElevenLabs > OpenAI > Polly (if AWS credentials are valid) > say (macOS) / espeak (Linux).

Per-Call API Keys for Billing Isolation

If you keep several provider API keys to track cost (for example, a separate ElevenLabs key per project), you can pass a key for a single vox say call. The key is used for that call only: it is not saved to keys.env, not logged by the daemon, not printed, and not visible to other requests on the same daemon. There are four ways to pass it, from most to least secure.

  1. Environment variable (recommended for scripts). Set VOX_API_KEY, for example from a password manager:

    export VOX_API_KEY=$(pass show vox/proj_a)

    Then call vox say as usual:

    vox say "billable to project A"

    On Linux, a process's environment is visible in /proc/<pid>/environ, which normally only the process owner can read. macOS has no /proc. In both cases an environment variable is less exposed than a command-line argument, which ps shows to every user on the machine.

  2. File (recommended for stored keys):

    vox say "billable to project A" --api-key-file ~/.config/vox/key_project_a.txt

    The file should be mode 0600 (owner read/write only). vox warns and suggests chmod 600 if group or other permission bits are set.

  3. Standard input (recommended for password managers):

    pass show vox/proj_a | vox say "billable to project A" --api-key-stdin

    This reads one line from stdin. It refuses to read from a terminal, so a forgotten pipe fails at once instead of waiting for input.

  4. Command line (for demos only, not for real keys):

    vox say "billable to project A" --api-key sk_demo_key

    Warning: a key on the command line is visible to ps (and on Linux in /proc/*/cmdline), in shell history, and in terminal recordings. vox prints a warning to stderr whenever you use --api-key.

You can use only one of the four at a time; passing more than one is an error. This is not isolation between users: vox runs for one user, and the feature attributes spending to projects within that user's account.

Calls with a per-call key skip the synthesis cache, so every call reaches the provider. Calls that use keys.env can be served from the cache.

Environment Variables

Variable Description Default
TTS_PROVIDER Preferred ready provider during setup (for example, vox enable); does not override vox.md at runtime First ready provider
VOX_OUTPUT_DIR Output directory ~/Music/vox/
VOX_API_KEY Per-call provider key for vox say none
VOXD_HOST Remote voxd host (client) 127.0.0.1
VOXD_PORT Remote voxd port (client) read from the serve.port file
VOXD_TOKEN Remote voxd auth token (client) read from the serve.token file
VOXD_BIND voxd bind address (server); must be an IP address, not a hostname 127.0.0.1

Provider API keys (ELEVENLABS_API_KEY, OPENAI_API_KEY, AWS_*) belong in ~/.punt-labs/vox/keys.env, not in your shell startup file. See Configure Providers.

Permissions

vox enable adds these rules to the repository's .claude/settings.json, so Claude Code does not ask before using vox's own tools in that repository:

  • Allowed: Bash(vox:*), mcp__plugin_vox_mic__*, and Skill(vox:*).
  • Still asks first: the vox subcommands install, uninstall, enable, disable, daemon, desktop, cache, and mcp. A vox command that starts with an option, such as vox --version, does not ask.

vox disable removes exactly those rules. Both commands also remove Bash(vox -*), which earlier versions added. Neither command changes anything outside the repository. Rules that older versions of vox added to ~/.claude/settings.json stay until you delete them.

Upgrading

uv tool upgrade punt-vox replaces the installed package, but it does not restart the running voxd daemon, which keeps running the old version. Upgrade, then restart the daemon:

uv tool upgrade punt-vox
vox daemon restart

Run vox daemon restart as your normal user; it refuses to run as root. On Linux it runs sudo -n systemctl … and asks for your password once, only when a terminal is attached. restart is vox daemon stop followed by vox daemon start. stop succeeds only when the service is inactive, nothing holds port 8421, and every voxd process it found has exited. start succeeds only when the service's process answers the authenticated health check with the installed version. Each run prints one outcome (stopped, started, restarted, already running, timeout, …) and names any process it had to signal; use --json for scripts. On failure it points you to ~/.punt-labs/vox/logs/vox.log.

To confirm the daemon runs the installed version:

vox doctor

vox doctor reports the running daemon's version. When it differs from the installed package, doctor prints a yellow warning (⚠ Daemon: running ... (version X — wheel has Y, run 'vox daemon restart' to refresh)) and still exits 0.

Service Install

vox daemon install

This registers voxd as a service, creates keys.env, and starts the daemon. On macOS voxd is a user LaunchAgent, so installing, restarting, and removing it need no password. On Linux vox asks for your sudo password once to place the systemd unit file; everything else runs as your normal user. The daemon runs as the installing user, not as root, because it needs the audio devices of your desktop session.

State Paths

voxd runs as one user, so its state is per user. All vox state lives under ~/.punt-labs/vox/, with the same layout on macOS and Linux. The one file outside your home directory is the Linux systemd unit, in /etc/systemd/system/.

Purpose Path
Config (API keys) ~/.punt-labs/vox/keys.env
Agent usage guide (per enabled repo) .punt-labs/vox/CLAUDE.md
Logs ~/.punt-labs/vox/logs/vox.log
Runtime state ~/.punt-labs/vox/run/serve.{port,token}
Cache ~/.punt-labs/vox/cache/
Call traces ~/.punt-labs/vox/calls/
Service unit (Linux) /etc/systemd/system/voxd.service
Service plist (macOS) ~/Library/LaunchAgents/com.punt-labs.voxd.plist

Per-repository settings live in .punt-labs/vox/ in each repository, in two files: vox.md holds settings meant to be committed (voice, provider, model), and vox.local.md is git-ignored and holds session state such as the current vibe.

Diagnostics and Usage Telemetry

Private diagnostic logs live at ~/.punt-labs/vox/logs/vox.log (0600 files, 0700 directories). --verbose and the log_level setting control file verbosity. The daemon never mirrors diagnostics to stderr; clients continue without a file sink if private logging cannot be configured, with one metadata-only warning.

Usage telemetry is local-only by default, stored separately in ~/.punt-labs/vox/telemetry.db, with 90-day retention. It captures versioned spans for MCP tools, dispatched hooks, top-level CLI commands, and daemon synthesis: closed operation/provider names, start and end times, success/error outcomes, cache hits, and text lengths. It never captures text, prompts, paths, credentials, or exception messages. Unknown operation names become other. Shared punt-observe configuration owns exporters; network export requires explicit opt-in consent.

Set VOX_TELEMETRY=off to disable vox usage telemetry, or PUNT_TELEMETRY=off to disable it for all Punt tools. Either switch wins; disabled telemetry opens no database and creates no salt. Diagnostic logging remains available.

Agent Usage Guide

vox enable is the only guide writer. It deposits .punt-labs/vox/CLAUDE.md in the repo and adds @.punt-labs/vox/CLAUDE.md to the repo's CLAUDE.md, so the guide loads only in enabled projects. vox install, vox uninstall, and install.sh touch no CLAUDE.md. A stale @~/.punt-labs/vox/CLAUDE.md import in ~/.claude/CLAUDE.md and the old ~/.punt-labs/vox/CLAUDE.md guide are left alone; delete both by hand.

Ways to Use vox

All three ways use the same voxd audio daemon, so vox also works outside Claude Code:

  • Claude Code plugin --- the mic MCP server gives the agent voice, /vibe, and /music tools, plus notification hooks. See Slash Commands.
  • Python library --- from punt_vox import VoxClient. See API.
  • CLI --- vox say "Build finished", vox rec new "...", vox music play. See CLI.

Remote Audio

You can run Claude Code on a headless server or cloud VM and hear the audio on your own machine. Set VOXD_HOST, VOXD_PORT, and VOXD_TOKEN on the remote host to point it at the voxd on your machine. See docs/guide-remote-setup.md for direct-network and SSH-tunnel setups.

Background Music

/music on plays generated instrumental music. It plays the first track as soon as it is ready, then generates the rest of the pool (up to 12 distinct tracks) in the background and moves to a different track as each one ends. When the pool holds 12 tracks, generation stops and playback rotates through the pool in shuffled order, never repeating a track twice in a row, at zero credits.

vox passes prompts to the ElevenLabs Music API; it does not decide what a genre sounds like. On /music on the agent writes a base prompt for the genre plus 12 variations, so the pool holds 12 different tracks in one style.

Each album is saved under ~/Music/vox/<name>/, named by --title or else by the style, with ID3 tags (artist, album, title, genre, track number) on every track, so the music shows up in macOS Music.app, Rhythmbox, and other players. Replaying a saved album or rotating a full pool costs nothing; generation runs only while a pool has fewer than 12 tracks.

Requires an ElevenLabs paid plan. Each generated track costs about 2,000 credits (about 3 minutes of audio), so a full 12-track pool costs about 24,000 credits.

Music Player

When lux is running on the same machine, voxd adds a voxd ▸ Music menu entry to the lux display. It shows your saved albums as a list, each with a Play control, above play/pause, previous, next, and stop controls. Clicking an album plays it through your speakers, and the display shows what is playing and the track number. If the lux display restarts, voxd reconnects and adds the menu again. Without lux, the rest of vox works the same; only the player needs it.

Control Panel

When vox is enabled in a repository and lux is running, each Claude Code session adds a Vox entry to the lux menu. It opens a settings panel for chimes versus voice, the notification level (off, normal, continuous), and the voice, with a preview button. The panel changes the same settings as the CLI and slash commands, so they always agree. If a change cannot be saved or voxd is unreachable, the panel says so in a status line.

Vox Call

Talk to Vox without opening a coding session first. voxd runs an ElevenLabs voice agent that can start, steer, check and stop coding workers. Workers run in their own worktrees and keep running after you hang up. On another call, ask Vox what the workers did while you were away.

Call Setup

The daemon needs an ElevenLabs API key with Agents Write (convai_write). For coding workers, install Git, tmux and Claude Code on the daemon host. On Linux, call workers launched by the Vox systemd service need systemd 254 or newer and a running systemd user manager. Ubuntu 24.04 LTS meets the version requirement; Ubuntu 22.04 LTS ships systemd 249 and cannot launch these workers from the service. Run vox doctor to check the installed version.

As the daemon user, sign in to Claude Code and install and enable the Vox plugin in the Claude Code configuration workers use. Its hooks report when a worker is ready and send progress back to the call.

Install the call extra for audio playback and live microphone input. Scripted calls still play replies, so they also need the extra:

uv tool install --force "punt-vox[call]"

The extra's sounddevice package needs the PortAudio library: the portaudio package in Homebrew, libportaudio2 on most Linux distributions.

To let Vox start workers, allowlist the Git repository on the machine that runs the daemon:

vox worker allow /absolute/path/to/vox-demo

The path must be a repository top level; vox worker repos lists the allowlist, vox worker disallow <path> removes one, and vox status shows the allowlisted repositories on its Workers: line. The daemon writes the list to its own durable config, so the command works the same for a user-run daemon and a system service.

This list controls which repositories workers can start in, not which commands they can run. Workers inherit the harness's permissions. Vox does not add a command allowlist or require a spoken “yes” before running commands. If the harness itself prompts, Vox can relay the prompt and your answer; the harness still decides when approval is needed.

Walkthrough

Use a repository named vox-demo with a committed README.md for this example. First check your setup:

vox doctor

The call checks report the local ElevenLabs key's Agents Write scope, Claude login and tmux availability. Doctor then asks the running daemon to open its default microphone for one second and reports the device, sample rate and peak level: silence means the daemon's process lacks the microphone grant (System Settings, Privacy & Security, Microphone), which a shell terminal may hold while a launchd-started voxd does not. Doctor also reads the daemon's worker repository allowlist and warns when it is empty, since a call can then start no worker. Doctor shows an echo-cancellation advisory. A separately configured daemon may use different credentials. Put on a headset and run:

vox call --headset

After the greeting, say: “Start a worker in vox-demo. Ask it to read README.md and report its title without editing any files.” In a second terminal, check the call:

vox call status

Then hang up:

vox call stop

The first terminal prints the transcript, worker tool activity and a private trace path. Hanging up (including with Ctrl-C) does not stop the worker. In Claude Code, /call --headset, /call status and /call stop use the same call.

Use --aec instead of --headset only if you already have a system audio path configured for echo cancellation; Vox does not enable or verify it. For demos and CI, vox call --script <path> takes JSON Lines with one {"pcm_path": "turn.pcm", "pause_s": 2} object per turn. Each path points to 16 kHz mono signed 16-bit little-endian PCM and can be relative to the script. vox call teardown deletes the managed ElevenLabs agent and tools when no call is active; the next call provisions them again.

Use vox call context --session <id> to inspect curated Claude Code context such as the session goal, active files and recent tool results without placing a call. The daemon keeps this context bounded and in memory. Sequence gaps report what this snapshot has not seen, not necessarily a lost hook. Credential-shaped keys are redacted, but free-form text is not scrubbed.

Architecture

Claude Code ◄── stdio ──► vox mcp ── WebSocket ──► voxd :8421
                                                      │
Hook scripts ──► vox hook <event> ── WebSocket ──►    │
                                                      │
Shell        ──► vox say "hi"  ── WebSocket ──►    │
                                                      ▼
                                                   speakers

voxd is the audio daemon. It synthesizes text through the TTS providers and plays audio through the speakers. It plays one sound at a time, drops a request identical to one received in the last 5 seconds, and caches synthesis results. It has no knowledge of MCP, hooks, projects, or Claude Code.

vox mcp is the MCP server, one per Claude Code session. It keeps the session's voice, provider, vibe, and notification mode in memory, and sends synthesis requests to voxd. The daemon keeps no session state and never reads the repository's vox files. It finds the repository's .punt-labs/vox/ directory by searching upward from Claude Code's working directory.

vox hook <event> runs on Claude Code events and asks voxd to play chimes and speech.

vox say and the other CLI commands each open a short connection to voxd.

The connection between Claude Code and vox mcp does not depend on the daemon, and vox mcp reconnects to voxd on its own, so restarting the daemon does not lose session settings.

Related Approaches

  • AgentVibes --- An actively maintained open-source voice companion for Claude Code. It leads on offline voices (Piper and Kokoro run locally) and ships a terminal UI and a bundled music catalog. vox differs in three ways: the mood follows the session instead of a personality you pick, the music is generated to match, and the same daemon is importable as a Python library.
  • agent-notify --- Open-source sound and voice notifications for Claude Code, Cursor, and Codex. A good fit when you want alerts across several assistants and nothing more; vox adds provider choice, mood, music, and calls.
  • say / espeak-ng in a shell hook --- One line of shell on macOS or Linux. Sequential playback is left to the caller; overlapping calls compete for the audio device. No deduplication across sessions and no voices beyond what the OS ships. vox uses these same programs as its offline fallback.
  • Editor-side TTS plugins (VS Code speech, Neovim :!say, ...) --- Tied to one editor. Claude Code runs in the terminal.
  • notify-send / macOS terminal-notifier --- Visual notifications, not audio.

Documentation

Architecture (PDF) | Remote Setup | Python Library | Batch Output | Design Log | Testing | Contributing | Changelog

License

MIT

About

Speech for Claude Code and friends: Text-to-speech CLI, MCP server, and Claude Code plugin (ElevenLabs, AWS Polly, OpenAI)

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages