Skip to main content
POST
/
api
/
v1
/
get_speech
Generate Speech
curl --request POST \
  --url https://api.tts.timepay.ai/api/v1/get_speech \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "text": "Hello, welcome to Vox.",
  "voice_id": "Ogbs15oBevLzXsUuTtA1",
  "language": "en",
  "addWavHeader": true,
  "sample_rate": 24000,
  "speed": 1.5
}
'
"UklGRiQAAABXQVZFZm10IBAAAAABAAEAIlYA..."

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
text
string
required

The text to convert to speech.

Example:

"Hello, welcome to Vox."

voice_id
enum<string>
required

The specific voice_id to use for synthesis.

Available options:
Kartik -> Ogbs15oBevLzXsUuTtA1,
Rahul -> Owbs15oBevLzXsUurdA_,
Nisha -> PAbs15oBevLzXsUu4dCi,
Tulsi -> PQbt15oBevLzXsUuNtD3,
Seema -> Pgbt15oBevLzXsUubdA6
Example:

"Ogbs15oBevLzXsUuTtA1"

language
enum<string>
default:en

ISO language code.

Available options:
en,
hi,
mr,
ta,
te,
gu,
kn,
ml,
bn,
pa,
od,
as
Example:

"en"

addWavHeader
boolean
default:true

If true, adds a WAV header to the stream for immediate playback.

sample_rate
number
default:24000

Audio sample rate. The supported sample rates are 8000, 16000 and 24000 Hz.

Example:

24000

speed
number
default:1

The speed is a float varies from 0.5 to 2.0, where 1.0 is the normal speed.

Example:

1.5

Response

200 - audio/wav

Streams audio/wav data. Headers include X-Request-ID.

The response is of type file.