curl -X POST https://app.dubformer.ai/api/v1/cloning/synthesize \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "text=Hello world, this is a test of our voice cloning technology!" \
-F "language=en-US" \
-F "reference_audio_files=@reference_voice_1.wav" \
-F "reference_audio_files=@reference_voice_2.wav"
import requests
url = 'https://app.dubformer.ai/api/v1/cloning/synthesize'
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
}
# Prepare the form data
data = {
'text': 'Hello world, this is a test of our voice cloning technology!',
'language': 'en-US'
}
# Prepare the files (multiple reference audio files)
files = [
('reference_audio_files', open('reference_voice_1.wav', 'rb')),
('reference_audio_files', open('reference_voice_2.wav', 'rb'))
]
response = requests.post(url, headers=headers, data=data, files=files)
# Save the audio response
with open('synthesized_audio.wav', 'wb') as f:
f.write(response.content)
print(f"Audio saved with status: {response.status_code}")
const url = 'https://app.dubformer.ai/api/v1/cloning/synthesize';
const headers = {
'Authorization': 'Bearer YOUR_API_KEY',
};
// Create form data
const formData = new FormData();
formData.append('text', 'Hello world, this is a test of our voice cloning technology!');
formData.append('language', 'en-US');
// Add reference audio file (assuming you have a file input element)
const fileInput = document.getElementById('audioFile');
if (fileInput.files[0]) {
formData.append('reference_audio_files', fileInput.files[0]);
}
fetch(url, {
method: 'POST',
headers,
body: formData,
})
.then(response => {
if (response.ok) {
return response.blob();
}
throw new Error('Network response was not ok');
})
.then(blob => {
// Create download link for the audio
const audioUrl = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = audioUrl;
a.download = 'synthesized_audio.wav';
a.click();
});
interface ConditioningFeaturesOverride {
pitch_variance?: 'low' | 'medium' | 'high' | 'auto';
target_duration?: number | 'auto';
}
interface VoiceCloningRequest {
text: string;
language: string;
reference_audio_files: File[];
}
const url: string = 'https://app.dubformer.ai/api/v1/cloning/synthesize';
const headers: Record<string, string> = {
'Authorization': 'Bearer YOUR_API_KEY',
};
const formData = new FormData();
const requestData: VoiceCloningRequest = {
text: 'Hello world, this is a test of our voice cloning technology!',
language: 'en-US',
reference_audio_files: []
};
formData.append('text', requestData.text);
formData.append('language', requestData.language);
const fileInput = document.getElementById('audioFile') as HTMLInputElement;
if (fileInput?.files) {
Array.from(fileInput.files).forEach(file => {
formData.append('reference_audio_files', file);
});
}
fetch(url, {
method: 'POST',
headers,
body: formData,
})
.then((response: Response) => {
if (response.ok) {
return response.blob();
}
throw new Error('Network response was not ok');
})
.then((blob: Blob) => {
const audioUrl: string = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = audioUrl;
a.download = 'synthesized_audio.wav';
a.click();
});
# Binary WAV audio file is returned
Content-Type: audio/wav
Content-Length: 524288
# Save to file
curl -X POST https://app.dubformer.ai/api/v1/cloning/synthesize \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "text=Hello world!" \
-F "language=en-US" \
-F "reference_audio_files=@reference.wav" \
--output synthesized_audio.wav
{
"error": "Contact with sales manager for enable API"
}
Voice Synthesis
Voice Cloning & Synthesis
Generate high-quality emotional text-to-speech with voice cloning capabilities
POST
/
api
/
v1
/
cloning
/
synthesize
curl -X POST https://app.dubformer.ai/api/v1/cloning/synthesize \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "text=Hello world, this is a test of our voice cloning technology!" \
-F "language=en-US" \
-F "reference_audio_files=@reference_voice_1.wav" \
-F "reference_audio_files=@reference_voice_2.wav"
import requests
url = 'https://app.dubformer.ai/api/v1/cloning/synthesize'
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
}
# Prepare the form data
data = {
'text': 'Hello world, this is a test of our voice cloning technology!',
'language': 'en-US'
}
# Prepare the files (multiple reference audio files)
files = [
('reference_audio_files', open('reference_voice_1.wav', 'rb')),
('reference_audio_files', open('reference_voice_2.wav', 'rb'))
]
response = requests.post(url, headers=headers, data=data, files=files)
# Save the audio response
with open('synthesized_audio.wav', 'wb') as f:
f.write(response.content)
print(f"Audio saved with status: {response.status_code}")
const url = 'https://app.dubformer.ai/api/v1/cloning/synthesize';
const headers = {
'Authorization': 'Bearer YOUR_API_KEY',
};
// Create form data
const formData = new FormData();
formData.append('text', 'Hello world, this is a test of our voice cloning technology!');
formData.append('language', 'en-US');
// Add reference audio file (assuming you have a file input element)
const fileInput = document.getElementById('audioFile');
if (fileInput.files[0]) {
formData.append('reference_audio_files', fileInput.files[0]);
}
fetch(url, {
method: 'POST',
headers,
body: formData,
})
.then(response => {
if (response.ok) {
return response.blob();
}
throw new Error('Network response was not ok');
})
.then(blob => {
// Create download link for the audio
const audioUrl = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = audioUrl;
a.download = 'synthesized_audio.wav';
a.click();
});
interface ConditioningFeaturesOverride {
pitch_variance?: 'low' | 'medium' | 'high' | 'auto';
target_duration?: number | 'auto';
}
interface VoiceCloningRequest {
text: string;
language: string;
reference_audio_files: File[];
}
const url: string = 'https://app.dubformer.ai/api/v1/cloning/synthesize';
const headers: Record<string, string> = {
'Authorization': 'Bearer YOUR_API_KEY',
};
const formData = new FormData();
const requestData: VoiceCloningRequest = {
text: 'Hello world, this is a test of our voice cloning technology!',
language: 'en-US',
reference_audio_files: []
};
formData.append('text', requestData.text);
formData.append('language', requestData.language);
const fileInput = document.getElementById('audioFile') as HTMLInputElement;
if (fileInput?.files) {
Array.from(fileInput.files).forEach(file => {
formData.append('reference_audio_files', file);
});
}
fetch(url, {
method: 'POST',
headers,
body: formData,
})
.then((response: Response) => {
if (response.ok) {
return response.blob();
}
throw new Error('Network response was not ok');
})
.then((blob: Blob) => {
const audioUrl: string = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = audioUrl;
a.download = 'synthesized_audio.wav';
a.click();
});
# Binary WAV audio file is returned
Content-Type: audio/wav
Content-Length: 524288
# Save to file
curl -X POST https://app.dubformer.ai/api/v1/cloning/synthesize \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "text=Hello world!" \
-F "language=en-US" \
-F "reference_audio_files=@reference.wav" \
--output synthesized_audio.wav
{
"error": "Contact with sales manager for enable API"
}
The Voice Cloning & Synthesis API enables you to generate natural-sounding speech with emotional transfer capabilities. This advanced endpoint uses AI-powered voice cloning technology to synthesize speech that matches the characteristics and emotional tone of reference audio samples.
Content-Type:
File Format: 16-bit PCM WAV, 44.1kHz sample rate
This endpoint requires a PRO subscription or higher to access voice cloning features.
curl -X POST https://app.dubformer.ai/api/v1/cloning/synthesize \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "text=Hello world, this is a test of our voice cloning technology!" \
-F "language=en-US" \
-F "reference_audio_files=@reference_voice_1.wav" \
-F "reference_audio_files=@reference_voice_2.wav"
import requests
url = 'https://app.dubformer.ai/api/v1/cloning/synthesize'
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
}
# Prepare the form data
data = {
'text': 'Hello world, this is a test of our voice cloning technology!',
'language': 'en-US'
}
# Prepare the files (multiple reference audio files)
files = [
('reference_audio_files', open('reference_voice_1.wav', 'rb')),
('reference_audio_files', open('reference_voice_2.wav', 'rb'))
]
response = requests.post(url, headers=headers, data=data, files=files)
# Save the audio response
with open('synthesized_audio.wav', 'wb') as f:
f.write(response.content)
print(f"Audio saved with status: {response.status_code}")
const url = 'https://app.dubformer.ai/api/v1/cloning/synthesize';
const headers = {
'Authorization': 'Bearer YOUR_API_KEY',
};
// Create form data
const formData = new FormData();
formData.append('text', 'Hello world, this is a test of our voice cloning technology!');
formData.append('language', 'en-US');
// Add reference audio file (assuming you have a file input element)
const fileInput = document.getElementById('audioFile');
if (fileInput.files[0]) {
formData.append('reference_audio_files', fileInput.files[0]);
}
fetch(url, {
method: 'POST',
headers,
body: formData,
})
.then(response => {
if (response.ok) {
return response.blob();
}
throw new Error('Network response was not ok');
})
.then(blob => {
// Create download link for the audio
const audioUrl = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = audioUrl;
a.download = 'synthesized_audio.wav';
a.click();
});
interface ConditioningFeaturesOverride {
pitch_variance?: 'low' | 'medium' | 'high' | 'auto';
target_duration?: number | 'auto';
}
interface VoiceCloningRequest {
text: string;
language: string;
reference_audio_files: File[];
}
const url: string = 'https://app.dubformer.ai/api/v1/cloning/synthesize';
const headers: Record<string, string> = {
'Authorization': 'Bearer YOUR_API_KEY',
};
const formData = new FormData();
const requestData: VoiceCloningRequest = {
text: 'Hello world, this is a test of our voice cloning technology!',
language: 'en-US',
reference_audio_files: []
};
formData.append('text', requestData.text);
formData.append('language', requestData.language);
const fileInput = document.getElementById('audioFile') as HTMLInputElement;
if (fileInput?.files) {
Array.from(fileInput.files).forEach(file => {
formData.append('reference_audio_files', file);
});
}
fetch(url, {
method: 'POST',
headers,
body: formData,
})
.then((response: Response) => {
if (response.ok) {
return response.blob();
}
throw new Error('Network response was not ok');
})
.then((blob: Blob) => {
const audioUrl: string = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = audioUrl;
a.download = 'synthesized_audio.wav';
a.click();
});
Request Parameters
The text content to be synthesized into speech. Maximum length: 5000 characters.
The target language for speech synthesis with locale (e.g., “en-US”, “fr-FR”, “es-ES”).
Must match one of the supported languages from Get Options.
One or more audio files containing reference voice samples for cloning.Supported formats: WAV, MP3, M4A, FLAC
Maximum file size: 50MB per file
Recommended length: 3-30 seconds for optimal results
Quality requirements: Clear audio with minimal background noise
Maximum file size: 50MB per file
Recommended length: 3-30 seconds for optimal results
Quality requirements: Clear audio with minimal background noise
Response
Success Response (200)
Synthesized audio as a binary WAV file.
audio/wavFile Format: 16-bit PCM WAV, 44.1kHz sample rate
# Binary WAV audio file is returned
Content-Type: audio/wav
Content-Length: 524288
# Save to file
curl -X POST https://app.dubformer.ai/api/v1/cloning/synthesize \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "text=Hello world!" \
-F "language=en-US" \
-F "reference_audio_files=@reference.wav" \
--output synthesized_audio.wav
{
"error": "Contact with sales manager for enable API"
}
⌘I