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 synthesizevoice(optional): voice identifiervolume_ratio(optional): volume ratio (default50)speed_ratio(optional): speaking speed ratio (default50)pitch_ratio(optional): pitch ratio (default50)
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 OKContent-Type: audio/wav- WAV audio bytes as response body
Error responses
400 Bad Request: missing required fields or invalid JSON500 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,englishgender:male/femalename: partial match by nameprovider: e.g.baidu,bytedance,aliyuntags: tag filter, supports comma-separated valuesall:truereturns full fields; defaultfalseskip: pagination offset (default0)top: page size (default10)
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 voicescurl "https://api.ticos.cn/tts?language=chinese&skip=0&top=5"
# All male voices with full fieldscurl "https://api.ticos.cn/tts?gender=male&all=true"
# Combined filters: Bytedance + Chinese + malecurl "https://api.ticos.cn/tts?provider=bytedance&language=chinese&gender=male"