AsyncFlow API
  1. Text-to-Speech
AsyncFlow API
  • Welcome to AsyncFlow API
  • Get Started
  • API Reference
    • API Status
      • API Status Check
    • Text-to-Speech
      • Text to Speech (WebSocket)
      • Text to Speech
        POST
      • Text to Speech with Word Timestamps
        POST
      • Text to Speech (Stream)
        POST
    • Voice Management
      • Clone Voice
      • List Voices
      • Get Voice
      • Update Voice
      • Delete Voice
      • Get Voice Preview
  • Advanced Guides
    • Custom Pronunciations
      • Embedding Custom Phonemes in Async TTS API
      • Pronouncing digits one‑by‑one
  • Integrations
    • Integrate with Twilio
    • Pipecat Integration
  1. Text-to-Speech

Text to Speech with Word Timestamps

POST
https://api.async.ai/text_to_speech/with_timestamps
Generates speech using provided text and voice of your choice and returns audio and word timestamps.
Request Request Example
Shell
JavaScript
Java
Swift
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
    }
}'
Response Response Example
200 - Success
{
    "audio_base64": "...",
    "alignment": {
        "words": [
            "Welcome",
            "to",
            "Async"
        ],
        "word_start_times_milliseconds": [
            0,
            871,
            923
        ],
        "word_end_times_milliseconds": [
            871,
            900,
            1637
        ]
    }
}

Request

Header Params

Body Params application/json

Examples

Responses

🟢200Success
application/json
Body

🟠429TOO_MANY_CONCURRENT_REQUESTS
🟠429RATE_LIMIT_EXCEEDED
🟠429USAGE_LIMIT_EXCEEDED
🟠401INVALID_API_KEY
🟠404VOICE_NOT_FOUND
🟠404VERSION_NOT_FOUND
🟠400INVALID_LANGUAGE
🟠400FORMAT_NOT_RECOGNIZED
🔴500Server Error
Modified at 2025-08-26 13:33:26
Previous
Text to Speech
Next
Text to Speech (Stream)
Built with