curl --request POST \
--url https://api.munsit.com/api/v1/voices/clone \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form voice_file='@example-file' \
--form reference_audio_file='@example-file' \
--form 'text=<string>' \
--form stability=0.5 \
--form 'name=<string>' \
--form 'model=<string>' \
--form 'description=<string>' \
--form 'gender=<string>' \
--form 'age=<string>' \
--form 'languages=<string>' \
--form 'dialects=<string>' \
--form 'avatar_url=<string>'import requests
url = "https://api.munsit.com/api/v1/voices/clone"
files = {
"voice_file": ("example-file", open("example-file", "rb")),
"reference_audio_file": ("example-file", open("example-file", "rb"))
}
payload = {
"text": "<string>",
"stability": "0.5",
"name": "<string>",
"model": "<string>",
"description": "<string>",
"gender": "<string>",
"age": "<string>",
"languages": "<string>",
"dialects": "<string>",
"avatar_url": "<string>"
}
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('voice_file', '<string>');
form.append('reference_audio_file', '<string>');
form.append('text', '<string>');
form.append('stability', '0.5');
form.append('name', '<string>');
form.append('model', '<string>');
form.append('description', '<string>');
form.append('gender', '<string>');
form.append('age', '<string>');
form.append('languages', '<string>');
form.append('dialects', '<string>');
form.append('avatar_url', '<string>');
const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
options.body = form;
fetch('https://api.munsit.com/api/v1/voices/clone', 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.munsit.com/api/v1/voices/clone",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference_audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"stability\"\r\n\r\n0.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"age\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"languages\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"dialects\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"avatar_url\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"x-api-key: <api-key>"
],
]);
$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.munsit.com/api/v1/voices/clone"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference_audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"stability\"\r\n\r\n0.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"age\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"languages\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"dialects\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"avatar_url\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.munsit.com/api/v1/voices/clone")
.header("x-api-key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference_audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"stability\"\r\n\r\n0.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"age\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"languages\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"dialects\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"avatar_url\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.munsit.com/api/v1/voices/clone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference_audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"stability\"\r\n\r\n0.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"age\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"languages\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"dialects\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"avatar_url\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voice_id": "<string>",
"name": "<string>",
"languages": [
"<string>"
],
"dialect": [
"<string>"
],
"sample_url": "<string>",
"stability": 123,
"description": "<string>",
"gender": "<string>",
"age": "<string>",
"type": "<string>",
"avatar_url": "<string>"
}{
"errorCode": "<string>",
"errorMessage": "<string>"
}{
"errorCode": "<string>",
"errorMessage": "<string>"
}{
"errorCode": "<string>",
"errorMessage": "<string>"
}Voice Clone
Create a cloned voice from an audio file. This endpoint allows you to create a new voice by providing a voice sample and reference audio.
curl --request POST \
--url https://api.munsit.com/api/v1/voices/clone \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form voice_file='@example-file' \
--form reference_audio_file='@example-file' \
--form 'text=<string>' \
--form stability=0.5 \
--form 'name=<string>' \
--form 'model=<string>' \
--form 'description=<string>' \
--form 'gender=<string>' \
--form 'age=<string>' \
--form 'languages=<string>' \
--form 'dialects=<string>' \
--form 'avatar_url=<string>'import requests
url = "https://api.munsit.com/api/v1/voices/clone"
files = {
"voice_file": ("example-file", open("example-file", "rb")),
"reference_audio_file": ("example-file", open("example-file", "rb"))
}
payload = {
"text": "<string>",
"stability": "0.5",
"name": "<string>",
"model": "<string>",
"description": "<string>",
"gender": "<string>",
"age": "<string>",
"languages": "<string>",
"dialects": "<string>",
"avatar_url": "<string>"
}
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('voice_file', '<string>');
form.append('reference_audio_file', '<string>');
form.append('text', '<string>');
form.append('stability', '0.5');
form.append('name', '<string>');
form.append('model', '<string>');
form.append('description', '<string>');
form.append('gender', '<string>');
form.append('age', '<string>');
form.append('languages', '<string>');
form.append('dialects', '<string>');
form.append('avatar_url', '<string>');
const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
options.body = form;
fetch('https://api.munsit.com/api/v1/voices/clone', 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.munsit.com/api/v1/voices/clone",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference_audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"stability\"\r\n\r\n0.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"age\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"languages\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"dialects\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"avatar_url\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"x-api-key: <api-key>"
],
]);
$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.munsit.com/api/v1/voices/clone"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference_audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"stability\"\r\n\r\n0.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"age\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"languages\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"dialects\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"avatar_url\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.munsit.com/api/v1/voices/clone")
.header("x-api-key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference_audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"stability\"\r\n\r\n0.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"age\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"languages\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"dialects\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"avatar_url\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.munsit.com/api/v1/voices/clone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference_audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"stability\"\r\n\r\n0.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"age\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"languages\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"dialects\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"avatar_url\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voice_id": "<string>",
"name": "<string>",
"languages": [
"<string>"
],
"dialect": [
"<string>"
],
"sample_url": "<string>",
"stability": 123,
"description": "<string>",
"gender": "<string>",
"age": "<string>",
"type": "<string>",
"avatar_url": "<string>"
}{
"errorCode": "<string>",
"errorMessage": "<string>"
}{
"errorCode": "<string>",
"errorMessage": "<string>"
}{
"errorCode": "<string>",
"errorMessage": "<string>"
}voice_file and the original audio file as reference_audio_file when cloning the voice.Authentication
Requires API key authentication viax-api-key header.
Request
Content-Type:multipart/form-data (set automatically when using FormData/files)
Form Data
| Field | Type | Required | Description |
|---|---|---|---|
voice_file | File | Yes | The generated preview audio file from the preview API |
reference_audio_file | File | Yes | The original audio file used for the preview |
text | string | Yes | The text used in preview generation |
stability | number | Yes | Voice stability (0.0 to 1.0). Higher values produce more consistent output |
name | string | Yes | Name for the cloned voice |
model | string | Yes | Model identifier to use for voice cloning |
description | string | No | Description of the voice |
gender | string | No | Gender of the voice (e.g., “male”, “female”) |
age | string | No | Age category of the voice (e.g., “middle”, “elderly”) |
languages | string | No | Comma-separated list of language codes (e.g., “ar,en”) |
dialects | string | No | Comma-separated list of dialects (e.g., “najdi,hijazi”) |
avatar_url | string | No | URL to an avatar image for the voice (you can put your image URL here) |
Notes
voice_fileshould be the audio file generated from the voice preview APIreference_audio_fileshould be the original audio file you used when generating the previewtextshould match the text you used when generating the preview- The voice will be assigned a unique
voice_idautomatically upon creation
Response
Status Code:200 OK
Content-Type: application/json
Response Schema
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Unique identifier for the voice record |
voice_id | string | Voice identifier used in API calls |
name | string | Name of the cloned voice |
description | string | null | Description of the voice |
gender | string | null | Gender of the voice |
age | string | null | Age category of the voice |
languages | string[] | List of language codes supported by the voice |
dialect | string[] | List of dialects supported by the voice |
type | string | null | Voice type |
sample_url | string | URL to the sample audio file |
avatar_url | string | null | URL to the avatar image |
stability | number | Voice stability value |
Example Response
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"voice_id": "ar-cloned-voice-1",
"name": "My Cloned Voice",
"description": "A custom cloned voice",
"gender": "male",
"age": "middle",
"languages": ["ar", "en"],
"dialect": ["najdi"],
"type": "neural",
"sample_url": "https://example.com/voices/user123/ar-cloned-voice-1.wav",
"avatar_url": null,
"stability": 0.8
}
Error Responses
400 Bad Request{
"errorCode": "400xx",
"errorMessage": "voice_file is required and must be a file"
}
{
"errorCode": "400xx",
"errorMessage": "reference_audio_file is required and must be a file"
}
{
"errorCode": "400xx",
"errorMessage": "name is required"
}
{
"errorCode": "400xx",
"errorMessage": "text is required"
}
{
"errorCode": "400xx",
"errorMessage": "stability must be a number between 0 and 1"
}
{
"errorCode": "400xx",
"errorMessage": "model is required"
}
{
"errorCode": "40101",
"errorMessage": "Invalid or missing API key"
}
{
"errorCode": "50001",
"errorMessage": "Failed to process voice file"
}
{
"errorCode": "50001",
"errorMessage": "Failed to upload voice file"
}
Example Usage
JavaScript
const formData = new FormData();
const voiceFile = document.querySelector('input[name="voice_file"]').files[0];
const referenceAudioFile = document.querySelector('input[name="reference_audio_file"]').files[0];
formData.append("voice_file", voiceFile);
formData.append("reference_audio_file", referenceAudioFile);
formData.append("text", "مرحبا بك في فصيح، هذا صوتي المستنسخ");
formData.append("stability", "0.8");
formData.append("name", "My Cloned Voice");
formData.append("model", "faseeh-v1-preview");
formData.append("description", "A custom cloned voice");
formData.append("gender", "male");
formData.append("languages", "ar,en");
formData.append("dialects", "najdi");
const response = await fetch('https://api.munsit.com/api/v1/voices/clone', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
// Note: Content-Type is set automatically by FormData
},
body: formData,
});
if (response.ok) {
const voice = await response.json();
console.log('Voice created:', voice.voice_id);
} else {
const error = await response.json();
console.error('Error:', error);
}
Python
import requests
url = "https://api.munsit.com/api/v1/voices/clone"
headers = {
"x-api-key": "YOUR_API_KEY"
}
files = {
"voice_file": open("voice_sample.wav", "rb"),
"reference_audio_file": open("reference_audio.wav", "rb")
}
data = {
"text": "مرحبا بك في فصيح، هذا صوتي المستنسخ",
"stability": "0.8",
"name": "My Cloned Voice",
"model": "faseeh-v1-preview",
"description": "A custom cloned voice",
"gender": "male",
"languages": "ar,en",
"dialects": "najdi"
}
response = requests.post(url, files=files, data=data, headers=headers)
if response.status_code == 200:
voice = response.json()
print(f"Voice created: {voice['voice_id']}")
else:
print(f"Error: {response.status_code} - {response.text}")
cURL
curl -X POST "https://api.munsit.com/api/v1/voices/clone" \
-H "x-api-key: YOUR_API_KEY" \
-F "voice_file=@voice_sample.wav" \
-F "reference_audio_file=@reference_audio.wav" \
-F "text=مرحبا بك في فصيح، هذا صوتي المستنسخ" \
-F "stability=0.8" \
-F "name=My Cloned Voice" \
-F "model=faseeh-v1-preview" \
-F "description=A custom cloned voice" \
-F "gender=male" \
-F "languages=ar,en" \
-F "dialects=najdi"
voice_id in text-to-speech generation endpoints. The voice will be available immediately after successful creation.Authorizations
API key for authentication
Body
The generated preview audio file from the preview API
The original audio file used for the preview
The text used in preview generation
Voice stability (0.0 to 1.0). Higher values produce more consistent output
0 <= x <= 1Name for the cloned voice
Model identifier to use for voice cloning
Description of the voice
Gender of the voice (e.g., 'male', 'female')
Age category of the voice (e.g., 'middle', 'elderly')
Comma-separated list of language codes (e.g., 'ar,en')
Comma-separated list of dialects (e.g., 'najdi,hijazi')
URL to an avatar image for the voice (you can put your image URL here)
Response
Voice created successfully
Unique identifier for the voice record
Voice identifier used in API calls
Name of the cloned voice
List of language codes supported by the voice
List of dialects supported by the voice
URL to the sample audio file
Voice stability value
Description of the voice
Gender of the voice
Age category of the voice
Voice type
URL to the avatar image
