Earpiece

← Agents

Voice notifications for Claude Code

Start a task in Claude Code and walk away. Earpiece says what happened, out loud, when Claude finishes, needs your permission or is waiting on you. Free and open source.

What you hear

One short line per event, spoken by your Mac or a natural voice. It starts with the project, so you know which session it means.

  • Done: “checkout service. Refactored the cart drawer, all tests pass.”
  • Needs permission: “api needs your permission to use Bash.”
  • Waiting for you: “api is waiting for you.”

Without API keys, Earpiece speaks the first sentence of Claude’s final reply with your system voice. With an OpenAI key, or with Earpiece Pro, it writes a real one-line summary first.

Set it up in the app

  1. Download Earpiece and open it. The first builds are unsigned, so macOS asks you to allow it once under System Settings → Privacy & Security → Open Anyway.
  2. Open Agents and click Connect next to Claude Code. It shows Connected when it’s done. Connecting only edits the file shown there, and keeps a backup.
  3. Restart any Claude Code sessions that were already running, so they pick up the hooks. New sessions work right away.
  4. Click Test voice at the top of the Overview page to hear it.

Agents

Earpiece listens to each agent in the way that agent supports. Connecting only edits the file shown, and keeps a backup.

Claude CodeTerminal Claude Code, and the Code tab in Claude Desktop if it runs your hooks.
Connected
How~/.claude/settings.json
Hooks in ~/.claude/settings.json
Speak for this agentTurn off to mute it without disconnecting.
Name Earpiece saysUsed when announcing the agent. Leave empty for the default.
VoiceA Smallest voice id just for this agent, so you can tell them apart. Empty uses your main voice.
Minimum turn lengthSeconds. Shorter turns stay silent. Empty uses 30 s.
CodexCodex CLI. An existing notify command keeps working.
Connected
How~/.codex/config.toml
notify in ~/.codex/config.toml
Speak for this agentTurn off to mute it without disconnecting.
Name Earpiece saysUsed when announcing the agent. Leave empty for the default.
VoiceA Smallest voice id just for this agent, so you can tell them apart. Empty uses your main voice.
Minimum turn lengthSeconds. Shorter turns stay silent. Empty uses 30 s.
Claude DesktopChats and Cowork. Claude calls an earpiece_notify tool when it finishes real work or needs you, and writes the line itself. Quit and reopen Claude Desktop after connecting.
Connected
How
MCP server in claude_desktop_config.json
Speak for this agentTurn off to mute it without disconnecting.
Name Earpiece saysUsed when announcing the agent. Leave empty for the default.
VoiceA Smallest voice id just for this agent, so you can tell them apart. Empty uses your main voice.

Any other tool can talk to Earpiece with the command line: earpiece emit --agent my-tool --type turn_end --line “Build finished”. It shows up here once it has sent something.

The Agents page of the Mac app, with Claude Code first. It's a working copy: click around.

Make it yours in the app

SettingWhereWhat it does
Speak for this agentAgents → Claude CodeMutes Claude Code without disconnecting it.
Name Earpiece saysAgents → Claude CodeThe name used when lines announce the agent.
VoiceAgents → Claude CodeA voice just for Claude Code, so you can tell it apart from Codex.
Minimum turn lengthAgents → Claude CodeShorter turns stay silent. 30 seconds by default.
Say the agent’s nameVoice“Claude Code, api. Done…” instead of just the project.
Quiet for a whileQuietNothing is read aloud, but every update still shows in the notch.
Quiet hoursQuietSilence at night, with “Still say” to let “needs you” through.
Answer from the cardGeneralApprove or deny a tool request on the notch card. Off by default.
API keysAPI KeysOptional Smallest.ai key for natural voices, OpenAI key for summaries.

Every session shows on the Overview page and in the notch, and only one line plays at a time. Keys and tokens are redacted before a line is spoken or sent for a summary.

Prefer the terminal?

Everything above also works from the command line. Install from source and connect only Claude Code:

Terminal
git clone https://github.com/adissocrazy/earpiece.git
cd earpiece
node bin/earpiece.mjs install --only claude-code
npm link
earpiece test
CommandSame as
earpiece voice <voice-id> --agent claude-codeAgents → Claude Code → Voice
earpiece quiet 60Quiet for an hour
earpiece quiet-hours 22:00-08:00 --allow needs_inputQuiet hours, still saying “needs you”
earpiece answers onGeneral → Answer from the card
earpiece agentsThe session list on Overview
earpiece uninstallDisconnect for every agent, and puts your files back

What it hooks

Earpiece adds four hooks to ~/.claude/settings.json. Each returns within milliseconds, so Claude never waits on it.

HookWhat Earpiece does with it
UserPromptSubmitMarks the session as working and notes when the turn started.
StopSpeaks the summary when the turn ends.
NotificationSpeaks permission prompts and “waiting for your input”.
PostToolUseIf the tool ran, you already approved it, so the pending permission alert is dropped.

By default, turns shorter than 30 seconds stay silent, since you were probably watching. For every field these hooks receive, see Claude Code hooks explained.

Questions

I already have my own Claude Code hooks. Will they break?

No. Earpiece adds its own entries next to yours and backs up the file first. earpiece uninstall removes only what it added.

Does my code leave my machine?

Only if you add an OpenAI key or use Pro. Then the end of Claude’s final reply is sent to write the summary, with keys and tokens removed first. Without either, nothing is sent.