Audio models
Text to speech
Turn text into natural speech. The response is raw audio bytes, streamed so playback can start early.
Endpoint
/v1/audio/speech
Billed in
Characters of input
Formats
mp3 · opus · aac · flac · wav · pcm
Voices
GET /v1/audio/voices
Speed
0.25 – 4.0
Mode
Synchronous, chunked
Billed per character, not per token
Speech is measured in characters of the input field. That makes cost trivially predictable before you call — input.length is the whole calculation.
Calling one#
curl https://api.xkiro.com/v1/audio/speech \
-H "Authorization: Bearer $XKIRO_API_KEY" \
-H "Content-Type: application/json" \
-o speech.mp3 \
-d '{
"model": "xkiro-voice",
"input": "Your order has shipped and will arrive on Tuesday.",
"voice": "mexican-female"
}'Full parameters, including the xKiro extensions for pitch, volume and emotion, are on Text to speech.
Voices#
GET /v1/audio/voices is public and cached for five minutes, so a settings screen can call it on load. Filter by language to narrow a long list. See List voices.
Let people hear a voice before choosing
Generate one short sample per voice and cache the audio. Choosing from a list of names is guesswork; choosing from three seconds of audio is not.
Getting natural speech#
- Punctuation drives pacing. Adding commas and full stops does more for naturalness than adjusting
speed. - Spell out what should be read aloud."Dr.", "St." and bare numerals are read inconsistently; write the words you want heard.
- Split long text into paragraphs and request them separately. Audio arrives sooner, and a failure costs one paragraph rather than the whole chapter.
Limits#
Concurrent requests
Speech is synchronous and holds an upstream connection for its whole duration, so accounts have a cap on simultaneous speech calls — a separate limit from requests per minute, because that one cannot see how many calls are still open. Exceeding it returns 429; wait for one to finish rather than retrying immediately.
Caching
Cache generated audio keyed by the exact input, voice and settings. Speech for unchanged text is the easiest cost in the whole API to eliminate.
Speech to text is not part of this API today. If you need transcription, it is not something xKiro currently offers.
