Voice cloning
Create custom Arabic voices from audio samples. Preview a voice first, then commit the clone — the returned voice_id works everywhere a stock voice does.
What voice cloning gives you
Voice cloning lets you create lifelike custom voices from short audio samples, clone voices across different Arabic dialects, use them in text-to-speech generation, and manage your own voice library — all with the same API key.
| Capability | What it means |
|---|---|
| High-quality cloning | Create lifelike voice clones from short audio samples. |
| Multi-dialect support | Clone voices across different Arabic dialects. |
| Voice library | Manage and organize your custom voices alongside stock ones. |
| Easy integration | Use cloned voices seamlessly with the TTS API — just pass the voice_id. |
The preview-first flow
Cloning is a two-step process. You first generate a preview with the Voice Preview API, listen to it, and only then commit the clone. The clone request needs both files: the preview audio and the original sample it was built from.
| Step | What happens |
|---|---|
| 1 · Upload a sample | Provide a high-quality audio sample of the voice you want to clone. |
| 2 · Preview | Munsit processes the sample and returns a generated preview audio file. |
| 3 · Clone | Send the preview file, the original file and the preview text to /voices/clone. A unique voice_id is assigned automatically. |
| 4 · Use in TTS | Pass the voice_id to any text-to-speech request. The voice is available immediately after creation. |
Endpoint
Authenticated with the x-api-key header. The body is multipart/form-data; the content type is set automatically when you use FormData or file uploads.
| 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 — must match what you sent to the preview API. |
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. |
Clone a voice
Same request in three languages. voice_file is the preview output; reference_audio_file is the original recording; text matches the preview text.
Response
200 OK, application/json. The clone is available immediately — use voice_id in any TTS request.
| 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. |
Errors
Validation failures come back as 400 with a specific errorMessage; auth and processing failures use the shared error shape.
| Status | errorCode | errorMessage |
|---|---|---|
| 400 | 400xx | voice_file is required and must be a file |
| 400 | 400xx | reference_audio_file is required and must be a file |
| 400 | 400xx | name is required · text is required · model is required |
| 400 | 400xx | stability must be a number between 0 and 1 |
| 401 | 40101 | Invalid or missing API key |
| 500 | 50001 | Failed to process voice file · Failed to upload voice file |
Go further
The clone is just a voice_id. Everything downstream is regular TTS.
Working with an AI assistant? Every page is available as Markdown: add .md to the URL, or send an Accept: text/markdown header. For the whole documentation in one request, point it at llms-full.txt; the page index is llms.txt. Or use Copy Page, top right.
