API安装
- 作者仓库星标 1,187
- 叉子 185
- 作者更新于 2026年6月14日 10:01
- 作者仓库 claude-code-skills
- 领域
- 通用
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @daymade · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 需要 · Vendor-specific
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- 网络行为
- 允许外网请求
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: stepfun-tts
description: Generate Chinese / Japanese speech with StepFun's stepaudio-2.5-tts — Contextual TTS that replac…
category: 通用
runtime: 无特殊运行时
---
# stepfun-tts 输出预览
## PART A: 任务判断
- 适用问题:通用任务拆解、检查和交付。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Config and auth / Common tasks — decision tree / Starting points”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于通用任务拆解、检查和交付,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Config and auth / Common tasks — decision tree / Starting points”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、会按任务需要访问外部网络、需要准备 Vendor-specific API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件;会按任务需要访问外部网络;需要准备 Vendor-specific API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/tmp`、`/v1` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件。
先用一个小任务确认它会围绕“Config and auth / Common tasks — decision tree / Starting points”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: stepfun-tts
description: Generate Chinese / Japanese speech with StepFun's stepaudio-2.5-tts — Contextual TTS that replac…
category: 通用
source: daymade/claude-code-skills
---
# stepfun-tts
## 什么时候使用
- stepfun-tts 是一个通用扩展技能,按 SKILL 适合处理通用任务拆解、检查、交付和复盘,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤;使用前要…
- 面向通用任务拆解、检查和交付,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Config and auth / Common tasks — decision tree / Starting points」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件;会按任务需要访问外部网络;需要准备 Vendor-specific API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "stepfun-tts" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Config and auth / Common tasks — decision tree / Starting points
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件 | 会按任务需要访问外部网络
安全层 -> 需要准备 Vendor-specific API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} StepFun stepaudio-2.5-tts
Generate Chinese / Japanese speech with stepaudio-2.5-tts (released 2026-04, verified 2026-04-23). Contextual TTS — emotion and prosody go through natural-language description, not fixed labels.
Companion: for transcription with
stepaudio-2.5-asr(the sibling model), use thestepfun-asrskill — they share an API key but live on different endpoints with different body shapes.
Why this skill exists — StepAudio 2.5 has two non-obvious pitfalls that cost hours if you don't know them:
stepaudio-2.5-ttsrejectsvoice_label(the step-tts-2 way). Emotion/prosody now goes throughinstruction(natural-language description, ≤200 chars) and inline()parentheses inside the text itself.- Censorship is stricter — anything containing 死 / 消失 / sensitive political terms returns
censorship_block. Your rewrite options are inreferences/migration_from_v2.md.
Config and auth
API key lives in $STEPFUN_API_KEY (preferred) or ${CLAUDE_PLUGIN_DATA}/config.json (fallback for cross-session persistence). All bundled scripts try env first, then config.
First-time setup (one-liner):
mkdir -p "${CLAUDE_PLUGIN_DATA}" && cat > "${CLAUDE_PLUGIN_DATA}/config.json" <<EOF
{"api_key": "<paste key here>"}
EOF
If the user hasn't set a key, ask them to paste it (don't guess / don't use a placeholder). StepFun API keys are available at https://platform.stepfun.com/ → API Keys. Use a Normal key, not a Plan key (Plan keys are restricted to text models and silently fail on audio endpoints).
Common tasks — decision tree
| User wants... | Script | Key detail |
|---|---|---|
| Synthesize 1–500 char Chinese with emotion | scripts/tts_generate.py |
Use instruction for mood, () for inline prosody |
| Synthesize long text (500–1000 char) | scripts/tts_generate.py |
1000 char is the hard cap; split at semantic boundaries above that |
| Batch-generate game/app voice lines | scripts/tts_generate.py --batch <jsonl> |
Handle censorship_block fallback individually |
| A/B compare two TTS models | scripts/ab_compare.sh |
Compares duration/size across two directories |
Migrate from step-tts-2 |
see references/migration_from_v2.md |
voice_label.emotion → instruction rewrite + censorship list |
Starting points
- Synthesize a single line: Run
python3 scripts/tts_generate.py --text "你好" --out /tmp/hello.mp3 --instruction "温暖的希望感". For fine-grained control read the "Contextual TTS" section below. - A full migration from
step-tts-2→stepaudio-2.5-tts: readreferences/migration_from_v2.mdend-to-end before touching code. It has theINSTRUCTION_MAP, the SKIP_CENSORED list pattern, and the output-directory-strategy for non-destructive A/B.
Contextual TTS — beyond emotion labels
The headline feature of stepaudio-2.5-tts is that you stop mapping emotions to fixed tags and start describing what you want in natural language. Two layers:
Global context (instruction parameter) — sets the overall tone for the entire utterance. ≤200 chars. Think of it like giving stage direction to a voice actor.
instruction: "克制的悲伤,语气低沉柔弱,像快要消失一样"
Inline context (() parentheses inside input) —句内 directives. Parenthesised content is consumed as directions and is NOT read aloud. Use for precise control of pauses, breath, emphasis, or mid-sentence emotion shifts.
input: "(试探着问)你好吗?(开心地)太好了!(突然沉下来)不过...我快要消失了。"
Examples that worked in practice (from 2026-04-23 verification):
instruction: "活泼俏皮,像是在撒娇,带点嘴硬"— visibly speeds up delivery vs neutralinstruction: "耳语声,气声很重,几乎听不清"— produces audible whisper/breathinput: "你好(停顿一下)我是蕾格(轻声)今天(加重)的天气真不错。"— inline directives all respected
What stepaudio-2.5-tts will NOT accept — voice_label parameter. Error: voice_label is not supported for v2 models. This is the #1 migration gotcha from step-tts-2.
Common error patterns (real errors, real fixes)
| Error response | Actual cause | Fix |
|---|---|---|
"voice_label is not supported for v2 models" |
Sent voice_label to stepaudio-2.5-tts |
Remove voice_label; put the same intent into instruction as natural language |
"The content you provided or machine outputted is blocked." type: censorship_block |
Sensitive word (死 / 消失 / etc.) | Rewrite the phrase OR fall back to step-tts-2 for that specific line (mixed-model is fine) |
| Silent audio truncation (input > 1000 chars) | Hard cap exceeded | Split at semantic boundaries; don't truncate mid-sentence |
More in references/known_issues.md.
When to read references
references/api_reference.md— exact request/response JSON for/v1/audio/speech, all fields, error responses. Read when writing raw HTTP calls instead of using the bundled scripts.references/migration_from_v2.md— complete playbook for moving a step-tts-2 project to stepaudio-2.5-tts. Has the emotion→instruction rewrite table, the A/B directory strategy, decision checkpoints, and the 2026-04 speed/quality trade-off data (stepaudio-2.5-ttsis ~20% slower than step-tts-2; audible prosody improvement). Read before any migration work.references/known_issues.md— censorship patterns, TTS duration inflation, v2-family parameter naming gotcha, 1000-char hard cap. Read when debugging anomalous output or evaluating whether to adopt.
Design invariants (don't break these)
- Non-destructive A/B output — when regenerating a corpus with a new model, write to a parallel directory (
voice/zh_v25/), never overwrite the production corpus. The migration playbook shows why. - Per-line censorship handling — if 2/29 lines get
censorship_block, don't fail the batch. Log the skipped IDs, continue. Mixed-model fallback (step-tts-2 for the skipped 2) is normal. - Don't duplicate voice_label logic in new code — any new TTS code targeting stepaudio-2.5-tts should only use
instruction+ inline(). Do not write a branch that conditionally emitsvoice_label.
Pricing (verified 2026-04-23, volatile)
stepaudio-2.5-ttscontextual synthesis: ~5.8 元 / 万字符- Zero-shot voice cloning: ~9.9 元 / 音色
Re-verify at https://platform.stepfun.com/docs/zh/guides/pricing/details before quoting to stakeholders.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核