Text to Speech
Convert plain text into natural-sounding speech in various formats.
Endpoint
POST https://api.voiceasy.ai/v1/tts
Request Body
{
"text": "Hello, world",
"voice_id": "en-female-1",
"language": "en-US",
"format": "mp3",
"sample_rate": 44100,
"tone_id": "friendly",
"speed": 1.0,
"pitch": 0
}voice_id: choose a base voice.tone_id: optional tone/style to apply.format:mp3|wav|ogg.sample_rate: e.g. 44100 or 48000.
Response
Binary audio stream in requested format.
Content-Type: audio/mpeg
Example
curl -X POST https://api.voiceasy.ai/v1/tts -H "Authorization: Bearer $VOICEASY_API_KEY" -H "Content-Type": "application/json" -d '{ "text": "Voiceasy demo", "voice_id": "en-female-1", "format": "mp3" }' -o speech.mp3