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 (Stream)

POST
https://api.async.ai/text_to_speech/streaming
Generates speech using provided text and voice of your choice and returns audio in a stream.
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": "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
This endpoint returns an octet stream of the audio.

Request

Header Params

Body Params application/json

Examples

Responses

🟢200Success
application/octet-stream
If quota is exceeded during the stream the following bytes would be received: b"--ERROR:QUOTA_EXCEEDED--"
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-07-16 06:29:12
Previous
Text to Speech with Word Timestamps
Next
Clone Voice
Built with