Generates a streamed audio file from a text string.
Changed onFrom 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
- Base URLhttps://api.tryhamsa.com
- URLhttps://api.tryhamsa.com/v1/realtime/tts-stream
- AuthAPI key in header Authorization
Request body
Example request
{
"text": "مرحباً بكم في جميعاً في همسة!",
"speaker": "Amjad",
"dialect": "pls",
"sampleRate": "16k",
"expressiveness": 1
}Response
Streamed Successful Response - Chunked
Changes
- info
added the new optional request property
- info