跳转到内容

终端 TTS 控制

  • Base URL: https://stardust.ticos.cn
  • Endpoint: POST /terminal/tts
  • Content-Type: application/json
  • Authorization: Bearer {terminal_secret}
  • text(必填):要合成的文本
  • voice(可选):音色,默认 zh_male_jingqiangkanye_moon_bigtts
  • enable_interrupt(可选):是否中断当前发声,默认 false
  • volume_ratio(可选):音量比例(0-100)
  • speed_ratio(可选):语速比例(0-100)
  • pitch_ratio(可选):音调比例(0-100)
{
"voice": "zh_male_jingqiangkanye_moon_bigtts",
"text": "你好,终端TTS测试。",
"enable_interrupt": true,
"volume_ratio": 60,
"speed_ratio": 45,
"pitch_ratio": 55
}
curl --location 'https://stardust.ticos.cn/terminal/tts' \
--header 'Authorization: Bearer ts_xxx_terminal_secret' \
--header 'Content-Type: application/json' \
--data-raw '{
"text": "你好,终端TTS测试。",
"enable_interrupt": true
}'
  • 200 OK:成功
  • 400 Bad Request:参数错误或设备不在线
  • 401 Unauthorized:鉴权失败
  • 500 Internal Server Error:服务器错误