跳转到内容

语音合成

  • Base URL: https://stardust.ticos.cn
  • 合成音频: POST /tts
  • 查询音色: GET /tts
  • Content-Type: application/json
  • text(必填):要合成的文本
  • voice(可选):音色标识符
  • volume_ratio(可选):音量比例(默认 50
  • speed_ratio(可选):语速比例(默认 50
  • pitch_ratio(可选):音调比例(默认 50
{
"voice": "zh_male_jingqiangkanye_moon_bigtts",
"text": "你好,这是一个例子文本。",
"volume_ratio": 50,
"speed_ratio": 50,
"pitch_ratio": 50
}
  • 200 OK
  • Content-Type: audio/wav
  • 返回 WAV 音频字节流
  • 400 Bad Request:缺少必填参数或 JSON 非法
  • 500 Internal Server Error:服务器内部错误
curl --location 'https://stardust.ticos.cn/tts' \
--header 'Content-Type: application/json' \
--data-raw '{
"voice": "zh_male_jingqiangkanye_moon_bigtts",
"text": "你好,这是一个例子文本。",
"volume_ratio": 50,
"speed_ratio": 50,
"pitch_ratio": 50
}'
  • language:如 chineseenglish
  • gendermale / female
  • name:按名称模糊匹配
  • provider:如 baidubytedancealiyun
  • tags:按标签过滤,可用逗号分隔多个标签
  • alltrue 返回完整字段,默认 false
  • skip:分页偏移(默认 0
  • top:返回条数(默认 10
{
"code": 0,
"message": "Success",
"data": {
"speakers": [
{
"name": "音色名称",
"voice": "音色标识符"
}
],
"speakers_count": 10,
"total_speakers_count": 500
}
}
# 前 5 个中文音色
curl "https://stardust.ticos.cn/tts?language=chinese&skip=0&top=5"
# 所有男性音色(完整字段)
curl "https://stardust.ticos.cn/tts?gender=male&all=true"
# 组合过滤:字节跳动 + 中文 + 男声
curl "https://stardust.ticos.cn/tts?provider=bytedance&language=chinese&gender=male"