Installation

clawhub install lilei0311/siliconflow-tts-gen

Summary

Text-to-Speech using SiliconFlow API with CosyVoice2 model. Supports 8 preset voices, multiple languages, and Chinese dialects.

SKILL.md

SiliconFlow TTS Generation Skill

Text-to-Speech using SiliconFlow API with CosyVoice2 model. Supports 8 preset voices, multiple languages, and Chinese dialects.

Features

  • πŸŽ™οΈ 8 Preset Voices: 4 male + 4 female voices
  • 🌍 Multilingual: Chinese, English, Japanese, Korean
  • πŸ—£οΈ Chinese Dialects: Cantonese, Sichuan, Shanghai, Tianjin, Wuhan
  • ⚑ Ultra Low Latency: 150ms first packet delay
  • 🎡 Voice Cloning: 3-second rapid voice cloning
  • πŸ’Ύ Auto Download: Saves audio files locally

Requirements

  • Environment Variable: SILICONFLOW_API_KEY
  • Optional Config File: ~/.openclaw/openclaw.json (for auto-detect)

Installation

bash
npx clawhub install siliconflow-tts-gen

Configuration

Set your SiliconFlow API key:

bash
export SILICONFLOW_API_KEY="your-api-key"

Usage

List Available Voices

bash
python3 scripts/generate.py --list-voices

Generate Speech

bash
# Basic usage (default voice: alex)
python3 scripts/generate.py "δ½ ε₯½οΌŒδΈ–η•Œ"

# Specify voice
python3 scripts/generate.py "Hello World" --voice bella

# Adjust speed
python3 scripts/generate.py "δ½ ε₯½" --voice claire --speed 0.9

# Save to file
python3 scripts/generate.py "ζ¬’θΏŽζ”Άε¬" --output welcome.mp3

# Change format
python3 scripts/generate.py "Hello" --format wav

Available Voices

Male Voices

IDNameCharacteristic
alex沉稳男声Mature and steady
benjaminδ½Žζ²‰η”·ε£°Deep and low
charles磁性男声Magnetic
david欒快男声Cheerful

Female Voices

IDNameCharacteristic
anna沉稳ε₯³ε£°Mature and elegant
bellaζΏ€ζƒ…ε₯³ε£°Passionate
claireζΈ©ζŸ”ε₯³ε£°Gentle and kind
dianaζ¬’εΏ«ε₯³ε£°Sweet and happy

Parameters

ParameterTypeDefaultRangeDescription
--voicestringalex-Voice ID
--speedfloat1.00.25-4.0Speech speed
--formatstringmp3mp3/opus/wav/pcmOutput format
--outputstringoutput.mp3-Output file path

Security Notes

  • This skill requires an API key to call SiliconFlow services
  • The script reads ~/.openclaw/openclaw.json only to auto-detect API keys
  • No sensitive data is transmitted except to api.siliconflow.cn
  • Review the code at scripts/generate.py before providing credentials

Author

MaxStorm Team

License

MIT

Recommended skills

Browse all β†’

Related guides

Hand-picked reading to help you choose, install, and use agent skills.