doubao-open-tts
3
总安装量
3
周安装量
#59103
全站排名
安装命令
npx skills add https://github.com/xdrshjr/jr-openclaw-skills --skill doubao-open-tts
Agent 安装分布
gemini-cli
3
claude-code
3
codex
3
opencode
3
qoder
2
replit
2
Skill 文档
Doubao Open TTS
Text-to-Speech (TTS) service using Doubao (Volcano Engine) API V1 interface to convert text into natural-sounding speech.
Features
- ðï¸ 200+ Voice Options – Default: Shiny (ç¿ç¿) for general scenarios
- ð Multiple Audio Formats – Supports mp3, pcm, wav
- â¡ Adjustable Parameters – Speed and volume control
- ð¦ Dual Interface – Command-line tool + Python API
- ð¯ Voice Categorization – Browse voices by category
Installation
cd skills/doubao-open-tts
pip install -r requirements.txt
Configuration
Method 1: Environment Variables
export VOLCANO_TTS_APPID="your_app_id"
export VOLCANO_TTS_ACCESS_TOKEN="your_access_token"
export VOLCANO_TTS_SECRET_KEY="your_secret_key"
export VOLCANO_TTS_VOICE_TYPE="zh_female_cancan_mars_bigtts" # Optional: set default voice
Method 2: .env File
Copy .env.example.txt to .env and fill in your credentials:
cp .env.example.txt .env
# Edit the .env file with your credentials
Usage
Command Line
# Basic usage (uses default voice: Shiny)
python scripts/tts.py "Hello, this is a test of Doubao text-to-speech service"
# Specify output file and format
python scripts/tts.py "Welcome to use TTS" -o output.mp3 -e mp3
# Read text from file
python scripts/tts.py -f input.txt -o output.mp3
# Adjust parameters
python scripts/tts.py "Custom voice" --speed 1.2 --volume 0.8 -v zh_female_cancan_mars_bigtts
# List all available voices
python scripts/tts.py --list-voices
# List voices by category
python scripts/tts.py --list-voices --category "General-Multilingual"
# Use different cluster
python scripts/tts.py "Hello" --cluster volcano_tts
# Enable debug mode
python scripts/tts.py "Test" --debug
Python API
from scripts.tts import VolcanoTTS, VOICE_TYPES, VOICE_CATEGORIES
# Initialize client
tts = VolcanoTTS(
app_id="your_app_id",
access_token="your_access_token",
secret_key="your_secret_key",
voice_type="zh_female_cancan_mars_bigtts" # Optional: set default voice
)
# List available voices
print("All voices:", tts.list_voices())
print("General voices:", tts.list_voices("General-Normal"))
# Change voice
tts.set_voice("zh_male_xudong_conversation_wvae_bigtts") # Set to "Happy Xiaodong"
# Synthesize speech
output_path = tts.synthesize(
text="Hello, this is Doubao text-to-speech",
voice_type="zh_female_cancan_mars_bigtts", # Optional: override default
encoding="mp3",
cluster="volcano_tts",
speed=1.0,
volume=1.0,
output_file="output.mp3"
)
print(f"Audio saved to: {output_path}")
Available Voice Types
General Category (éç¨åºæ¯)
| Voice Name | Voice Type | Description |
|---|---|---|
| Shiny (ç¿ç¿) | zh_female_cancan_mars_bigtts | Cheerful female voice, suitable for various scenarios |
| Lively Xiaoning (活泼å°å®) | zh_female_wanwanxiaohe_mars_bigtts | Lively and playful female voice |
| Xiaomo (å°è«) | zh_male_xiaomo_mars_bigtts | Warm and friendly male voice |
| Xiaoqi (å°çª) | zh_female_xiaoqi_mars_bigtts | Professional female host |
| AISuper (AIè¶ çº§å¤§æµå©) | zh_female_gaolanfenqu_mars_bigtts | Super fluent female voice |
Emotional Category (æ æè¶ èªç¶äººå£°)
| Voice Name | Voice Type | Description |
|---|---|---|
| Happy Xiaodong (å¼å¿å°ä¸) | zh_male_xudong_conversation_wvae_bigtts | Cheerful and sunny male voice |
| Sad Xiaoliang (æ²ä¼¤å°äº®) | zh_male_sadxiaoliang_sad_mars_bigtts | Melancholic male voice |
| Neutral Xiaoshuai (䏿§å°å¸ ) | zh_male_zhongxingxiaoshuai_speech_mars_bigtts | Neutral tone male voice |
| Happy Xiaomei (å¼å¿å°ç¾) | zh_female_gaoxiaomei_happy_mars_bigtts | Cheerful female voice |
| Angry Xiaotian (æ¤æå°ç) | zh_female_shengmoxiaotian_angry_mars_bigtts | Angry tone female voice |
Intelligent Customer Service (æºè½å®¢æ)
| Voice Name | Voice Type | Description |
|---|---|---|
| Customer Service Xiaowen (客æå°æ) | zh_male_jingyixiaowen_mars_bigtts | Professional customer service male voice |
| Customer Service Xiaorou (客æå°æ) | zh_female_xiaorou_customer_service_mars_bigtts | Gentle customer service female voice |
Documentary (纪å½ç)
| Voice Name | Voice Type | Description |
|---|---|---|
| Classic Xiaoming (ç»å ¸å°æ) | zh_male_jingdianxiaoming_mars_bigtts | Classic documentary male voice |
| Narration Xiaoran (æç½å°ç¶) | zh_female_xiaoran_narration_mars_bigtts | Documentary narration female voice |
Audio Novels (æå£°å°è¯´)
| Voice Name | Voice Type | Description |
|---|---|---|
| Storytelling Xiaotao (è®²ä¹¦å°æ¡) | zh_female_jiangshuxiaotao_mars_bigtts | Storytelling female voice |
| Warm Xiaochen (温æå°æ¨) | zh_male_wennuanxiaochen_mars_bigtts | Warm novel reading male voice |
News Broadcasting (æ°é»ææ¥)
| Voice Name | Voice Type | Description |
|---|---|---|
| News Xiaozhi (æ°é»å°å¿) | zh_male_xinwenxiaozhi_mars_bigtts | Standard news broadcasting male voice |
| News Xiaojing (æ°é»å°é) | zh_female_xinwenxiaojing_mars_bigtts | Professional news broadcasting female voice |
| Cantonese News (ç²¤è¯æ°é») | zh_male_yueyuxiaowu_mars_bigtts | Cantonese news male voice |
| Amoy News (é½åè¯æ°é») | zh_female_minnanxiaoyue_mars_bigtts | Amoy dialect news female voice |
General-Multilingual (éç¨å¤è¯è¨)
| Voice Name | Voice Type | Description |
|---|---|---|
| English Gentle (è±è¯ç·å£°-æå) | en_male_mars_bigtts | Gentle English male voice |
| English Lively (è±è¯å¥³å£°-活泼) | en_female_mars_bigtts | Lively English female voice |
| Japanese Male (æ¥è¯ç·å£°) | ja_male_mars_bigtts | Japanese male voice |
| Japanese Female (æ¥è¯å¥³å£°) | ja_female_mars_bigtts | Japanese female voice |
| Korean Male (é©è¯ç·å£°) | ko_male_mars_bigtts | Korean male voice |
| Korean Female (é©è¯å¥³å£°) | ko_female_mars_bigtts | Korean female voice |
| French Male (æ³è¯ç·å£°) | fr_male_mars_bigtts | French male voice |
| French Female (æ³è¯å¥³å£°) | fr_female_mars_bigtts | French female voice |
| German Male (å¾·è¯ç·å£°) | de_male_mars_bigtts | German male voice |
| German Female (å¾·è¯å¥³å£°) | de_female_mars_bigtts | German female voice |
| Spanish Male (西ççè¯ç·å£°) | es_male_mars_bigtts | Spanish male voice |
| Spanish Female (西ççè¯å¥³å£°) | es_female_mars_bigtts | Spanish female voice |
| Russian Male (ä¿è¯ç·å£°) | ru_male_mars_bigtts | Russian male voice |
| Russian Female (ä¿è¯å¥³å£°) | ru_female_mars_bigtts | Russian female voice |
| Portuguese Male (è¡èçè¯ç·å£°) | pt_male_mars_bigtts | Portuguese male voice |
| Portuguese Female (è¡èçè¯å¥³å£°) | pt_female_mars_bigtts | Portuguese female voice |
| Italian Male (æå¤§å©è¯ç·å£°) | it_male_mars_bigtts | Italian male voice |
| Italian Female (æå¤§å©è¯å¥³å£°) | it_female_mars_bigtts | Italian female voice |
| Arabic Male (é¿æä¼¯è¯ç·å£°) | ar_male_mars_bigtts | Arabic male voice |
| Arabic Female (é¿æä¼¯è¯å¥³å£°) | ar_female_mars_bigtts | Arabic female voice |
| Hindi Male (å°å°è¯ç·å£°) | hi_male_mars_bigtts | Hindi male voice |
| Hindi Female (å°å°è¯å¥³å£°) | hi_female_mars_bigtts | Hindi female voice |
| Thai Male (æ³°è¯ç·å£°) | th_male_mars_bigtts | Thai male voice |
| Thai Female (æ³°è¯å¥³å£°) | th_female_mars_bigtts | Thai female voice |
| Vietnamese Male (è¶åè¯ç·å£°) | vi_male_mars_bigtts | Vietnamese male voice |
| Vietnamese Female (è¶åè¯å¥³å£°) | vi_female_mars_bigtts | Vietnamese female voice |
| Indonesian Male (å°å°¼è¯ç·å£°) | id_male_mars_bigtts | Indonesian male voice |
| Indonesian Female (å°å°¼è¯å¥³å£°) | id_female_mars_bigtts | Indonesian female voice |
| Malay Male (马æ¥è¯ç·å£°) | ms_male_mars_bigtts | Malay male voice |
| Malay Female (马æ¥è¯å¥³å£°) | ms_female_mars_bigtts | Malay female voice |
| Filipino Male (è²å¾å®¾è¯ç·å£°) | fil_male_mars_bigtts | Filipino male voice |
| Filipino Female (è²å¾å®¾è¯å¥³å£°) | fil_female_mars_bigtts | Filipino female voice |
| Turkish Male (åè³å ¶è¯ç·å£°) | tr_male_mars_bigtts | Turkish male voice |
| Turkish Female (åè³å ¶è¯å¥³å£°) | tr_female_mars_bigtts | Turkish female voice |
| Dutch Male (è·å °è¯ç·å£°) | nl_male_mars_bigtts | Dutch male voice |
| Dutch Female (è·å °è¯å¥³å£°) | nl_female_mars_bigtts | Dutch female voice |
| Polish Male (æ³¢å °è¯ç·å£°) | pl_male_mars_bigtts | Polish male voice |
| Polish Female (æ³¢å °è¯å¥³å£°) | pl_female_mars_bigtts | Polish female voice |
| Ukrainian Male (ä¹å å °è¯ç·å£°) | uk_male_mars_bigtts | Ukrainian male voice |
| Ukrainian Female (ä¹å å °è¯å¥³å£°) | uk_female_mars_bigtts | Ukrainian female voice |
| Hebrew Male (å¸ä¼¯æ¥è¯ç·å£°) | he_male_mars_bigtts | Hebrew male voice |
| Hebrew Female (å¸ä¼¯æ¥è¯å¥³å£°) | he_female_mars_bigtts | Hebrew female voice |
Dialect Category (æ¹è¨åºæ¯)
| Voice Name | Voice Type | Description |
|---|---|---|
| Cantonese Male (粤è¯ç·å£°) | zh_male_yueyuzhongxing_mars_bigtts | Cantonese male voice |
| Cantonese Female (粤è¯å¥³å£°) | zh_female_yueyumars_mars_bigtts | Cantonese female voice |
| Amoy Male (é½åè¯ç·å£°) | zh_male_taiminmars_mars_bigtts | Amoy dialect male voice |
| Amoy Female (é½åè¯å¥³å£°) | zh_female_minnanAImars_mars_bigtts | Amoy dialect female voice |
| Sichuanese (åå·è¯) | zh_male_sichuanmars_mars_bigtts | Sichuan dialect male voice |
| Shanghainese (䏿µ·è¯) | zh_female_shanghaihuamars_mars_bigtts | Shanghainese female voice |
| Wuhan Dialect (æ¦æ±è¯) | zh_male_wuhanmars_mars_bigtts | Wuhan dialect male voice |
| Hunan Dialect (æ¹åè¯) | zh_male_hunanmars_mars_bigtts | Hunan dialect male voice |
| Henan Dialect (æ²³åè¯) | zh_female_henanmars_mars_bigtts | Henan dialect female voice |
| Northeastern Dialect (ä¸åè¯) | zh_male_dongbeimars_mars_bigtts | Northeastern dialect male voice |
| Shandong Dialect (å±±ä¸è¯) | zh_male_shandongmars_mars_bigtts | Shandong dialect male voice |
| Tianjin Dialect (天津è¯) | zh_female_tianjinmars_mars_bigtts | Tianjin dialect female voice |
Special Categories
| Voice Name | Voice Type | Description |
|---|---|---|
| Audiobook Xiaoyu (æå£°å°äº) | zh_female_xiaoyujingxisanguo_mars_bigtts | Three Kingdoms audiobook voice |
| Animation Xiaohua (卿¼«å°è±) | zh_female_xiaohuadongman_mars_bigtts | Anime style voice |
| Rap Xiaoqiang (Rapå°è·) | zh_female_xiaoqiangrap_mars_bigtts | Rap style female voice |
| RAP General (Rap大å°) | zh_male_rapgeneral_mars_bigtts | Rap style male voice |
| Wise Voice (æºæ §ç声é³) | zh_male_jinyumars_mars_bigtts | Wise and mature voice |
| Chattering (å å å¨å¨) | zh_female_laolaodaodao_chat_mars_bigtts | Chatty female voice |
| Talking Beijing (讲è¯å京) | zh_male_jianghuabeijing_speech_mars_bigtts | Beijing accent |
| Host Xiaoyang (主æå°ç¾) | zh_female_xiaoyang_host_mars_bigtts | Streamer host style |
Output
The generated audio file will be saved to the specified output path (default: output.mp3 in current directory).
Notes
- Ensure VOLCANO_TTS_APPID, VOLCANO_TTS_ACCESS_TOKEN, and VOLCANO_TTS_SECRET_KEY environment variables are set
- Supports mp3, pcm, and wav formats (mp3 by default)
- Speed range: 0.8-2.0 (1.0 is normal)
- Volume range: 0.1-3.0 (1.0 is normal)
- Voice types can be viewed using
--list-voices - Different clusters may support different voice types; default cluster is
volcano_tts - For non-Chinese text, use multilingual voices from “General-Multilingual” category