Skip to content

TTS Synthesis

Basics

  • Base URL: https://api.ticos.cn
  • Synthesize audio: POST /tts
  • List voices: GET /tts

1. Synthesize audio (POST /tts)

Headers

  • Content-Type: application/json

Request fields

  • text (required): text to synthesize
  • voice (optional): voice identifier
  • volume_ratio (optional): volume ratio (default 50)
  • speed_ratio (optional): speaking speed ratio (default 50)
  • pitch_ratio (optional): pitch ratio (default 50)

Request example

{
"voice": "zh_male_jingqiangkanye_moon_bigtts",
"text": "Hello, this is an example.",
"volume_ratio": 50,
"speed_ratio": 50,
"pitch_ratio": 50
}

Success response

  • 200 OK
  • Content-Type: audio/wav
  • WAV audio bytes as response body

Error responses

  • 400 Bad Request: missing required fields or invalid JSON
  • 500 Internal Server Error: server-side processing error

Curl example

curl --location 'https://api.ticos.cn/tts' \
--header 'Content-Type: application/json' \
--data-raw '{
"voice": "zh_male_jingqiangkanye_moon_bigtts",
"text": "Hello, this is an example.",
"volume_ratio": 50,
"speed_ratio": 50,
"pitch_ratio": 50
}'

2. List available voices (GET /tts)

Common query parameters

  • language: e.g. chinese, english
  • gender: male / female
  • name: partial match by name
  • provider: e.g. baidu, bytedance, aliyun
  • tags: tag filter, supports comma-separated values
  • all: true returns full fields; default false
  • skip: pagination offset (default 0)
  • top: page size (default 10)

Response example

{
"code": 0,
"message": "Success",
"data": {
"speakers": [
{
"name": "Voice Name",
"voice": "voice_id"
}
],
"speakers_count": 10,
"total_speakers_count": 500
}
}

Curl examples

# Top 5 Chinese voices
curl "https://api.ticos.cn/tts?language=chinese&skip=0&top=5"
# All male voices with full fields
curl "https://api.ticos.cn/tts?gender=male&all=true"
# Combined filters: Bytedance + Chinese + male
curl "https://api.ticos.cn/tts?provider=bytedance&language=chinese&gender=male"