Voice Clone Embeddings
curl --request POST \
--url https://api.vachana.ai/api/v1/tts/voice-clone/embeddings \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-Key-ID: <api-key>' \
--form audio_file='@example-file'import requests
url = "https://api.vachana.ai/api/v1/tts/voice-clone/embeddings"
files = { "audio_file": ("example-file", open("example-file", "rb")) }
headers = {"X-API-Key-ID": "<api-key>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('audio_file', '<string>');
const options = {method: 'POST', headers: {'X-API-Key-ID': '<api-key>'}};
options.body = form;
fetch('https://api.vachana.ai/api/v1/tts/voice-clone/embeddings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"message": "Voice embeddings generated successfully",
"data": {
"voice_clone_embedding": {
"embedding": "<string>",
"shape": [
1,
768
],
"dtype": "torch.bfloat16"
}
}
}Voice Cloning
Voice Clone Embeddings
Generate voice clone embeddings from an audio file.
POST
/
api
/
v1
/
tts
/
voice-clone
/
embeddings
Voice Clone Embeddings
curl --request POST \
--url https://api.vachana.ai/api/v1/tts/voice-clone/embeddings \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-Key-ID: <api-key>' \
--form audio_file='@example-file'import requests
url = "https://api.vachana.ai/api/v1/tts/voice-clone/embeddings"
files = { "audio_file": ("example-file", open("example-file", "rb")) }
headers = {"X-API-Key-ID": "<api-key>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('audio_file', '<string>');
const options = {method: 'POST', headers: {'X-API-Key-ID': '<api-key>'}};
options.body = form;
fetch('https://api.vachana.ai/api/v1/tts/voice-clone/embeddings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"message": "Voice embeddings generated successfully",
"data": {
"voice_clone_embedding": {
"embedding": "<string>",
"shape": [
1,
768
],
"dtype": "torch.bfloat16"
}
}
}Voice Cloning Flow
Voice cloning is a two-step process. Complete Step 1 once per voice, then reuse the embedding across any synthesis endpoint.1
Generate a voice embedding — this page
Upload 5–30 seconds of clean reference audio to extract a
speaker_embedding. Cache the result — you only need to generate it once per voice.2
Synthesize with your cloned voice
Pass the
speaker_embedding from Step 1 to your preferred synthesis endpoint:REST
Full audio returned in a single response
Streaming (SSE)
Receive audio progressively as it’s synthesized
Realtime (WebSocket)
Lowest latency — stream text in, audio out
Overview
Generate aspeaker_embedding from a reference audio clip. Upload the file and receive a multi-dimensional embedding you can pass to any Voice Cloned TTS endpoint.Authorizations
Headers
API Key ID for authentication
Body
multipart/form-data
The audio file to generate embeddings for
Was this page helpful?