curl --location --request POST 'https://api.async.ai/text_to_speech/with_timestamps' \
--header 'x-api-key: <api-key>' \
--header 'version: v1' \
--header 'Content-Type: application/json' \
--data-raw '{
"model_id": "asyncflow_v2.0",
"transcript": "Welcome to Async",
"voice": {
"mode": "id",
"id": "e0f39dc4-f691-4e78-bba5-5c636692cc04"
},
"output_format": {
"container": "raw",
"encoding": "pcm_f32le",
"sample_rate": 44100
}
}'
{
"audio_base64": "...",
"alignment": {
"words": [
"Welcome",
"to",
"Async"
],
"word_start_times_milliseconds": [
0,
871,
923
],
"word_end_times_milliseconds": [
871,
900,
1637
]
}
}