switch-voice

switch-voice is a command for Claude Code from TwinPeaksTownie/Claude-to-Speech. It costs 6 tokens per session (294 once invoked), scanned A, original, MIT.

A command that changes the active text-to-speech voice in a local voice server. TTS means turning written text into spoken audio.

In plain words
What is it for?
Use it to switch the voice used by the local speech server and check whether that server is running.
Why use it?
It avoids manually editing the voice configuration file and reloads the selected voice in the running server. It accepts named voices such as LAURA, robo-LAURA, and Claude.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the claude-to-speech plugin — 7 commands, 1 hook shipped together

Good fit Use it to switch the voice used by the local speech server and check whether that server is running.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add TwinPeaksTownie/Claude-to-Speech
Claude Code
/plugin install claude-to-speech

Made for: Claude Code.

Or install claude-to-speech, the plugin that ships this one along with the rest of its 7 commands, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for switch-voice

README.md
[![agentmods](https://agentmods.dev/badge/commands/twinpeakstownie/claude-to-speech/switch-voice/github.svg)](https://agentmods.dev/commands/twinpeakstownie/claude-to-speech/switch-voice)
Your own site
<a href="https://agentmods.dev/commands/twinpeakstownie/claude-to-speech/switch-voice"><img src="https://agentmods.dev/badge/commands/twinpeakstownie/claude-to-speech/switch-voice/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for switch-voice

Your own site · 80×15
<a href="https://agentmods.dev/commands/twinpeakstownie/claude-to-speech/switch-voice"><img src="https://agentmods.dev/badge/commands/twinpeakstownie/claude-to-speech/switch-voice.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 294 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00006 $0.00294
Opus 5 $0.00003 $0.00147
Sonnet 5 $0.00001 $0.00059
Haiku 4.5 $0.00001 $0.00029

Measured 11d ago against content hash 3feb9a1f69b0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

switch-voice scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -X POST http://localhost:5001/reload_voice 2>/dev/null || echo "Server not running"
commands/switch-voice.md · 41 lines

What it actually says

Switching TTS voice to: $ARGUMENTS

Available voices:

  • LAURA (qEwI395unGwWV1dn3Y65)
  • robo-LAURA (43WCRcu4Axd2KIaxt4M7) [default]
  • Claude (uY96J30mUhYUIymmD5cu)
VOICE_KEY="$ARGUMENTS"

if [ -z "$VOICE_KEY" ]; then
  echo "Usage: /claude-to-speech:switch-voice <voice-key>"
  echo "Available: LAURA, robo-LAURA, Claude"
  exit 1
fi

# Update active_voice in voices.json
cd "${CLAUDE_PLUGIN_ROOT}/server/config"
TMP_FILE=$(mktemp)
python3 << EOF
import json
with open('voices.json', 'r') as f:
    config = json.load(f)
config['active_voice'] = '$VOICE_KEY'
with open('$TMP_FILE', 'w') as f:
    json.dump(config, f, indent=2)
EOF

mv "$TMP_FILE" voices.json

# Reload voice in running server
curl -X POST http://localhost:5001/reload_voice 2>/dev/null || echo "Server not running"

echo "Voice switched to: $VOICE_KEY"
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 41 lines · 6 tokens per session scan A 3feb9a1f69b0

Subscribe to this mod's changes

switch-voice is a command published in the GitHub repository TwinPeaksTownie/Claude-to-Speech (19 stars, last pushed 5mo ago), licensed MIT. It adds 6 tokens to every session and 294 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.