Voices
Generate speech audio from text
Changed onSynthesize speech audio from text using a specified voice. Returns a URL to the generated audio file along with duration and optional word-level timestamps.
post/v1/audio/text_to_speech
Request
- Base URLhttps://api.heygen.com
- URLhttps://api.heygen.com/v1/audio/text_to_speech
- Auth
- API key in header x-api-key
- or HTTP bearer
Request body
Response
Successful response
Example response
{
"data": {
"audio_url": "https://files.heygen.ai/audio/tts_abc123.mp3",
"duration": 4.5,
"request_id": "req_abc123",
"word_timestamps": [
{
"word": "Hello",
"end": 0.35
}
]
}
}Changes
- info
endpoint added
- info