Create Async TTS Task
Create an async long-text TTS task, supporting direct text input or text file for synthesis.
Authorization
- Security Scheme Type: http
- HTTP Authorization Scheme: Bearer API_key,Used to verify account information, can be viewed in Metered & Packs > API Key Management .
Request Header
The media type of the request body, please set it toapplication/jsonto ensure the correct format of the requested data.
Available options:application/json
Request Bodyapplication/json
modelstringRequired
textstring
text_file_idlong
voice_settingobjectRequired
voice_setting.voice_idstring
voice_setting.speedinteger
voice_setting.volumeinteger
voice_setting.pitchinteger
voice_setting.brightinteger
voice_setting.emotionstring
voice_setting.languagestring
- `cn_female_shasha`: `zh` (Chinese), `ja` (Japanese), `ko` (Korean), `th` (Thai), `vi` (Vietnamese), `id` (Indonesian), `km` (Khmer)
- `cn_female_jiajia`: `zh` (Chinese), `id` (Indonesian), `ms` (Malay), `my` (Burmese), `lo` (Lao)
- `cn_male_chenyu`: `zh` (Chinese), `tl` (Filipino)
- `en_male_johnny`, `en_female_jane`: `en` (English)
- Other system voices: `zh` (Chinese)
voice_setting.dialectstring
- `yueyu` (Cantonese)
- `sichuan` (Sichuan dialect)
audio_settingobject
audio_setting.audio_sample_rateinteger
audio_setting.formatstring
audio_setting.channelinteger
pronunciation_dictobject
pronunciation_dict.tonestring[ ]
Response Body Structure
task_idstring
file_idlong
usage_charactersinteger
base_respobject
base_resp.status_codeinteger
base_resp.status_msgstring
Voice Parameter Support
Support for speed, volume, pitch, and brightness by voice ID, language, and dialect:
| Voice ID | Language | Dialect | speed | volume | pitch | bright |
|---|---|---|---|---|---|---|
| cn_female_xiaodi_warm | zh | default | ✓ | ✓ | ✓ | ✓ |
| cn_male_chenyu | zh | default | ✗ | ✓ | ✓ | ✓ |
| cn_male_chenyu | zh | yueyu | ✓ | ✓ | ✓ | ✓ |
| cn_male_chenyu | zh | sichuan | ✓ | ✓ | ✓ | ✓ |
| cn_male_chenyu | tl | default | ✗ | ✗ | ✗ | ✗ |
| en_male_johnny | en | default | ✓ | ✓ | ✓ | ✓ |
| en_female_jane | en | default | ✓ | ✓ | ✓ | ✓ |
| cn_male_chenyu_robot | zh | default | ✗ | ✓ | ✓ | ✓ |
| cn_male_chenyu_elderly | zh | default | ✗ | ✓ | ✓ | ✓ |
| cn_male_chenyu_steady | zh | default | ✗ | ✓ | ✓ | ✓ |
| cn_male_chenyu_fluent | zh | default | ✗ | ✓ | ✓ | ✓ |
| cn_female_shasha | zh, ja, ko, th, vi, id | default | ✗ | ✓ | ✓ | ✓ |
| cn_female_shasha | km | default | ✗ | ✗ | ✗ | ✗ |
| cn_female_jiajia | zh | default | ✗ | ✓ | ✓ | ✓ |
| cn_female_jiajia | id, ms, my, lo | default | ✗ | ✗ | ✗ | ✗ |
| cn_female_ruolin | zh | default | ✗ | ✓ | ✓ | ✓ |
| cn_male_jingming | zh | default | ✗ | ✗ | ✗ | ✗ |
| cn_female_shasha_intellectual | zh | default | ✗ | ✗ | ✗ | ✗ |
| cn_female_jiajia_intellectual | zh | default | ✗ | ✗ | ✗ | ✗ |
Custom Pronunciation Rules
Use the following tags to control pronunciation and segmentation. Tag support varies by voice; see the support table below.
| Category | Tag | Description | Example | Effect |
|---|---|---|---|---|
| Number | <value> | Pronounce the digit string as a numeric value | 这是第<value>110</value>会议室 | 这是第一百一十会议室 |
| <code> | Pronounce the digit string as a code (“1” as “一”) | 这是第<code>110</code>会议室 | 这是一一零会议室 | |
| <tel> | Pronounce the digit string as a phone number (“1” as “幺”) | 会议室分机号为<tel>110</tel> | 会议室分机号为幺幺零 | |
| Phonetics | <py> | Force the engine to pronounce Chinese characters with the specified pinyin | 搜索结果为<py>wei2</py>空<py>kong1</py> | 搜索结果为(wei2)空(kong1) |
| <pname> | Correctly pronounce polyphonic characters used as surnames | 播放<pname>单田芳</pname>的评书 | 播放单(shan4)田芳的评书 | |
| Segmentation | <word> | Force word segmentation to fix incorrect splits, e.g. distinguish “(乒乓球)(拍卖)(完了)” from “(乒乓)(球拍)(卖完了)” | <word>乒乓</word><word>球拍</word><word>卖完了</word> | (乒乓)(球拍)(卖完了) |
| <phrase> | Force phrase breaks (longer pause than word) to fix incorrect phrasing, e.g. distinguish “(爸爸亲了我妈妈)(也亲了我)” from “(爸爸亲了我)(妈妈也亲了我)” | <phrase>爸爸亲了我</phrase><phrase>妈妈也亲了我</phrase> | (爸爸亲了我) (妈妈也亲了我) | |
| English | <letter> | Spell the marked English text letter by letter | 世界卫生组织的英文缩写<letter>WHO</letter> | 世界卫生组织的英文缩写是(W)(H)(O) |
| Other | <mute> | Insert a pause of the specified duration (milliseconds) | 请您再说一遍<mute>300</mute>或说取消 | 请您再说一遍(pause 300ms)或说取消 |
| <sub> | Replace the marked text with the alias attribute value when speaking | 气压的测量单位是<sub alias="毫米汞柱">mmHg</sub> | 气压的测量单位是毫米汞柱 |
Tag Support
| Voice ID | Language | Dialect | Supported Tags |
|---|---|---|---|
| cn_female_xiaodi_warm | zh | default | All supported |
| cn_male_chenyu | zh | default | Partial (value、code、tel、py、letter、sub、word) |
| cn_male_chenyu | zh | yueyu | All supported |
| cn_male_chenyu | zh | sichuan | All supported |
| cn_male_chenyu | tl | default | Not supported |
| en_male_johnny | en | default | All supported |
| en_female_jane | en | default | All supported |
| cn_male_chenyu_robot | zh | default | Partial (value、code、tel、py、letter、sub、word) |
| cn_male_chenyu_elderly | zh | default | Partial (value、code、tel、py、letter、sub、word) |
| cn_male_chenyu_steady | zh | default | Partial (value、code、tel、py、letter、sub、word) |
| cn_male_chenyu_fluent | zh | default | Partial (value、code、tel、py、letter、sub、word) |
| cn_female_shasha | zh, ja, ko, th, vi, id | default | Partial (value、code、tel、py、letter、sub、word) |
| cn_female_shasha | km | default | Not supported |
| cn_female_jiajia | zh | default | Partial (value、code、tel、py、letter、sub、word) |
| cn_female_jiajia | id, ms, my, lo | default | Not supported |
| cn_female_ruolin | zh | default | Partial (value、code、tel、py、letter、sub、word) |
| cn_male_jingming | zh | default | Not supported |
| cn_female_shasha_intellectual | zh | default | Not supported |
| cn_female_jiajia_intellectual | zh | default | Not supported |
