stepfun-tts

Generate Chinese and Japanese speech with StepFun's stepaudio-2.5-tts contextual TTS API.

1.4k|216|Updated Oct 22, 2025
One-click install
npx skills add https://github.com/daymade/claude-code-skills --skill stepfun-tts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stepfun-tts
Source: https://github.com/daymade/claude-code-skills/tree/main/daymade-audio/stepfun-tts
Command: npx skills add https://github.com/daymade/claude-code-skills --skill stepfun-tts

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

StepFun's stepaudio-2.5-tts model replaced the old voice_label emotion tags with natural-language instruction parameters and inline () prosody directives, breaking existing step-tts-2 integrations and introducing stricter content censorship that blocks lines containing words like 死 or 消失. This Skill provides tested scripts and migration playbooks so you can synthesize emotional speech, batch-generate voice lines, and migrate legacy projects without hitting undocumented API errors.

Core Features & Use Cases

  • Contextual Speech Synthesis: Generate Chinese/Japanese audio with global instruction tone directives (≤200 chars) and inline () parentheses for mid-sentence pauses, whispers, and emotion pivots.
  • Batch Voice Line Generation: Process JSONL files of game/app dialogue with per-line censorship handling that logs blocked IDs and continues instead of aborting.
  • Migration Playbook: Complete step-tts-2 → stepaudio-2.5-tts guide with emotion-tag-to-instruction rewrite tables, non-destructive A/B directory strategy, and duration trade-off data (~20% longer output).
  • Use Case: You maintain a visual novel with 30 Chinese voice lines on step-tts-2. Use this Skill to rewrite emotion tags as natural-language instructions, regenerate the corpus into a parallel zh_v25/ directory, handle the 2 censored lines with fallback, and A/B compare durations before switching production.

Quick Start

Ask the AI to synthesize a Chinese voice line with a specific emotion using the stepfun-tts skill, for example: generate an mp3 of "你好,我是蕾格" with a warm, encouraging tone.

Frequently Asked Questions about stepfun-tts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add emotion to StepFun stepaudio-2.5-tts speech synthesis?

Pass a natural-language `instruction` parameter (up to 200 chars) describing the performance, such as "克制的悲伤,语气低沉柔弱". For mid-sentence control, embed `()` directives like (停顿一下) or (轻声) directly in the input text; they steer delivery without being read aloud.

How to migrate from step-tts-2 voice_label to stepaudio-2.5-tts?

Remove `voice_label` entirely—stepaudio-2.5-tts rejects it with a "not supported for v2 models" error. Rewrite each emotion tag as a descriptive `instruction` sentence, regenerate audio into a parallel directory for A/B testing, and keep step-tts-2 as fallback for censored lines.

Why does stepaudio-2.5-tts return censorship_block errors?

The model applies stricter content filtering than step-tts-2, blocking text containing 死, 消失, or politically sensitive terms—even in negations like "我没有死". Rewrite the phrase, fall back to step-tts-2 for that line, or request a whitelist from StepFun if blockage exceeds 5%.

What is the maximum text length for StepFun TTS API?

The stepaudio-2.5-tts endpoint enforces a hard 1000-character limit per request and returns a 400 error above it. Split longer text at sentence or semantic boundaries before sending; never truncate mid-sentence.

Why does my StepFun API key fail on audio endpoints?

StepFun "Plan" subscription keys are restricted to text models and silently fail on audio endpoints with auth-shaped 4xx errors. Use a "Normal" API key from the StepFun console, which works for both TTS and ASR endpoints.

Does stepaudio-2.5-tts change audio duration compared to step-tts-2?

Yes, output runs about 20% longer overall because the model adds breaths and pauses; very short lines can double in duration (+107% observed). Re-tune any auto-advance or animation timing in your app after migrating.