Alania · TTS
Text to speech
Alania speaks Turkish text in one consistent voice. The response streams: playback can start while audio is still being generated.
curl https://voice.patientdesk.ai/v1/audio/speech \
-H "Authorization: Bearer pd_live_..." \
-H "Content-Type: application/json" \
-d '{ "model": "alania-v1",
"input": "Randevunuz yarın saat 14:05 için oluşturuldu.",
"voice": "alania", "response_format": "wav" }' \
--output randevu.wavRequest body
inputstringrequiredThe text to speak. Up to 5000 characters. Longer text is split at clause boundaries and spoken in order.
modelstringDefault
alania-v1. GET /v1/alania/models lists what is available.voicestringDefault
alania. Alania ships one locked voice; GET /v1/voices lists it.response_format"wav" | "pcm" | "mp3" | "opus" | "flac" | "aac"Default
wav (PCM16, 24 kHz, mono). With stream: true, only wav and pcm are valid.streambooleanDefault
false. When true the audio is sent as it is generated: the first byte arrives in ~310 ms instead of after the whole sentence.temperaturenumberDefault 0.30. Raising it varies the delivery, at the cost of drifting from the locked voice identity.
seedintegerWhen given, the same text produces the same audio. For tests and reproducible examples.
Response
HTTP/1.1 200 OK
content-type: audio/wav
x-request-id: 3f9c2b1e7a…
x-model: alania-v1
x-disclosure: ai-generated
x-characters: 44
x-audio-seconds: 3.24
x-queue-wait-ms: 0
<RIFF header, then PCM16 24 kHz mono>Headers
x-request-idstringThe request id; include it in support requests.
x-modelstringThe model that produced the audio.
x-disclosure"ai-generated"Present on every response. Disclosing to your listeners that the audio is AI-generated is your responsibility.
x-charactersnumberCharacters this request billed to your account.
x-audio-secondsnumberLength of the audio produced. Absent when streaming: it is not known until the end.
x-queue-wait-msnumberTime the request waited for a generation slot. The first thing to look at when a caller says the API is slow.
Voices
GET
https://voice.patientdesk.ai/v1/voices{
"object": "list",
"data": [
{
"id": "alania-v1",
"name": "Alania",
"language": "tr-TR",
"model": "alania-v1",
"sample_rate": 24000,
"f0_band_hz": [125.1, 137.5]
}
]
}Alania ships with a single locked voice; every generation is verified against the same voice identity. Additional voices will be listed here.
Health
One host serves both products, so the endpoints that exist on both are named with
/alania on the speech side: /health/alania, /v1/alania/models, /v1/alania/usage. The audio paths are unambiguous and stay as they are.GET
https://voice.patientdesk.ai/health/alania{ "status": "ok", "service": "tts", "model": "alania-v1",
"voice": { "id": "alania-v1", "f0_hz": [125.1, 137.5] }, "limits_degraded": false }