Create new voice
curl --request POST \
--url https://api.voicedub.ai/v1/me/voices \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My Custom Voice",
"numberOfFiles": 3,
"maxMinutes": 10,
"separate": true
}
'import requests
url = "https://api.voicedub.ai/v1/me/voices"
payload = {
"name": "My Custom Voice",
"numberOfFiles": 3,
"maxMinutes": 10,
"separate": True
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'My Custom Voice', numberOfFiles: 3, maxMinutes: 10, separate: true})
};
fetch('https://api.voicedub.ai/v1/me/voices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.voicedub.ai/v1/me/voices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'My Custom Voice',
'numberOfFiles' => 3,
'maxMinutes' => 10,
'separate' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.voicedub.ai/v1/me/voices"
payload := strings.NewReader("{\n \"name\": \"My Custom Voice\",\n \"numberOfFiles\": 3,\n \"maxMinutes\": 10,\n \"separate\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.voicedub.ai/v1/me/voices")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Custom Voice\",\n \"numberOfFiles\": 3,\n \"maxMinutes\": 10,\n \"separate\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voicedub.ai/v1/me/voices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Custom Voice\",\n \"numberOfFiles\": 3,\n \"maxMinutes\": 10,\n \"separate\": true\n}"
response = http.request(request)
puts response.read_body{
"voice": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "My Custom Voice",
"status": "new",
"separate": true,
"maxMinutes": 10,
"errorCode": null,
"errorMessage": null,
"apiCreditsUsed": 0,
"apiCreditsLeft": null,
"completedAt": null,
"createdAt": "2024-01-15T10:00:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"requiredCredits": 100
},
"uploadUrls": [
"https://s3.amazonaws.com/bucket/models/123e4567-e89b-12d3-a456-426614174000/vocals/123e4567-e89b-12d3-a456-426614174000_0?X-Amz-Signature=...",
"https://s3.amazonaws.com/bucket/models/123e4567-e89b-12d3-a456-426614174000/vocals/123e4567-e89b-12d3-a456-426614174000_1?X-Amz-Signature=..."
]
}Voices
Create new voice
Create a new voice for training. Returns presigned URLs for uploading training audio files.
POST
/
v1
/
me
/
voices
Create new voice
curl --request POST \
--url https://api.voicedub.ai/v1/me/voices \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My Custom Voice",
"numberOfFiles": 3,
"maxMinutes": 10,
"separate": true
}
'import requests
url = "https://api.voicedub.ai/v1/me/voices"
payload = {
"name": "My Custom Voice",
"numberOfFiles": 3,
"maxMinutes": 10,
"separate": True
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'My Custom Voice', numberOfFiles: 3, maxMinutes: 10, separate: true})
};
fetch('https://api.voicedub.ai/v1/me/voices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.voicedub.ai/v1/me/voices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'My Custom Voice',
'numberOfFiles' => 3,
'maxMinutes' => 10,
'separate' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.voicedub.ai/v1/me/voices"
payload := strings.NewReader("{\n \"name\": \"My Custom Voice\",\n \"numberOfFiles\": 3,\n \"maxMinutes\": 10,\n \"separate\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.voicedub.ai/v1/me/voices")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Custom Voice\",\n \"numberOfFiles\": 3,\n \"maxMinutes\": 10,\n \"separate\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voicedub.ai/v1/me/voices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Custom Voice\",\n \"numberOfFiles\": 3,\n \"maxMinutes\": 10,\n \"separate\": true\n}"
response = http.request(request)
puts response.read_body{
"voice": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "My Custom Voice",
"status": "new",
"separate": true,
"maxMinutes": 10,
"errorCode": null,
"errorMessage": null,
"apiCreditsUsed": 0,
"apiCreditsLeft": null,
"completedAt": null,
"createdAt": "2024-01-15T10:00:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"requiredCredits": 100
},
"uploadUrls": [
"https://s3.amazonaws.com/bucket/models/123e4567-e89b-12d3-a456-426614174000/vocals/123e4567-e89b-12d3-a456-426614174000_0?X-Amz-Signature=...",
"https://s3.amazonaws.com/bucket/models/123e4567-e89b-12d3-a456-426614174000/vocals/123e4567-e89b-12d3-a456-426614174000_1?X-Amz-Signature=..."
]
}Authorizations
API key in the format: "Api-Key "
Body
application/json
Display name for the voice (1-50 characters)
Required string length:
1 - 50Example:
"My Custom Voice"
Number of audio files to upload for training (1-5)
Required range:
1 <= x <= 5Example:
3
Maximum duration of training audio in minutes (5-60)
Required range:
5 <= x <= 60Example:
10
Whether to use vocal separation during training
Example:
true
Response
200 - application/json
Voice created successfully
Show child attributes
Show child attributes
Presigned URLs for uploading training audio files
Example:
[
"https://s3.amazonaws.com/bucket/models/123e4567-e89b-12d3-a456-426614174000/vocals/123e4567-e89b-12d3-a456-426614174000_0?X-Amz-Signature=...",
"https://s3.amazonaws.com/bucket/models/123e4567-e89b-12d3-a456-426614174000/vocals/123e4567-e89b-12d3-a456-426614174000_1?X-Amz-Signature=..."
]
⌘I