Voice Cloning API
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 for the current base URL and auth header. Generate a key from Key Management in the dashboard.
What one call gives you
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.
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.
Runnable code for the call, in cURL and other languages, is on the endpoint’s page in the API Reference.
Quickstart
Set SARVAM_API_KEY, point ref_audio at a local file, and decode the base64 audio from the response:
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 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) or in Content Studio (see Creating a Clone) - then copy Voice ID from the clone card under Voice Library → My voices (or Voice Cloning home). See Using a Cloned Voice. 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:
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.
Limits and pricing
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 for the current rate, and 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 for the consent requirements that apply to cloned-voice audio.
Explore
What makes a good reference clip, and what to avoid.
How cross-lingual cloning works and when it shines.
Input and output codecs, sample rates, and file-size guidance.
What QC checks, when to disable it, and what you’ll see.
All language codes and native-script guidance.
Quick answers on limits, voices, and errors.
Endpoint-level schemas for every request and response field.
Need help scoping a voice-cloning integration? Reach out on Discord.