Docs
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.

POSThttps://voice.patientdesk.ai/v1/audio/speech
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.wav

Request body

inputstringrequired
The text to speak. Up to 5000 characters. Longer text is split at clause boundaries and spoken in order.
modelstring
Default alania-v1. GET /v1/alania/models lists what is available.
voicestring
Default 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.
streamboolean
Default false. When true the audio is sent as it is generated: the first byte arrives in ~310 ms instead of after the whole sentence.
temperaturenumber
Default 0.30. Raising it varies the delivery, at the cost of drifting from the locked voice identity.
seedinteger
When given, the same text produces the same audio. For tests and reproducible examples.

Response

HTTP
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-idstring
The request id; include it in support requests.
x-modelstring
The 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-charactersnumber
Characters this request billed to your account.
x-audio-secondsnumber
Length of the audio produced. Absent when streaming: it is not known until the end.
x-queue-wait-msnumber
Time the request waited for a generation slot. The first thing to look at when a caller says the API is slow.

Voices

GEThttps://voice.patientdesk.ai/v1/voices
JSON
{
  "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.
GEThttps://voice.patientdesk.ai/health/alania
JSON
{ "status": "ok", "service": "tts", "model": "alania-v1",
  "voice": { "id": "alania-v1", "f0_hz": [125.1, 137.5] }, "limits_degraded": false }