Clone voice for speech
August 18, 2025
Table of contents
This endpoint creates a custom voice clone by uploading an audio sample. The cloned voice can then be used for speech generation via POST /speech. Upload clear, high-quality audio MP3 samples (10-60 seconds) for best results. Voice cloning typically takes 60-90 seconds to process.
https://api.useapi.net/v1/mureka/speech/voice?…
Request Headers
Authorization: Bearer {API token}
Content-Type: audio/mpeg
API token
is required, see Setup useapi.net for details.
Query Parameters
-
account
is optional when only one account configured. However, if you have multiple accounts configured, this parameter becomes required. -
title
is required. Voice title.
Length: 1-50 characters. -
desc
is required. Voice description.
Length: 1-500 characters. -
lang
is required. Language code for the voice.
Supported values:en
(English),zh-Hans
(Simplified Chinese),zh-Hant
(Traditional Chinese),ja
(Japanese),ko
(Korean),es
(Spanish),pt
(Portuguese),de
(German),fr
(French),it
(Italian),ru
(Russian).
Request Body
Binary audio file content.
Supported format: MP3 only (audio/mpeg
content type).
Recommended: 10-60 seconds of clear speech for optimal cloning quality.
Responses
-
{ "id": 12345678901234, "user_id": 23456789012345, "title": "Custom Voice", "cover": "https://static-cos.mureka.ai/cos-prod/res/cover/….png", "mp3_url": "https://static-cos.mureka.ai/cos-prod/tts-v2/….mp3", "language": "en", "created_at": 1755483687, "description": "Custom cloned voice description", "duration_milliseconds": 12520, "machine_audit_state": 1 }
-
{ "error": "<Error message>", "code": 400 }
-
{ "error": "Unauthorized", "code": 401 }
Model
{ // TypeScript, all fields are optional
id: number
user_id: number
title: string
cover: string
mp3_url: string
language: string
created_at: number
description: string
duration_milliseconds: number
machine_audit_state: number
}
Examples
-
curl "https://api.useapi.net/v1/mureka/speech/voice?title=CustomVoice&desc=MyVoiceDescription&lang=en" \ -H "Accept: application/json" \ -H "Authorization: Bearer …" \ -H "Content-Type: audio/mpeg" \ --data-binary @voice_sample.mp3
-
const token = "API token"; const title = "Custom Voice"; const desc = "My voice description"; const lang = "en"; const fileInput = document.querySelector('input[type="file"]'); const file = fileInput.files[0]; const apiUrl = `https://api.useapi.net/v1/mureka/speech/voice?title=${title}&desc=${desc}&lang=${lang}`; const response = await fetch(apiUrl, { method: "POST", headers: { "Authorization": `Bearer ${token}`, "Content-Type": file.type, }, body: file, }); const result = await response.json(); console.log("response", {response, result});
-
import requests token = "API token" title = "Custom Voice" desc = "My voice description" lang = "en" apiUrl = f"https://api.useapi.net/v1/mureka/speech/voice?title={title}&desc={desc}&lang={lang}" headers = { "Authorization" : f"Bearer {token}", "Content-Type": "audio/mpeg" } with open('voice_sample.mp3', 'rb') as audio_file: response = requests.post(apiUrl, headers=headers, data=audio_file.read()) print(response, response.json())