> 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.

# Migrating Voice Cloning from ElevenLabs to Sarvam

> How to move cloned voices from ElevenLabs Instant Voice Cloning to Sarvam's Voice Cloning API: endpoint mapping, reference-clip guidance, before/after code, and the capabilities that have no ElevenLabs analog.

*Last updated: September 7, 2026*

This guide covers moving cloned voices from ElevenLabs Instant Voice Cloning (IVC) to Sarvam's Voice Cloning API. For plain text-to-speech with stock voices, start from [Migrating Text-to-Speech](/api/migrations/from-elevenlabs/text-to-speech); the base URL and auth changes below are the same.

**In short:** re-create each cloned voice once with `POST /voices/create` (one clean 10-15 second clip in, a `svc-{uuid}` voice ID out), then swap your synthesis call to `POST /voices/clone` with that `voice_id`. ElevenLabs returns raw audio bytes; Sarvam returns JSON with base64 audio you decode. Voice settings like `stability` and `similarity_boost` have no dial here - fidelity comes from the clip and built-in quality control.

## Quick start

|                     | ElevenLabs                  | Sarvam                                                                 |
| ------------------- | --------------------------- | ---------------------------------------------------------------------- |
| Base URL            | `https://api.elevenlabs.io` | `https://api.sarvam.ai`                                                |
| Auth header         | `xi-api-key`                | `api-subscription-key`                                                 |
| Auth failure status | `401`                       | `403` on `POST /voices/clone`; `401` on `create`/`list`/`get`/`delete` |

## Concept mapping

| ElevenLabs                                                                      | Sarvam                                      | Notes                                                               |
| ------------------------------------------------------------------------------- | ------------------------------------------- | ------------------------------------------------------------------- |
| `POST /v1/voices/add` (IVC create)                                              | `POST /voices/create`                       | Both take multipart form data and return a stored voice ID          |
| `POST /v1/text-to-speech/{voice_id}`                                            | `POST /voices/clone` with `voice_id`        | Synthesis with a saved clone                                        |
| -                                                                               | `POST /voices/clone` with `ref_audio`       | One-shot cloning per request; nothing stored (no ElevenLabs analog) |
| `files[]` (many samples)                                                        | `file` (one clip)                           | Pick your single best 10-15 seconds                                 |
| `labels` (language, gender, accent)                                             | `language` (required), `gender`, `style`    | `language` is a required BCP-47 code, e.g. `hi-IN`                  |
| `voice_settings.speed`                                                          | `pace`                                      |                                                                     |
| `voice_settings.stability` / `similarity_boost` / `style` / `use_speaker_boost` | -                                           | No dials; fidelity comes from the clip plus built-in QC             |
| `model_id`                                                                      | -                                           | The cloning model is fixed behind the API                           |
| `output_format` (`mp3_44100_128`)                                               | `output_audio_codec` + `speech_sample_rate` | Separate codec and sample-rate fields                               |
| `remove_background_noise`                                                       | -                                           | Clean the clip before uploading                                     |
| `requires_verification`                                                         | -                                           | No verification step; commercial use has consent requirements       |

## Step 1: Pick one clean reference clip

ElevenLabs IVC accepts a list of samples and improves with more; Sarvam's `POST /voices/create` takes exactly **one** `file` per voice. Pick your single cleanest clip:

* 10-15 seconds of continuous speech from the target speaker
* Under 50 MB and 5-60 seconds (hard caps for `POST /voices/create`; the `ref_audio` limits for one-shot cloning via `POST /voices/clone` are stricter - 10 MB and 30 seconds)
* Minimal background noise - there is no server-side cleanup step, so what you upload is what the clone learns from

See [Prepare Reference Audio](/api/api-guides-tutorials/voice-cloning/how-to/prepare-reference-audio) for what makes a good clip.

## Step 2: Create the voice once

#### Before (ElevenLabs)

```bash
curl -X POST "https://api.elevenlabs.io/v1/voices/add" \
  -H "xi-api-key: $ELEVENLABS_API_KEY" \
  -F "name=my-cloned-voice" \
  -F "files=@sample-1.mp3" \
  -F "files=@sample-2.mp3"

# {"voice_id": "21m00Tcm4TlvDq8ikWAM", "requires_verification": false}
```

#### After (Sarvam)

```bash
curl -X POST "https://api.sarvam.ai/voices/create" \
  -H "api-subscription-key: $SARVAM_API_KEY" \
  -F "name=my-cloned-voice" \
  -F "language=en-IN" \
  -F "file=@reference.wav"

# voice_id: svc-{uuid}, plus an auto-generated reference transcript
```

`language` is required and must be a BCP-47 code from the [supported languages](/api/api-guides-tutorials/voice-cloning/supported-languages) list. The response's auto-generated transcript is stored with the voice and reused on every synthesis call, which is why `ref_text` is optional when generating.

SDK equivalents: `client.voices.ivc.create(...)` on ElevenLabs, `client.voiceCloning.createVoice(...)` on Sarvam's `sarvamai` SDK (Python and TypeScript).

## Step 3: Generate speech with the saved voice

#### Before (ElevenLabs)

```bash
curl -X POST "https://api.elevenlabs.io/v1/text-to-speech/$VOICE_ID?output_format=mp3_44100_128" \
  -H "xi-api-key: $ELEVENLABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Welcome to our platform!",
    "model_id": "eleven_multilingual_v2",
    "voice_settings": {
      "stability": 0.5,
      "similarity_boost": 0.75,
      "speed": 1.0
    }
  }' --output speech.mp3
```

#### After (Sarvam)

```bash
curl -X POST "https://api.sarvam.ai/voices/clone" \
  -H "api-subscription-key: $SARVAM_API_KEY" \
  -F "voice_id=$SARVAM_VOICE_ID" \
  -F "text=Welcome to our platform!" \
  -F "language_code=en-IN" \
  -F "output_audio_codec=mp3" \
  -F "speech_sample_rate=44100" \
  -o response.json

# {"audio": "<base64>", "request_id": "..."}
```

Two response-handling changes: Sarvam returns JSON, so decode `response.audio` from base64, and `language_code` is required on every synthesis call. Sample rates above 24000 Hz are neural-upsampled; see [Choose Audio Formats](/api/api-guides-tutorials/voice-cloning/how-to/choose-audio-formats).

SDK equivalent: `client.voiceCloning.textToSpeech({ voiceId, text, language_code })` on Sarvam's `sarvamai` SDK.

## What Sarvam gives you that ElevenLabs doesn't

* **One-shot cloning.** `POST /voices/clone` accepts `ref_audio` directly - clone and synthesize in a single stateless call with nothing stored, handy for per-user or ephemeral voices.
* **Built-in quality control.** `enable_qc` (on by default) transcribes the generation back with ASR, scores the character error rate against your text, and retries failing generations before returning anything.
* **Cross-lingual cloning in one call.** Clone a voice once and synthesize across the supported languages by changing `language_code` - see [Clone Across Languages](/api/api-guides-tutorials/voice-cloning/how-to/clone-across-languages).
* **Explicit language targeting.** Every request carries a required `language_code` across 13 Indian languages, so pronunciation and prosody are correct by design rather than auto-detected.
* **Duration control.** `max_audio_duration` targets a fixed output length (use it or `pace`, not both - sending both returns a 400).

## What ElevenLabs has that Sarvam doesn't

* **Professional Voice Cloning** - a fine-tuned model tier trained on longer recordings; Sarvam cloning is instant-clip based.
* **Multiple samples per clone** - Sarvam learns from one clip, so sample selection matters more.
* **`remove_background_noise`** - clean your clip before uploading.
* **Voice sharing and library categories.**
* **Streaming for cloned voices** - Voice Cloning is synchronous REST only; for streaming, use stock-voice Text-to-Speech.

## Errors and retries

Retry `429`, `500`, `502`, `503`, and `504` with exponential backoff. Do not retry `400`, `401`, `402`, `403`, `404`, or `422` - those indicate problems with the request, auth, or subscription that retrying will not fix. Log the `request_id` from any failed response; see the [FAQ](/api/api-guides-tutorials/voice-cloning/faq).

## Pricing and limits

Synthesis is billed per character of `text` against the Voice Cloning API; creating, listing, and deleting voices is not billed per character. See [Pricing](/api/getting-started/pricing) for the current rate. Rate limits for `POST /voices/clone` are Starter 10 / Pro 50 / Business 500 req/min - see [Credits & Rate Limits](/api/getting-started/ratelimits).