Text-to-Speech
Text To Speech
Generate speech from text using the specified voice model. Supports emotion, volume, pitch, and tempo customization.
First, list all available voice models using the GET /v3/voices endpoint, then use the voice_id from the response to generate speech with this endpoint. Each voice model has its own unique characteristics. See Listing all voices for available voices.
post/v1/text-to-speech
Request
- Base URL: https://api.typecast.ai
- URL: https://api.typecast.ai/v1/text-to-speech
- Auth: API key in header X-API-KEY
Request body
Example request
{
"text": "Everything is so incredibly perfect that I feel like I'm dreaming.",
"output": {
"volume": 100,
"audio_tempo": 1,
"target_lufs": -14,
"audio_format": "wav",
"remove_silence_ms": 100
},
"prompt": {
"next_text": "I am literally bursting with happiness and I never want this feeling to end!",
"emotion_type": "smart",
"previous_text": "I feel like I'm walking on air and I just want to scream with joy!"
},
"language": "eng",
"voice_id": "tc_60e5426de8b95f1d3000d7b5"
}Response
Success - Returns audio file
Changes
No recorded changes to this operation across all 1 revision of this API.