Doubao TTS Skill (V3)
Use the Volcengine Doubao Text-to-Speech V3 HTTP SSE unidirectional streaming API to convert text into audio files.
Get an API Key (Recommended, New Console)
- Log in to the Volcengine Console
- Go to Doubao Voice → Text-to-Speech Large Model → Application Management
- Create an application or use an existing one
- On the API Key Management page, get the API Key → corresponding to
DOUBAO_TTS_API_KEY
If you have not enabled the service yet, enable it first on the Text-to-Speech Large Model page.
Legacy Console (AppID + Token)
At the bottom of the application details page in the legacy console, you can find:
- APP ID →
DOUBAO_TTS_APPID
- Access Token →
DOUBAO_TTS_TOKEN
Environment Variables
| Variable Name |
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 blank to use the default seed-tts-2.0 |
|
Check whether they are 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"
If they are not configured, tell the user to set them (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 the script: /var/minis/skills/doubao-tts/scripts/tts.py
# Basic usage
uv run --script --cache-dir /root/.cache/uv \
/var/minis/skills/doubao-tts/scripts/tts.py \
--text "Hello, and welcome to Doubao Text-to-Speech." \
--output /var/minis/workspace/output.mp3
# Specify voice and speech rate
uv run --script --cache-dir /root/.cache/uv \
/var/minis/skills/doubao-tts/scripts/tts.py \
--text "The weather is really nice today." \
--speaker zh_female_cancan_uranus_bigtts \
--speech-rate 10 \
--output /var/minis/workspace/output.mp3
# English
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 Description
- 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 call (see the table below)
- Usage response: The script includes
X-Control-Require-Usage-Tokens-Return: text_words by default, which returns the number of billable characters (text_words) when synthesis ends
| Resource ID |
Description |
seed-tts-1.0 |
Doubao Text-to-Speech Model 1.0 character version (default, compatible with all BV*_streaming voices) |
seed-tts-1.0-concurr |
Doubao Text-to-Speech Model 1.0 concurrency version |
seed-tts-2.0 |
Doubao Text-to-Speech Model 2.0 (supports only 2.0 voices) |
Parameters
| 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], where 0 is the default and 100 is 2x speed |
--loudness |
Volume [-50, 100], where 0 is the default |
--sample-rate |
Sample rate, default 24000 |
--emotion |
Emotion, such as happy/sad/angry/narrator |
--emotion-scale |
Emotion intensity [1, 5] (used with --emotion) |
--resource-id |
Resource ID (overrides the environment variable) |
--json |
Output result in JSON format |
Quick Reference for Common Voices
Doubao Text-to-Speech 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-playing |
zh_female_tianmeixiaoyuan_uranus_bigtts |
Tianmei Xiaoyuan 2.0 |
General |
zh_female_vv_uranus_bigtts |
Vivi 2.0 |
General, Chinese/Japanese/Indonesian/Mexican Spanish, Sichuan/Shaanxi/Northeastern dialects |
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 |
Nuanyang Female Voice 2.0 |
Customer service |
en_female_dacey_uranus_bigtts |
Dacey |
Multilingual (English) |
en_male_tim_uranus_bigtts |
Tim |
Multilingual (English) |
Doubao Text-to-Speech Model 1.0 (seed-tts-1.0, requires changing --resource-id)
| 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 |
Audiobook |
BV503_streaming |
Energetic Female Voice-Ariana |
English |
⚠️ 1.0 and 2.0 voices cannot be mixed. seed-tts-2.0 supports only voices ending in *_uranus_bigtts.
Common Emotion Values
pleased (pleased) / sorry (sorry) / happy (happy) / sad (sad) / angry (angry) / scare (scared) / surprise (surprised) / hate (disgust) / tear (tearful voice) / narrator (narrator) / storytelling (storytelling)
Complete Workflow
- Check whether environment variables are configured (first
DOUBAO_TTS_API_KEY, then DOUBAO_TTS_APPID + DOUBAO_TTS_TOKEN)
- Call the
tts.py script to generate an audio file in /var/minis/workspace/
- Return it to the user as a
minis://workspace/xxx.mp3 link, which they can click to play directly.
1---2name: doubao-tts3description: Use Doubao Text-to-Speech (Volcengine TTS) to convert text into audio files. When a user mentions "Doubao TTS," "Doubao Text-to-Speech," "doubao tts," "Volcengine TTS," "volcengine tts," "speech synthesis," "text-to-speech," "TTS," "generate audio," "read text aloud," or any scenario requiring the Doubao/Volcengine Text-to-Speech API, this skill must be triggered.4---56# Doubao TTS Skill (V3)78Use the Volcengine Doubao Text-to-Speech **V3 HTTP SSE unidirectional streaming API** to convert text into audio files.910## Get an API Key (Recommended, New Console)11121. Log in to the [Volcengine Console](https://console.volcengine.com/speech/app)132. Go to **Doubao Voice → Text-to-Speech Large Model → Application Management**143. Create an application or use an existing one154. On the [API Key Management](https://console.volcengine.com/speech/new/setting/apikeys?projectName=default) page, get the API Key → corresponding to `DOUBAO_TTS_API_KEY`1617> If you have not enabled the service yet, enable it first on the [Text-to-Speech Large Model](https://console.volcengine.com/speech/service/10) page.1819### Legacy Console (AppID + Token)2021At the bottom of the application details page in the legacy console, you can find:22- **APP ID** → `DOUBAO_TTS_APPID`23- **Access Token** → `DOUBAO_TTS_TOKEN`2425## Environment Variables2627| Variable Name | Description | Recommended |28|---|---|---|29| `DOUBAO_TTS_API_KEY` | API Key (new console, `X-Api-Key`) | ✅ |30| `DOUBAO_TTS_APPID` | AppID (legacy console, `X-Api-App-Id`) | |31| `DOUBAO_TTS_TOKEN` | Access Token (legacy console, `X-Api-Access-Key`) | |32| `DOUBAO_TTS_RESOURCE_ID` | Resource ID; leave blank to use the default `seed-tts-2.0` | |3334Check whether they are configured:35```sh36[ -n "$DOUBAO_TTS_API_KEY" ] && echo "API_KEY: set" || echo "API_KEY: not set"37[ -n "$DOUBAO_TTS_APPID" ] && echo "APPID: set" || echo "APPID: not set"38[ -n "$DOUBAO_TTS_TOKEN" ] && echo "TOKEN: set" || echo "TOKEN: not set"39```4041If they are not configured, tell the user to set them (prefer API Key):42[Set DOUBAO_TTS_API_KEY](minis://settings/environments?create_key=DOUBAO_TTS_API_KEY&create_value=) | [Set DOUBAO_TTS_RESOURCE_ID](minis://settings/environments?create_key=DOUBAO_TTS_RESOURCE_ID&create_value=seed-tts-2.0)4344Legacy console (AppID + Token):45[Set DOUBAO_TTS_APPID](minis://settings/environments?create_key=DOUBAO_TTS_APPID&create_value=) | [Set DOUBAO_TTS_TOKEN](minis://settings/environments?create_key=DOUBAO_TTS_TOKEN&create_value=)4647## Usage4849Call the script: `/var/minis/skills/doubao-tts/scripts/tts.py`5051```sh52# Basic usage53uv run --script --cache-dir /root/.cache/uv \54 /var/minis/skills/doubao-tts/scripts/tts.py \55 --text "Hello, and welcome to Doubao Text-to-Speech." \56 --output /var/minis/workspace/output.mp35758# Specify voice and speech rate59uv run --script --cache-dir /root/.cache/uv \60 /var/minis/skills/doubao-tts/scripts/tts.py \61 --text "The weather is really nice today." \62 --speaker zh_female_cancan_uranus_bigtts \63 --speech-rate 10 \64 --output /var/minis/workspace/output.mp36566# English67uv run --script --cache-dir /root/.cache/uv \68 /var/minis/skills/doubao-tts/scripts/tts.py \69 --text "Hello! Nice to meet you." \70 --speaker en_female_dacey_uranus_bigtts \71 --output /var/minis/workspace/output.mp372```7374## API Description7576- **Endpoint**: `https://openspeech.bytedance.com/api/v3/tts/unidirectional/sse` (SSE streaming)77- **Authentication** (choose one):78 - New console: Header `X-Api-Key` (API Key)79 - Legacy console: Header `X-Api-App-Id` + `X-Api-Access-Key` (AppID + Token)80- **Resource ID**: Specifies the model version to call (see the table below)81- **Usage response**: The script includes `X-Control-Require-Usage-Tokens-Return: text_words` by default, which returns the number of billable characters (`text_words`) when synthesis ends8283| Resource ID | Description |84|---|---|85| `seed-tts-1.0` | Doubao Text-to-Speech Model 1.0 character version (default, compatible with all `BV*_streaming` voices) |86| `seed-tts-1.0-concurr` | Doubao Text-to-Speech Model 1.0 concurrency version |87| `seed-tts-2.0` | Doubao Text-to-Speech Model 2.0 (supports only 2.0 voices) |8889## Parameters9091| Parameter | Description |92|---|---|93| `--text` | Text to synthesize (required) |94| `--output` | Output file path (required) |95| `--api-key` | API Key (new console, takes precedence over APPID/TOKEN) |96| `--appid` | AppID (legacy console) |97| `--token` | Access Token (legacy console) |98| `--speaker` | Voice, default `zh_female_shuangkuaisisi_uranus_bigtts` (Shuangkuai Sisi 2.0) |99| `--encoding` | Format: `mp3`/`pcm`/`ogg_opus`, default `mp3` |100| `--speech-rate` | Speech rate [-50, 100], where 0 is the default and 100 is 2x speed |101| `--loudness` | Volume [-50, 100], where 0 is the default |102| `--sample-rate` | Sample rate, default 24000 |103| `--emotion` | Emotion, such as `happy`/`sad`/`angry`/`narrator` |104| `--emotion-scale` | Emotion intensity [1, 5] (used with `--emotion`) |105| `--resource-id` | Resource ID (overrides the environment variable) |106| `--json` | Output result in JSON format |107108## Quick Reference for Common Voices109110### Doubao Text-to-Speech Model 2.0 (`seed-tts-2.0`, recommended)111112| speaker | Name | Scenario |113|---|---|---|114| `zh_female_shuangkuaisisi_uranus_bigtts` | Shuangkuai Sisi 2.0 ⭐ Default | General |115| `zh_female_cancan_uranus_bigtts` | Zhixing Cancan 2.0 | Role-playing |116| `zh_female_tianmeixiaoyuan_uranus_bigtts` | Tianmei Xiaoyuan 2.0 | General |117| `zh_female_vv_uranus_bigtts` | Vivi 2.0 | General, Chinese/Japanese/Indonesian/Mexican Spanish, Sichuan/Shaanxi/Northeastern dialects |118| `zh_female_xiaohe_uranus_bigtts` | Xiaohe 2.0 | General |119| `zh_male_m191_uranus_bigtts` | Yunzhou 2.0 | General |120| `zh_male_taocheng_uranus_bigtts` | Xiaotian 2.0 | General |121| `zh_female_kefunvsheng_uranus_bigtts` | Nuanyang Female Voice 2.0 | Customer service |122| `en_female_dacey_uranus_bigtts` | Dacey | Multilingual (English) |123| `en_male_tim_uranus_bigtts` | Tim | Multilingual (English) |124125### Doubao Text-to-Speech Model 1.0 (`seed-tts-1.0`, requires changing `--resource-id`)126127| speaker | Name | Scenario |128|---|---|---|129| `BV700_streaming` | Cancan | General, supports 22 emotions |130| `BV001_streaming` | General Female Voice | General |131| `BV002_streaming` | General Male Voice | General |132| `BV701_streaming` | Qingcang | Audiobook |133| `BV503_streaming` | Energetic Female Voice-Ariana | English |134135> ⚠️ 1.0 and 2.0 voices cannot be mixed. `seed-tts-2.0` supports only voices ending in `*_uranus_bigtts`.136137## Common Emotion Values138139`pleased` (pleased) / `sorry` (sorry) / `happy` (happy) / `sad` (sad) / `angry` (angry) / `scare` (scared) / `surprise` (surprised) / `hate` (disgust) / `tear` (tearful voice) / `narrator` (narrator) / `storytelling` (storytelling)140141## Complete Workflow1421431. Check whether environment variables are configured (first `DOUBAO_TTS_API_KEY`, then `DOUBAO_TTS_APPID` + `DOUBAO_TTS_TOKEN`)1442. Call the `tts.py` script to generate an audio file in `/var/minis/workspace/`1453. Return it to the user as a `minis://workspace/xxx.mp3` link, which they can click to play directly.