Use Volcengine (ByteDance) Text-to-Speech API to synthesize speech from text.
- Convert text to speech using Volcengine TTS API
- Generate audio files with different voices
- Adjust speech speed, volume, and format
This skill calls the Volcengine TTS API to synthesize text into audio. It supports:
- Multiple voice types (male/female, different styles)
- Adjustable speed (0.1-2.0)
- Adjustable volume (0.5-2.0)
- Multiple formats (mp3/wav/ogg)
- Copy
config.example.jsontoconfig.json - Fill in your Volcengine credentials:
appid: Your application IDaccess_token: Your access token
- Optionally customize default settings
Important: config.json contains sensitive data and is excluded from git.
Call the tts.py script with text and optional parameters:
python3 tts.py "你好,很高兴认识你" \
--voice zh_male_aojiaobazong_emo_v2_mars_bigtts \
--speed 1.0 \
--volume 1.0 \
--format mp3 \
--output output.mp3Returns JSON with:
success: true/falsefile: absolute path to generated audioduration_ms: audio duration in millisecondsvoice: voice type usedtext: input text
zh_male_aojiaobazong_emo_v2_mars_bigtts- Male, authoritativezh_female_xiaohe_uranus_bigtts- Female, gentleBV001_streaming- Generic female (free)BV002_streaming- Generic male (free)
See full list: https://www.volcengine.com/docs/6561/1257544
- Missing config: Returns error message
- API errors: Returns error code and message
- Network issues: Timeout after 30 seconds
- Text length limit: 1024 bytes (recommend <300 characters)
- Some voices require authorization in Volcengine console
- Generated files are saved in current directory unless
--outputspecified