Documentation Index Fetch the complete documentation index at: https://docs.destined.ai/llms.txt
Use this file to discover all available pages before exploring further.
1. Get Your API Key
Sign up at destined.ai and get your API key from the dashboard.
2. Install the SDK
npm install @destined-ai/voice
3. Initialize the Client
import { SDK } from "@destined-ai/voice" ;
const client = new SDK ({
bearerToken: process . env . DESTINED_API_KEY ,
});
4. Browse Speakers
Find the perfect voice for your use case:
// List female speakers from the US
const speakers = await client . speakers . listSpeakersV1SpeakersGet ({
gender: "Female" ,
region: "United States" ,
limit: 10 ,
});
console . log ( speakers );
// [
// { id: "abc123", gender: "Female", region: "Georgia", accent: "Southern" },
// { id: "def456", gender: "Female", region: "California", accent: "General American" },
// ...
// ]
5. Generate Speech
const result = await client . ttsGeneration . synthesizeSpeechV1TtsSynthesizePost ({
speakerId: "abc123" ,
text: "Hello! This is a test of the Destined Voice API." ,
});
console . log ( result . audioUrl );
// https://voice.s3.amazonaws.com/audio/xxx.wav
6. Track Batch Jobs
For multiple generations, use batch processing:
// Start a batch job
const job = await client . ttsGeneration . batchSynthesizeV1TtsBatchPost ({
items: [
{ speakerId: "abc123" , text: "First sentence." },
{ speakerId: "def456" , text: "Second sentence." },
{ speakerId: "ghi789" , text: "Third sentence." },
],
});
console . log ( job . jobId );
// "job_abc123"
// Check job status
const status = await client . jobs . getJobV1JobsJobIdGet ({
jobId: job . jobId ,
});
console . log ( status );
// { status: "completed", progress: 100, results: [...] }
Next Steps
Authentication Learn about API authentication
Speakers Understand speaker demographics
TTS Generation Deep dive into synthesis options
API Reference Full endpoint documentation