menu logo

API/TTS/Enqueue

Queue up a text for TTS processing.

  1. Upload a text and receive a text ID
  2. Poll the status endpoint with the text ID to get processing results Get text processing status

Authentication

All API requests require an API key to be included in the headers:

Authorization: Bearer [access-key]

Endpoint

POST https://infer.intron.health/tts/v1/enqueue

Request Body JSON

Field Type Description Required Options Default
text String the text to process yes
voice_accent String Accent for the speech voice yes
  • afrikaans
  • akan
  • amharic
  • arabic
  • bajju
  • bekwarra
  • benin
  • bette
  • chichewa
  • ebira
  • eggon
  • epie
  • estako
  • french
  • fulani
  • ga
  • gerawa
  • hausa
  • ibibio
  • idoma
  • igala
  • igbo
  • ijaw
  • isindebele
  • isoko
  • kanuri
  • kinyarwanda
  • luganda
  • nupe
  • nyandang
  • ogbia
  • ogoni
  • pidgin
  • sepedi
  • sesotho
  • shona
  • siswati
  • swahili
  • tiv
  • tswana
  • twi
  • urhobo
  • xhosa
  • yoruba
  • zulu
voice_gender String yes male | female

Basic request and response sample

                    
                        curl --location 'https://infer.intron.health/tts/v1/enqueue' \
                        --header 'Content-Type: application/json' \
                        --header 'Authorization: Bearer api-key' \
                        --data '{
                            "text":"hello world",
                            "voice_accent":"swahili",
                            "voice_gender":"female"
                        }'
                    
                
                    
                        import requests

                        url = "https://infer.intron.health/tts/v1/enqueue"

                        payload = {
                            "text":"hello world",
                            "voice_accent":"swahili",
                            "voice_gender":"female"
                        }
                        headers = {
                            "Authorization": "Bearer api-key"
                        }

                        response = requests.request("POST", url, headers=headers, json=payload)

                        print(response.json)
                    
                
                    
                        const requestOptions = {
                            method: "POST",
                            headers: {
                                'Authorization': 'Bearer api-Key'
                            },
                            body: JSON.stringify(
                                {
                                    "text":"hello world",
                                    "voice_accent":"swahili",
                                    "voice_gender":"female"
                                }
                            )
                        };
                            
                        fetch("https://infer.intron.health/tts/v1/enqueue", requestOptions)
                        .then((response) => response.text())
                        .then((result) => console.log(result))
                        .catch((error) => console.error(error));
                    
                
                    
                        {
                            "data": {
                                "text_id": "12a9767f-b865-4404-91d0-a65d4cdt78fs"
                            },
                            "message": "tts text queued for processing",
                            "status": "Ok"
                        }
                    
                
                    
                        {
                            "data": {
                                "audio_duration_in_seconds": 3,
                                "audio_path": "http://myaudio.wav",
                                "processing_status": "TTS_TEXT_AUDIO_GENERATED"
                            },
                            "message": "text status found",
                            "status": "Ok"
                        }
                    
                

Quotas and Limits

  • Minimum character count: 50
  • Maximum character count: 250
  • Rate limit: 30 requests per minute