Generate Streamed Text to Speech File Data
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.
Documentation Index
Fetch the complete documentation index at: https://docs.tryhamsa.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token '
Body
The text to be generated as an aduio file.
"مرحباً بكم في جميعاً في همسة!"
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.
"Amjad"
The dialect to synthesize, identified by its country/region code. Voice examples per dialect:
pls(Palestinian) — Amjad, Layanegy(Egyptian) — Mariam, Samirsyr(Syrian) — Dalal, Maisirq(Iraqi) — Lyali, Fatmajor(Jordanian) — Lana, Jasemleb(Lebanese) — Carla, Majdksa(Saudi) — Hiba, Fahduae(Emirati) — Salma, Dimabah(Bahraini) — Mazen, Rubaqat(Qatari) — Deema, Faisalkuw(Kuwaiti) — Mai, Hatemoma(Omani) — Aisha, Jabermsa(Modern Standard Arabic / Fusha) — Salem, Tamimar-sa(Arabic – Gulf) — Khalid, Rahmaen(English) — Emma, James
pls, egy, syr, irq, jor, leb, ksa, uae, bah, qat, kuw, oma, msa, ar-sa, en "pls"
Whether to use 'Mu-Law' algorithm in voice signal processing or not.
false
Response
Streamed Successful Response - Chunked
The response is of type file.