v1

latestOpenAPI 3.0.1MIT2026-07-26104203277.0 KB

Generates a streamed audio file from a text string.

From the user's perspective, this is a standard request. In the response, we include specific headers: 'Transfer-Encoding' is set to 'chunked' to enable streaming, 'Connection' is set to 'keep-alive' to maintain the connection, and 'Content-Type' is set to 'audio/wav' to indicate the media type. These headers allow the client to stream audio data from the server in real time. Important Note: after collecting the chunks, you need to add the wav header manually to the data. If you wish to get a wav header, please use the Generate TTS File Data API.

post/v1/realtime/tts-stream

Request body

textstring required

The text to be generated as an aduio file.

speakerstring required

The speaker (voice) name. Pick a voice that matches the chosen dialect — see the dialect field for voice examples per dialect. You can also pass the UUID of a custom cloned voice, but you must first preload it via the Preload Cloned Voice endpoint.

dialect'pls' | 'egy' | 'syr' | 'irq' | 'jor' | 'leb' | 'ksa' | 'uae' | 'bah' | 'qat' | 'kuw' | 'oma' | 'msa' | 'ar-sa' | 'en'

The dialect to synthesize, identified by its country/region code. Voice examples per dialect:

  • pls (Palestinian) — Amjad, Layan
  • egy (Egyptian) — Mariam, Samir
  • syr (Syrian) — Dalal, Mais
  • irq (Iraqi) — Lyali, Fatma
  • jor (Jordanian) — Lana, Jasem
  • leb (Lebanese) — Carla, Majd
  • ksa (Saudi) — Hiba, Fahd
  • uae (Emirati) — Salma, Dima
  • bah (Bahraini) — Mazen, Ruba
  • qat (Qatari) — Deema, Faisal
  • kuw (Kuwaiti) — Mai, Hatem
  • oma (Omani) — Aisha, Jaber
  • msa (Modern Standard Arabic / Fusha) — Salem, Tamim
  • ar-sa (Arabic – Gulf) — Khalid, Rahma
  • en (English) — Emma, James
mulawboolean

Whether to use 'Mu-Law' algorithm in voice signal processing or not.

expressivenessnumber

Controls how expressive the generated speech sounds. 0 is flat and monotone, 1 is the natural default, and 2 is highly expressive.

Example request

{
  "text": "مرحباً بكم في جميعاً في همسة!",
  "speaker": "Amjad",
  "dialect": "pls",
  "expressiveness": 1
}

Response

Streamed Successful Response - Chunked