Skip to content

Terminal TTS Control

Basics

  • Base URL: https://api.ticos.cn
  • Endpoint: POST /terminal/tts

Headers & auth

  • Content-Type: application/json
  • Authorization: Bearer {terminal_secret}

Request fields

  • text (required): text to speak
  • voice (optional): voice ID, default zh_male_jingqiangkanye_moon_bigtts
  • enable_interrupt (optional): interrupt current playback, default false
  • volume_ratio (optional): volume ratio (0-100)
  • speed_ratio (optional): speed ratio (0-100)
  • pitch_ratio (optional): pitch ratio (0-100)

Request example

{
"voice": "zh_male_jingqiangkanye_moon_bigtts",
"text": "Hello, terminal TTS test.",
"enable_interrupt": true,
"volume_ratio": 60,
"speed_ratio": 45,
"pitch_ratio": 55
}

Curl example

curl --location 'https://api.ticos.cn/terminal/tts' \
--header 'Authorization: Bearer ts_xxx_terminal_secret' \
--header 'Content-Type: application/json' \
--data-raw '{
"text": "Hello, terminal TTS test.",
"enable_interrupt": true
}'

Common status codes

  • 200 OK: success
  • 400 Bad Request: invalid params or terminal offline
  • 401 Unauthorized: authentication failed
  • 500 Internal Server Error: server error