> For clean Markdown of any page, append `.md` to the page URL.
> For a complete documentation index, see https://docs.sarvam.ai/llms.txt.
> For full documentation content in one file, see https://docs.sarvam.ai/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# Voice Cloning API

> Clone any voice from a short reference clip and synthesize speech in 13 Indian languages with the Sarvam AI Voice Cloning API. Cross-lingual cloning and built-in quality control from a single synchronous call.

Sarvam's Voice Cloning API generates speech in a cloned voice from a short reference clip. Send a 10-15 second recording of a speaker and text to synthesize; the API returns audio in that speaker's voice, in any of the supported target languages.

Voice Cloning is a **single synchronous call**: one request in, base64 audio out. It is the right tool when you already know the text and just need it spoken in a specific voice.

**Base URL and authentication.** See the [API Reference](/api-reference/voice-cloning) for the current base URL and auth header. Generate a key from [Key Management](https://dashboard.sarvam.ai/key-management) in the dashboard.

## What one call gives you

#### [Cross-lingual cloning](/api/api-guides-tutorials/voice-cloning/how-to/clone-across-languages)

Clone an English voice and have it speak Hindi, Tamil, or any supported language - the reference clip's language does not have to match the output.

#### [Built-in quality control](/api/api-guides-tutorials/voice-cloning/how-to/use-quality-control)

Every generation is transcribed back and scored before it is returned; failing generations are retried with bounded attempts. QC applies to single-chunk (short) generations.

## How it works

Voice Cloning is **synchronous by design**: one `POST` request carries the reference audio and the text, and the response carries the finished audio. There is no job to create, upload, start, or poll.

#### Prepare a reference clip

Pick 10-15 seconds of clean, single-speaker audio. WAV is recommended. See [Prepare Reference Audio](/api/api-guides-tutorials/voice-cloning/how-to/prepare-reference-audio).

#### Send the request

`POST /voices/clone` with `ref_audio`, `text`, and `language_code` as a multipart form.

#### Decode the audio

The response returns `audio` (base64 audio in your chosen codec) and a `request_id` for support.

Runnable code for the call, in cURL and other languages, is on the endpoint's page in the [API Reference](/api-reference/voice-cloning).

## Quickstart

Set `SARVAM_API_KEY`, point `ref_audio` at a local file, and decode the base64 audio from the response:

```bash
curl -s -X POST "https://api.sarvam.ai/voices/clone" \
  -H "api-subscription-key: $SARVAM_API_KEY" \
  -F "text=नमस्ते, मैं आपकी कैसे मदद कर सकता हूँ?" \
  -F "language_code=hi-IN" \
  -F "ref_audio=@reference.wav" \
  -F "ref_text=Hello, this is a sample reference recording." \
  -o response.json

# Decode audio from the response into a WAV file
python3 -c "import base64, json; open('output.wav', 'wb').write(base64.b64decode(json.load(open('response.json'))['audio']))"
```

The response contains `audio` (base64 audio in your chosen codec) and `request_id`. A non-2xx response returns an error envelope with `error.code` and `error.message`; see the [API Reference](/api-reference/voice-cloning) for every status code.

## Two ways to clone

### 1. Reference clip

Upload `ref_audio` directly. This is the simplest path and needs nothing stored anywhere. Optionally pass `ref_text` - the transcript of the clip - to improve fidelity; if you omit it, the API transcribes the clip automatically.

### 2. Saved voice

Pass a `voice_id` from your voice library (format: `svc-{uuid}`). Create the clone once - either via `POST /voices/create` (see [Manage voices over the API](#manage-voices-over-the-api)) or in Content Studio (see [Creating a Clone](/creative-cloning-create)) - then copy **Voice ID** from the clone card under **Voice Library → My voices** (or Voice Cloning home). See [Using a Cloned Voice](/creative-cloning-use#use-the-same-voice-in-the-api). The API fetches the stored reference audio and transcript for that voice, so you do not re-upload the clip on every call. This requires your API key to be bound to an organization.

Studio and the API share the same org-scoped library: a voice created in either place appears in **My voices** and in `GET /voices`, and is usable from both surfaces.

Send exactly one of `ref_audio` or `voice_id`. Providing both returns a 400 error.

## Manage voices over the API

The voice library itself is API-manageable - no Studio visit required. The same voices also show up in Content Studio **My voices** for that org:

| Endpoint                           | What it does                                                                                                                                                                                                                                                              |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `POST /voices/create`              | Create a cloned voice from a reference clip in one shot. The response returns the new `voice_id` and the auto-generated transcript (`reference_text`) together - the voice is ready to use with `POST /voices/clone` immediately, and appears under Studio **My voices**. |
| `GET /voices`                      | List the cloned voices in your workspace (filter by name, gender, accent; paginated). Each item’s `id` is the same value you pass as `voice_id` on `POST /voices/clone`.                                                                                                  |
| `GET /voices/{voice_id}`           | Full details for one voice, including its transcript and time-limited signed URLs for the reference and preview audio. The path param is the same `svc-{uuid}` as list `id` / create `voice_id`.                                                                          |
| `DELETE /voices/delete/{voice_id}` | Delete a voice. Its audio assets are removed and the voice stops being listed or usable in the API and in Studio.                                                                                                                                                         |

Voice creation is capped by your subscription tier (e.g. 3 voices on the starter tier); deleting a voice frees a slot. Endpoint-level schemas and code samples are in the [API Reference](/api-reference/voice-cloning).

## Limits and pricing

| Field                 | Limit          |
| --------------------- | -------------- |
| `ref_audio` file size | 10 MB          |
| `ref_audio` duration  | 30 seconds     |
| `ref_text` length     | 500 characters |

The model is tuned for short reference clips: 10-15 seconds is the sweet spot for clone quality, even though 30 seconds is accepted. `text` has no enforced character limit - the API splits it into sentences and synthesizes the chunks in parallel, so you do not need to split long scripts yourself.

Pricing is billed per character of `text` against the `text_to_speech_voice_cloning` API. See [Pricing](/api/getting-started/pricing) for the current rate, and [Commercial Licensing](/api/getting-started/commercial-licensing) for the production-rights conditions that apply to cloned voices - including voice-cloning consent.

**Voice cloning requires consent.** Only clone a voice you have the right to use. See [Commercial Licensing](/api/getting-started/commercial-licensing) for the consent requirements that apply to cloned-voice audio.

## Explore

#### [Prepare Reference Audio](/api/api-guides-tutorials/voice-cloning/how-to/prepare-reference-audio)

What makes a good reference clip, and what to avoid.

#### [Clone Across Languages](/api/api-guides-tutorials/voice-cloning/how-to/clone-across-languages)

How cross-lingual cloning works and when it shines.

#### [Choose Audio Formats](/api/api-guides-tutorials/voice-cloning/how-to/choose-audio-formats)

Input and output codecs, sample rates, and file-size guidance.

#### [Use Quality Control](/api/api-guides-tutorials/voice-cloning/how-to/use-quality-control)

What QC checks, when to disable it, and what you'll see.

#### [Supported Languages](/api/api-guides-tutorials/voice-cloning/supported-languages)

All language codes and native-script guidance.

#### [FAQs](/api/api-guides-tutorials/voice-cloning/faq)

Quick answers on limits, voices, and errors.

#### [API Reference](/api-reference/voice-cloning)

Endpoint-level schemas for every request and response field.

Need help scoping a voice-cloning integration? Reach out on [Discord](https://discord.com/invite/5rAsykttcs).