--- language: - en - hi - mr - gu - ta - te - kn - bn - ml - or - ur - pa pipeline_tag: text-to-speech library_name: transformers tags: - text-to-speech - tts - multilingual - indic - f5-tts - sooktam2 ---

BharatGen Logo

Sooktam-2 ๐Ÿ‡ฎ๐Ÿ‡ณ

"เคตเคฟเคตเคฟเคงเคคเคพ เคฎเฅ‡เค‚ เคนเฅ€ เคญเคพเคฐเคค เค•เฅ€ เคถเค•เฅเคคเคฟ เคนเฅˆ, เค”เคฐ เคนเคฐ เคญเคพเคทเคพ เค‰เคธ เคถเค•เฅเคคเคฟ เค•เฅ€ เค†เคตเคพเคœเคผ เคนเฅˆเฅค"

Sovereign AI ยท Built in Bharat ยท For Bharat

--- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1YvgkOL7mM7vcOE8IHOhHD9PprYUh5bvb) ## The Story India is not one voice - it is a symphony. Tamil, Bengali, Urdu, Hindi, Kannada - each a living civilisation, spoken daily by hundreds of millions. Yet for too long, AI treated them as afterthoughts. Models built elsewhere, for someone else, leaving Bharat to make do with approximations of its own languages. **BharatGen was built to end that.** We are India's sovereign AI initiative - weaving the country's languages, cultures, and voices into technology that is truly Indian. Not adapted. Not translated. *Built from the ground up, for Bharat.* **Sooktam-2** is our answer to India's need for a voice. A Text-to-Speech model that speaks 12 languages (11 indian languages + 1 indian english) with the phonetic precision, prosody, and cultural soul they deserve - so that every Indian, in every state, can hear AI speak *their* language, in *their* accent, and feel at home. This is **GenAI for Bharat, by Bharat.** --- ## What is Sooktam-2? Sooktam-2 is a sovereign multilingual Text-to-Speech model built by BharatGen. It synthesises natural, expressive speech across India's major languages using reference-guided voice conditioning - preserving the speaker's voice, accent, and cultural cadence. **Represented Languages - 12** `Hindi` ยท `Marathi` ยท `Gujarati` ยท `Tamil` ยท `Telugu` ยท `Kannada` ยท `Bengali` ยท `Malayalam` ยท `Odia` ยท `Urdu` ยท `Punjabi` ยท `Indian English` **Key Capabilities** - Reference-guided voice cloning - Multilingual Indic speech synthesis - Natural prosody and expressive delivery - Language-aware CLS tokenization for accurate Indic phonetics - Production-quality audio output, deployment-ready at scale --- ## Quickstart - Python version = 3.10 ```bash git clone https://huggingface.co/bharatgenai/sooktam2 cd sooktam2 sh setup-cls.sh ``` --- ## Python Inference ```python import os from transformers import AutoModel # --- Model ID --- MODEL_ID = "bharatgenai/sooktam2" # --- Your reference audio and target text --- REF_AUDIO = "reference.wav" # A short, clean voice clip (3โ€“10 sec) REF_TEXT = "เคธเคฐ, เคฎเฅˆเค‚ เคคเคฌ เคธเฅ‡ เคฏเคน เค•เคน เคฐเคนเคพ เคนเฅ‚เค เค•เคฟ เคฎเฅˆเค‚เคจเฅ‡ เค…เคชเคจเคพ เคŸเคฟเค•เคŸ เค•เฅˆเค‚เคธเคฒ เค•เคฐ เคฆเคฟเคฏเคพ เคนเฅˆ, เคฒเฅ‡เค•เคฟเคจ เค…เคฌ เคคเค• เคฎเฅ‡เคฐเฅ‡ เคชเฅˆเคธเฅ‡ เคตเคพเคชเคธ เคจเคนเฅ€เค‚ เค†เค เคนเฅˆเค‚เฅค เค†เคช เค‡เคธ เคฎเคพเคฎเคฒเฅ‡ เค•เฅ‹ เคฆเฅ‡เค–เฅ‡เค‚เค—เฅ‡ เคญเฅ€ เคฏเคพ เคจเคนเฅ€เค‚?" GEN_TEXT = "เคฏเคน เคเค• เคŸเฅ‡เคธเฅเคŸ เคตเคพเค•เฅเคฏ เคนเฅˆ เคœเคฟเคธเฅ‡ เค†เคตเคพเคœเคผ เคฎเฅ‡เค‚ เคฌเคฆเคฒเคจเคพ เคนเฅˆเฅค" # --- Output --- OUT_DIR = "outputs" OUT_WAV = os.path.join(OUT_DIR, "sooktam_cls.wav") # --- Load model (auto-downloads checkpoint + vocab from HuggingFace) --- model = AutoModel.from_pretrained( MODEL_ID, trust_remote_code=True, ) os.makedirs(OUT_DIR, exist_ok=True) # CLS tokenization is handled inside utils_infer via cls_tokenizer_v2 wav, sr, _ = model.infer( ref_file=REF_AUDIO, ref_text=REF_TEXT, gen_text=GEN_TEXT, tokenizer="cls", cls_language="hindi", file_wave=OUT_WAV, ) print("Saved:", OUT_WAV, "sample_rate:", sr, "samples:", len(wav)) ``` > The model and vocab download automatically from HuggingFace on first run. No manual checkpoint hunting required. --- ## Hugging Face AutoModel ```python from transformers import AutoModel model = AutoModel.from_pretrained( "bharatgenai/sooktam2", trust_remote_code=True, ) wav, sr, _ = model.infer( ref_file="ref.wav", ref_text="Your reference transcript.", gen_text="Text you want to synthesise.", tokenizer="cls", cls_language="hindi", ) ``` --- ## License This post-trained checkpoint is released under the BharatGen non-commercial license. Please refer to the [LICENSE](./LICENSE) file for detailed terms and conditions. --- ## Contributors - Yash - Supreet - Isha - Vansh - Pranav For any questions or feedback, please contact: contact@bharatgen.com --- ## BharatGen - Sovereign AI for a Sovereign Nation BharatGen is India's initiative to build AI that is Indian in its roots, inclusive in its reach, and sovereign in its design. We believe that a nation of India's civilisational depth - of Sanskrit and Tamil, of Tagore and Kabir, of a billion daily conversations - should not have to borrow its voice from elsewhere. India's languages are not a niche. They are the world's richest linguistic heritage. And now, they have a model built for them. We are just getting started. ---

bharatgen.com ยท HuggingFace โ†—

เคœเคฏ เคนเคฟเคจเฅเคฆ ยท เคœเคฏ เคญเคพเคฐเคค ๐Ÿ‡ฎ๐Ÿ‡ณ