Speech
List voices
Every voice available for text to speech. 145 voices at the last count, filterable by locale, gender and free-text search.
/v1/audio/voicesPublic — no API key required — and cached for five minutes, so it is safe to call from a settings screen on page load.
curl "https://api.xkiro.com/v1/audio/voices?gender=female&limit=20"{
"total": 145,
"returned": 145,
"voices": [
{
"id": "mexican-female",
"name": "Mexican Female",
"locale": null,
"languageKey": null,
"gender": null,
"isVip": false,
"categories": []
},
{
"id": "female-voice-german",
"name": "Female Voice (German)",
"locale": null,
"languageKey": null,
"gender": null,
"isVip": false,
"categories": []
}
]
}Query parameters#
| Field | Type | Description |
|---|---|---|
locale | string | Exact match on a voice's locale. Many voices carry null here, so this narrows harder than it looks. |
languageKey | string | Exact match on the provider's language key. |
gender | string | Exact match, lowercase — for example female or male. |
isVip | boolean | 1 or true keeps only premium voices; 0 or false keeps only the rest. |
q | string | Substring search across id, name, locale and language key. |
offset | integer | Skip this many voices. |
limit | integer | Return at most this many. total is the count before paging; returned is how many you actually got. |
Unknown parameters are silently ignored
There is no language parameter — sending one returns the entire catalog as if you had filtered nothing. Use locale or languageKey. Check returned against total to confirm a filter actually applied.
Let people hear a voice before they pick one
Generate one short sample per voice with Text to speech and cache the audio. Choosing from a list of names is guesswork; choosing from three seconds of audio is not.
Using a voice#
Pass the id as voice when generating speech. An unknown ID returns 400 rather than silently falling back to a default — a typo cannot ship a product speaking in the wrong voice. (Verified: an unknown ID returns `invalid_request`.)
curl https://api.xkiro.com/v1/audio/speech \
-H "Authorization: Bearer $XKIRO_API_KEY" \
-H "Content-Type: application/json" \
-o out.mp3 \
-d '{
"model": "xkiro-voice",
"voice": "mexican-female",
"input": "Your order has shipped."
}'