Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
daymade avatar

Stepfun Tts

  • 412 installs
  • 1.3k repo stars
  • Updated August 4, 2026
  • daymade/claude-code-skills

stepfun-tts is a Claude Code skill that generates Chinese and Japanese speech through StepFun stepaudio-2.5-tts contextual TTS for developers who need controllable voice output in agents, demos, or apps.

About

stepfun-tts is a daymade/claude-code-skills integration for StepFun stepaudio-2.5-tts, released 2026-04 and verified 2026-04-23. The skill replaces step-tts-2 voice_label tags with natural-language instruction fields up to 200 characters plus inline () prosody directives inside the spoken text. Bundled scripts include tts_generate.py for single-line or JSONL batch synthesis, ab_compare.sh for model A/B checks, and three reference guides covering API JSON, migration from step-tts-2, and censorship pitfalls. Developers reach for stepfun-tts when building game voice lines, accessibility narration, podcast drafts, or agent responses that need whisper, pause, stress, or mood control without maintaining a separate audio toolchain. The workflow handles censorship_block responses per line, enforces a 1000-character hard input cap, and stores API keys in STEPFUN_API_KEY or CLAUDE_PLUGIN_DATA config.json. Pricing guidance in the skill cites roughly 5.8 yuan per 10,000 characters for contextual synthesis.

  • StepFun text-to-speech API wiring
  • Narration and alert audio generation
  • Accessibility and demo voice output
  • In-session synthesis without context switching
  • Content and mobile voice feature support

Stepfun Tts by the numbers

  • 412 all-time installs (skills.sh)
  • Ranked #435 of 1,335 Generative Media skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/daymade/claude-code-skills --skill stepfun-tts

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs412
repo stars1.3k
Last updatedAugust 4, 2026
Repositorydaymade/claude-code-skills

How do you migrate StepFun TTS to stepaudio-2.5?

Generate spoken audio from scripts, UI copy, or agent responses via StepFun TTS for demos, accessibility, podcasts, or in-app voice.

Who is it for?

Developers adding Chinese or Japanese contextual TTS to Claude Code agents, game voice batches, or accessibility demos with StepFun APIs.

Skip if: Developers needing English-only TTS, offline synthesis, or transcription—use stepfun-asr or another provider instead.

When should I use this skill?

User mentions StepFun TTS, stepaudio-2.5-tts, 语音合成, voice_label migration, or batch game/app voice generation.

What you get

MP3 audio files, batch voice-line directories, migration notes, and censorship-skip logs from StepFun synthesis runs.

  • mp3 audio files
  • batch voice directories
  • censorship skip logs

By the numbers

  • instruction parameter limited to 200 characters
  • 1000-character hard cap on TTS input text
  • bundled references cover API, migration, and known issues

Files

SKILL.mdMarkdownGitHub ↗

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 the stepfun-asr skill — 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:

1. stepaudio-2.5-tts rejects voice_label (the step-tts-2 way). Emotion/prosody now goes through instruction (natural-language description, ≤200 chars) and inline () parentheses inside the text itself. 2. Censorship is stricter — anything containing 死 / 消失 / sensitive political terms returns censorship_block. Your rewrite options are in references/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...ScriptKey detail
Synthesize 1–500 char Chinese with emotionscripts/tts_generate.pyUse instruction for mood, () for inline prosody
Synthesize long text (500–1000 char)scripts/tts_generate.py1000 char is the hard cap; split at semantic boundaries above that
Batch-generate game/app voice linesscripts/tts_generate.py --batch <jsonl>Handle censorship_block fallback individually
A/B compare two TTS modelsscripts/ab_compare.shCompares duration/size across two directories
Migrate from step-tts-2see references/migration_from_v2.mdvoice_label.emotioninstruction 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-2stepaudio-2.5-tts: read references/migration_from_v2.md end-to-end before touching code. It has the INSTRUCTION_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 neutral
  • instruction: "耳语声,气声很重,几乎听不清" — produces audible whisper/breath
  • input: "你好(停顿一下)我是蕾格(轻声)今天(加重)的天气真不错。" — inline directives all respected

What `stepaudio-2.5-tts` will NOT acceptvoice_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 responseActual causeFix
"voice_label is not supported for v2 models"Sent voice_label to stepaudio-2.5-ttsRemove voice_label; put the same intent into instruction as natural language
"The content you provided or machine outputted is blocked." type: censorship_blockSensitive 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 exceededSplit 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-tts is ~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)

1. 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. 2. 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. 3. 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 emits voice_label.

Pricing (verified 2026-04-23, volatile)

  • stepaudio-2.5-tts contextual 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.

Related skills

How it compares

Pick stepfun-tts for Chinese/Japanese contextual StepFun speech; use fal-audio or other providers when you need music, SFX, or English-first fal.ai audio endpoints.

FAQ

Does stepfun-tts still accept voice_label?

stepfun-tts targets stepaudio-2.5-tts, which rejects voice_label with a v2-model error. stepfun-tts maps emotion and prosody into the instruction parameter and inline () directives instead of step-tts-2 label tags.

What is the StepFun TTS input limit?

stepfun-tts documents a 1000-character hard cap on stepaudio-2.5-tts input. For longer scripts, split at semantic boundaries and run tts_generate.py per chunk or via JSONL batch mode.

How does stepfun-tts authenticate to StepFun?

stepfun-tts reads STEPFUN_API_KEY from the environment or api_key from CLAUDE_PLUGIN_DATA config.json. The skill requires a Normal StepFun API key, not a Plan key restricted to text models.

Generative Mediallmautomation

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.