Skip to navigation

How to clone across languages

Beta
View as Markdown

Sarvam’s voice cloning model is cross-lingual: the language of the reference clip does not have to match the language of the synthesized output. You can clone an English voice and have it speak Hindi, or a Tamil reference drive Bengali output - the model preserves the speaker’s timbre and identity while applying the phonetics and prosody of the target language.

How it works

Create the voice once from a reference clip. Then set language_code to the output language when generating speech. Prefer the SDK (create_voice + convert):

from sarvamai import SarvamAI
client = SarvamAI(api_subscription_key="YOUR_SARVAM_API_KEY")
voice = client.voice_cloning.create_voice(
name="english-speaker",
language="en-IN",
file=open("english_speaker.wav", "rb"),
)
response = client.voice_cloning.convert(
voice_id=voice.data.voice_id,
text="नमस्ते, मैं आपकी कैसे मदद कर सकता हूँ?",
language_code="hi-IN",
)

Reuse the same voice_id with any supported language.

Tips for cross-lingual cloning

Speaker accent transfers

A speaker with a strong regional accent in the reference will retain a hint of that accent in the cloned output. This is usually desirable - it preserves the speaker’s identity. If you want a more neutral target-language accent, pick a reference clip from a speaker with less pronounced source-language inflection.

Script differences don’t matter

The text field accepts native scripts (Devanagari, Tamil, Bengali, etc.) or code-mixed text. Always prefer the native script for the most accurate pronunciation. See Supported Languages.

Reference language doesn’t need to be English

Cross-lingual cloning works in any direction. A Tamil reference clip can drive Hindi, Bengali, or English generations equally well.

Longer references help cross-lingual quality

For cross-lingual generation, reference clips at the upper end of the recommended range (closer to 15 seconds than 10) give the model more speaker data to separate timbre from source-language phonetics.

Next steps