Generate speech audio via SiliconFlow Text-to-Speech API. Converts text to MP3/WAV/Opus/PCM using fnlp/MOSS-TTSD-v0.5 voices and SILICONFLOW_API_KEY.
68
83%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Generate narration audio from text using SiliconFlow Text-to-Speech API.
Use this skill when:
.mp3, .wav, .opus, or .pcmDo NOT set env vars inline (for example, SILICONFLOW_API_KEY=... python3 ...). The env var is already in the system environment; inline assignments break the exec permission check.
# Basic Chinese narration, saved under ./tmp/sf-tts-<ts>/speech.mp3
python3 ./skills/siliconflow-tts/scripts/tts.py --text "大家好,欢迎来到今天的视频。"
# Read text from a file
python3 ./skills/siliconflow-tts/scripts/tts.py \
--text-file ./scripts/script.txt \
--out-dir ./assets/audio
# Fragment workflow: read tts_requirement.md, extract voiceover/voice/speed,
# and output speech.mp3 + speech.json to ./fragments/01-hook/artifacts/
python3 ./skills/siliconflow-tts/scripts/tts.py ./fragments/01-hook/ --overwrite
# Select voice, format, and exact output path
python3 ./skills/siliconflow-tts/scripts/tts.py \
--text "This is a demo voiceover." \
--voice "fnlp/MOSS-TTSD-v0.5:benjamin" \
--format wav \
--sample-rate 44100 \
--output ./assets/audio/demo.wav| Flag | Default | Description |
|---|---|---|
fragment_dir | — | Optional fragment directory under fragments/; when set, reads tts_requirement.md and defaults output to artifacts/speech.<format> |
--text | — | Text to synthesize. Required unless --text-file or fragment_dir is set |
--text-file | — | UTF-8 text file to synthesize. Must be relative and under scripts, assets, tmp, output_videos, or fragments |
--model | fnlp/MOSS-TTSD-v0.5 | SiliconFlow TTS model |
--voice | fnlp/MOSS-TTSD-v0.5:benjamin | Voice ID |
--format | mp3 | Audio format: mp3, opus, wav, pcm |
--max-tokens | — | Optional maximum output tokens |
--sample-rate | — | Optional sample rate. mp3: 32000/44100; opus: 48000; wav/pcm: 8000/16000/24000/32000/44100 |
--stream / --no-stream | --no-stream | Request streaming or non-streaming response |
--speed | — | Optional speech speed, range 0.25–4.0 |
--gain | — | Optional audio gain, range -10–10 |
--output | — | Exact output file path under assets/audio, tmp, output_videos, or fragments |
--out-dir | ./tmp/sf-tts-<ts> | Output directory under assets/audio, tmp, output_videos, or fragments when --output is not set |
--overwrite | off | Overwrite existing output audio/metadata files |
--no-asr-check | off | Skip ASR self-check after TTS generation |
| Voice ID | Notes |
|---|---|
fnlp/MOSS-TTSD-v0.5:benjamin | 幽默男声,语速较慢,推荐 |
fnlp/MOSS-TTSD-v0.5:charles | 激昂男声,适合广告 |
fnlp/MOSS-TTSD-v0.5:claire | 清澈女声,推荐 |
fnlp/MOSS-TTSD-v0.5:david | 清脆男声 |
fnlp/MOSS-TTSD-v0.5:diana | 可爱女声,娃娃音 |
fnlp/MOSS-TTSD-v0.5 supports spoken dialogue scripts. Use speaker tags when writing multi-speaker dialogue:
[S1]Hello, how are you today?[S2]I'm doing great, thanks for asking!speech.<format> or the path set by --outputspeech.json beside the audio file, containing:
duration: audio duration in seconds (via ffprobe)model, voice, format, text_chars, audio_bytes, file etc.When used in the content-producer fragment workflow, pass the fragment directory directly. The script reads tts_requirement.md, extracts the ## 配音文案 / ## Voiceover Text section, reads voice/speed settings, and writes directly to the fragment's artifacts/ directory.
For tts_requirement.md, the script skips markdown headings, comments, and voice settings when synthesizing audio.
After generating audio, the script automatically runs an ASR self-check (unless --no-asr-check is set):
TeleAI/TeleSpeechASR by default)PASS or WARN; does not abort on failureThe ASR check calls /audio/transcriptions with multipart form fields file and model, matching SiliconFlow's transcription API. It requires SILICONFLOW_API_KEY; if not set, the check is silently skipped.
| Variable | Description |
|---|---|
SILICONFLOW_API_KEY | Your SiliconFlow API key (required) |
SILICONFLOW_API_BASE | Optional API base override, default https://api.siliconflow.cn/v1 |
SILICONFLOW_ASR_MODEL | Optional ASR model override, default TeleAI/TeleSpeechASR |
bcef823
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.