curl -X POST "https://api.destined.ai/v1/tts/synthesize" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"speaker_id": "abc123-def456",
"text": "Hello, this is a test of the Destined Voice API."
}'
const result = await client.ttsGeneration.synthesizeSpeechV1TtsSynthesizePost({
speakerId: "abc123-def456",
text: "Hello, this is a test of the Destined Voice API.",
});
console.log(result.audioUrl);
{
"audio_url": "https://voice.s3.amazonaws.com/audio/gen_abc123.wav",
"duration_seconds": 3.2,
"characters_used": 47
}
{
"detail": "Text exceeds maximum length of 2000 characters"
}
{
"detail": "Speaker not found"
}
{
"detail": "Character quota exceeded for this billing period"
}
TTS Generation
Synthesize Speech
Generate speech audio from text
POST
/
v1
/
tts
/
synthesize
curl -X POST "https://api.destined.ai/v1/tts/synthesize" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"speaker_id": "abc123-def456",
"text": "Hello, this is a test of the Destined Voice API."
}'
const result = await client.ttsGeneration.synthesizeSpeechV1TtsSynthesizePost({
speakerId: "abc123-def456",
text: "Hello, this is a test of the Destined Voice API.",
});
console.log(result.audioUrl);
{
"audio_url": "https://voice.s3.amazonaws.com/audio/gen_abc123.wav",
"duration_seconds": 3.2,
"characters_used": 47
}
{
"detail": "Text exceeds maximum length of 2000 characters"
}
{
"detail": "Speaker not found"
}
{
"detail": "Character quota exceeded for this billing period"
}
Request Body
string
required
ID of the speaker to use for synthesis
string
required
Text to convert to speech (max 2000 characters)
Response
string
required
URL to the generated audio file (WAV format)
number
required
Duration of the generated audio
integer
required
Number of characters consumed
curl -X POST "https://api.destined.ai/v1/tts/synthesize" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"speaker_id": "abc123-def456",
"text": "Hello, this is a test of the Destined Voice API."
}'
const result = await client.ttsGeneration.synthesizeSpeechV1TtsSynthesizePost({
speakerId: "abc123-def456",
text: "Hello, this is a test of the Destined Voice API.",
});
console.log(result.audioUrl);
{
"audio_url": "https://voice.s3.amazonaws.com/audio/gen_abc123.wav",
"duration_seconds": 3.2,
"characters_used": 47
}
{
"detail": "Text exceeds maximum length of 2000 characters"
}
{
"detail": "Speaker not found"
}
{
"detail": "Character quota exceeded for this billing period"
}