Text to Speech (Stream)
POST
https://api.async.ai/text_to_speech/streaming
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.async.ai/text_to_speech/streaming' \
--header 'x-api-key: <api-key>' \
--header 'version: v1' \
--header 'Content-Type: application/json' \
--data-raw '{
"model_id": "asyncflow_v2.0",
"transcript": "Hello, world!",
"voice": {
"mode": "id",
"id": "e0f39dc4-f691-4e78-bba5-5c636692cc04"
},
"output_format": {
"container": "raw",
"encoding": "pcm_f32le",
"sample_rate": 44100
}
}'
Response Response Example
200 - Success
This endpoint returns an octet stream of the audio.
Request
Header Params
x-api-key
string
required
Example:
<api-key>
version
string
required
Example:
v1
Body Params application/json