Terminal TTS Control
Basics
- Base URL:
https://api.ticos.cn - Endpoint:
POST /terminal/tts
Headers & auth
Content-Type: application/jsonAuthorization: Bearer {terminal_secret}
Request fields
text(required): text to speakvoice(optional): voice ID, defaultzh_male_jingqiangkanye_moon_bigttsenable_interrupt(optional): interrupt current playback, defaultfalsevolume_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: success400 Bad Request: invalid params or terminal offline401 Unauthorized: authentication failed500 Internal Server Error: server error