tts-voice

tts-voice is a skill for Claude Code, Codex from fuyuxiang/echo-agent. It costs 29 tokens per session (727 once invoked), scanned A, original, MIT.

A text-to-speech tool that turns written text into audio files, using free Edge-TTS or OpenAI TTS. It includes natural-sounding Chinese voice options.

In plain words
What is it for?
Use it to create MP3 voice-overs, read Chinese text aloud, or generate audio briefings from scripts.
Why use it?
It removes the need to record spoken versions of text yourself or build speech generation from scratch.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create MP3 voice-overs, read Chinese text aloud, or generate…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fuyuxiang/echo-agent/tts-voice
About the project

Echo Agent is a self-hosted, long-running AI agent that connects language models, tools, memory, permissions, and messaging channels in one system. Individuals and teams use it for private automation that retains context across sessions, develops skills, schedules tasks, and requires approval for high-risk actions.

fuyuxiang/echo-agent · 1,054 stars · on GitHub · ojlab.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fuyuxiang/echo-agent --skill tts-voice
Clone the repo
git clone --depth 1 https://github.com/fuyuxiang/echo-agent

Made for: Claude Code, Codex.

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 tts-voice

README.md
[![agentmods](https://agentmods.dev/badge/skills/fuyuxiang/echo-agent/tts-voice.svg)](https://agentmods.dev/skills/fuyuxiang/echo-agent/tts-voice)
Your own site
<a href="https://agentmods.dev/skills/fuyuxiang/echo-agent/tts-voice"><img src="https://agentmods.dev/badge/skills/fuyuxiang/echo-agent/tts-voice.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 727 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00029 $0.00727
Opus 5 $0.00015 $0.00364
Sonnet 5 $0.00006 $0.00145
Haiku 4.5 $0.00003 $0.00073

Measured 7d ago against content hash 5c71d1734c67, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

tts-voice scanned grade A with 0 findings 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 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/text_to_speech.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/media/tts-voice/SKILL.md · 101 lines

How it starts

The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TTS Voice

Text-to-Speech with natural Chinese voices.

pip install edge-tts

CLI

edge-tts --voice zh-CN-XiaoxiaoNeural --text "今天天气不错" --write-media /tmp/output.mp3
edge-tts --list-voices | grep zh-CN

Python

import edge_tts, asyncio

async def speak(text, voice="zh-CN-XiaoxiaoNeural", output="output.mp3"):
    communicate = edge_tts.Communicate(text, voice)
    await communicate.save(output)

asyncio.run(speak("欢迎使用 Echo Agent"))

Chinese Voices

Voice ID Style
zh-CN-XiaoxiaoNeural 女声,活泼自然
zh-CN-YunxiNeural 男声,温和
zh-CN-YunyangNeural 男声,新闻播报
zh-CN-XiaoyiNeural 女声,温柔
zh-CN-liaoning-XiaobeiNeural 东北方言
zh-TW-HsiaoChenNeural 台湾女声

OpenAI TTS (Alternative)

Requires OPENAI_API_KEY:

from openai import OpenAI
client = OpenAI()
response = client.audio.speech.create(
    model="tts-1",  # or tts-1-hd
    voice="alloy",  # alloy/echo/fable/onyx/nova/shimmer
    input="Hello world"
)
response.stream_to_file("output.mp3")

Script

python3 scripts/text_to_speech.py "你好世界"
python3 scripts/text_to_speech.py "长文本内容..." --voice zh-CN-YunxiNeural -o briefing.mp3
python3 scripts/text_to_speech.py --list-voices zh

Delivering the audio (important for scheduled/unattended tasks)

Generating an mp3 does NOT send it. When the user should actually receive the audio (e.g. a cron-triggered morning briefing), use the built-in text_to_speech tool with deliver=true so synthesis and delivery happen in one step:

text_to_speech(text="北京今天多云…", voice="zh-CN-XiaoxiaoNeural", deliver=true)

With deliver=true the tool sends the file to the current chat automatically (target inferred from the session, or override with deliver_channel / deliver_chat_id). Do NOT rely on a separate follow-up send_file call inside a scheduled job — an unattended run may end after synthesis and the audio would never reach the user.

Read the full file on GitHub · 101 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d ago First seen · 101 lines · 29 tokens per session scan A 5c71d1734c67

Subscribe to this mod's changes

tts-voice is a skill published in the GitHub repository fuyuxiang/echo-agent (1,054 stars, last pushed 5d ago), licensed MIT. It adds 29 tokens to every session and 727 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.