Skip to main content

Convert Text to Speech

POST 

/tts

Converts text to natural-sounding speech and returns a Google Cloud Storage URL to the audio file.

Request Body

FieldTypeRequiredDescription
textstringYesText to convert (1-5000 chars)
languagestringNoenglish, hindi, nepali
voiceGenderstringNomale or female
voiceNamestringNoSpecific voice (see /voices)
modelstringNoTTS model to use

Response

Returns a JSON object containing the Google Cloud Storage URL to the generated WAV audio file along with metadata about the conversion.

Example Usage

curl -X POST "https://api.example.com/ai/api/v2/tts" \
-H "Authorization: your-user-uuid" \
-H "Content-Type: application/json" \
-d '{
"text": "Welcome to our service!",
"language": "english",
"voiceName": "Kore"
}'

Request

Responses

Text successfully converted to speech