| name | doubao-tts |
| version | 2.1.0 |
| description | Use Doubao speech synthesis (Volcengine TTS) to convert text to audio files. Triggers when user mentions "Doubao TTS", "Doubao speech synthesis", "doubao tts", "Volcengine TTS", "volcengine tts", "speech synthesis", "text to speech", "TTS", "generate audio", "read text aloud", or any scenario requiring Doubao/Volcengine speech synthesis API. |
Doubao TTS Skill (V3)
Convert text to audio files using Volcengine Doubao speech synthesis V3 HTTP SSE unidirectional streaming API.
Get API Key (recommended, new console)
- Login to Volcengine Console
- Go to Doubao Speech -> Speech Synthesis Large Model -> App Management
- Create app (or use existing app)
- Get API Key from API Key Management page -> corresponds to
DOUBAO_TTS_API_KEY
If service is not yet activated, first enable it on the Speech Synthesis Large Model page.
Legacy Console (AppID + Token)
Can be obtained at the bottom of legacy console app details page:
- APP ID ->
DOUBAO_TTS_APPID
- Access Token ->
DOUBAO_TTS_TOKEN
Environment Variables
| Variable | Description | Recommended |
|---|
DOUBAO_TTS_API_KEY | API Key (new console, X-Api-Key) | |
DOUBAO_TTS_APPID | AppID (legacy console, X-Api-App-Id) | |
DOUBAO_TTS_TOKEN | Access Token (legacy console, X-Api-Access-Key) | |
DOUBAO_TTS_RESOURCE_ID | Resource ID, leave empty for default seed-tts-2.0 | |
Check if configured:
[ -n "$DOUBAO_TTS_API_KEY" ] && echo "API_KEY: set" || echo "API_KEY: not set"
[ -n "$DOUBAO_TTS_APPID" ] && echo "APPID: set" || echo "APPID: not set"
[ -n "$DOUBAO_TTS_TOKEN" ] && echo "TOKEN: set" || echo "TOKEN: not set"
When not configured, instruct user to set (prefer API Key):
Set DOUBAO_TTS_API_KEY | Set DOUBAO_TTS_RESOURCE_ID
Legacy Console (AppID + Token):
Set DOUBAO_TTS_APPID | Set DOUBAO_TTS_TOKEN
Usage
Call script: /var/minis/skills/doubao-tts/scripts/tts.py
uv run --script --cache-dir /root/.cache/uv \
/var/minis/skills/doubao-tts/scripts/tts.py \
--text "Hello, welcome to Doubao speech synthesis" \
--output /var/minis/workspace/output.mp3
uv run --script --cache-dir /root/.cache/uv \
/var/minis/skills/doubao-tts/scripts/tts.py \
--text "The weather is nice today" \
--speaker zh_female_cancan_uranus_bigtts \
--speech-rate 10 \
--output /var/minis/workspace/output.mp3
uv run --script --cache-dir /root/.cache/uv \
/var/minis/skills/doubao-tts/scripts/tts.py \
--text "Hello! Nice to meet you." \
--speaker en_female_dacey_uranus_bigtts \
--output /var/minis/workspace/output.mp3
API Details
- Endpoint:
https://openspeech.bytedance.com/api/v3/tts/unidirectional/sse (SSE streaming)
- Authentication (choose one):
- New console: Header
X-Api-Key (API Key)
- Legacy console: Header
X-Api-App-Id + X-Api-Access-Key (AppID + Token)
- Resource ID: specifies the model version to use (see table below)
- Usage return: script includes
X-Control-Require-Usage-Tokens-Return: text_words by default, returns billed character count (text_words) on completion
| Resource ID | Description |
|---|
seed-tts-1.0 | Doubao speech synthesis model 1.0 character edition (default, compatible with all BV*_streaming voices) |
seed-tts-1.0-concurr | Doubao speech synthesis model 1.0 concurrent edition |
seed-tts-2.0 | Doubao speech synthesis model 2.0 (only supports 2.0 voices) |
Parameter Details
| Parameter | Description |
|---|
--text | Text to synthesize (required) |
--output | Output file path (required) |
--api-key | API Key (new console, takes precedence over APPID/TOKEN) |
--appid | AppID (legacy console) |
--token | Access Token (legacy console) |
--speaker | Voice, default zh_female_shuangkuaisisi_uranus_bigtts (Shuangkuai Sisi 2.0) |
--encoding | Format: mp3/pcm/ogg_opus, default mp3 |
--speech-rate | Speech rate [-50, 100], 0 is default, 100 is 2x speed |
--loudness | Loudness [-50, 100], 0 is default |
--sample-rate | Sample rate, default 24000 |
--emotion | Emotion (e.g. happy/sad/angry/narrator etc.) |
--emotion-scale | Emotion scale [1, 5] (use with --emotion) |
--resource-id | Resource ID (overrides environment variable) |
--json | Output results in JSON format |
Common Voice Reference
Doubao Speech Synthesis Model 2.0 (seed-tts-2.0, recommended)
| speaker | Name | Scenario |
|---|
zh_female_shuangkuaisisi_uranus_bigtts | Shuangkuai Sisi 2.0 Default | General |
zh_female_cancan_uranus_bigtts | ZhiXing CanCan 2.0 | Role-play |
zh_female_tianmeixiaoyuan_uranus_bigtts | Sweet XiaoYuan 2.0 | General |
zh_female_vv_uranus_bigtts | Vivi 2.0 | General, CN/JP/ID/MX-ES, dialects Sichuan-Shaanxi-Northeast |
zh_female_xiaohe_uranus_bigtts | XiaoHe 2.0 | General |
zh_male_m191_uranus_bigtts | YunZhou 2.0 | General |
zh_male_taocheng_uranus_bigtts | XiaoTian 2.0 | General |
zh_female_kefunvsheng_uranus_bigtts | Warm Female Voice 2.0 | Customer service |
en_female_dacey_uranus_bigtts | Dacey | Multilingual (EN) |
en_male_tim_uranus_bigtts | Tim | Multilingual (EN) |
Doubao Speech Synthesis Model 1.0 (seed-tts-1.0, needs --resource-id change)
| speaker | Name | Scenario |
|---|
BV700_streaming | CanCan | General, supports 22 emotions |
BV001_streaming | General Female Voice | General |
BV002_streaming | General Male Voice | General |
BV701_streaming | QingCang | Audio reading |
BV503_streaming | Lively Female-Ariana | English |
1.0 and 2.0 voices cannot be mixed, seed-tts-2.0 only supports *_uranus_bigtts voices
Common Emotion Values
pleased / sorry / happy / sad / angry / scared / surprised / hate / tear / narrator / storytelling
Complete Workflow
- Check if environment variables are configured (prefer
DOUBAO_TTS_API_KEY, then DOUBAO_TTS_APPID + DOUBAO_TTS_TOKEN)
- Call
tts.py script to generate audio to /var/minis/workspace/
- Return as
minis://workspace/xxx.mp3 link for user to click and play