Instructions to use SDLC-Corp/TTS with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SDLC-Corp/TTS with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-speech", model="SDLC-Corp/TTS")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("SDLC-Corp/TTS", device_map="auto") - Notebooks
- Google Colab
- Kaggle
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("SDLC-Corp/TTS", device_map="auto")SDLC Corp · Multilingual Text-to-Speech
Lightweight, end-to-end speech synthesis for 1,100+ languages, with English, Hindi and Marathi bundled and ready to use
Overview
SDLC Corp Multilingual TTS turns text into natural speech in more than 1,100 languages through one consistent 🤗 Transformers interface. It is built on Meta AI's Massively Multilingual Speech (MMS) text-to-speech models, which use the VITS architecture.
Language support works on two levels:
| Languages | Loaded from | What you change | |
|---|---|---|---|
| Bundled | English, Hindi, Marathi | SDLC-Corp/TTS (this repository) |
subfolder="eng", "hin" or "mar" |
| Extended | 1,100+ others, such as Bengali, Tamil, Telugu, Spanish, French and Arabic | facebook/mms-tts-<code> (Meta) |
The model ID |
The code, API and output format are the same for every language. The
MultilingualTTS class below handles both levels
automatically, so you pass a language name and get audio back.
Highlights
- 1,100+ languages, one interface. Bundled and extended languages share the same API.
- End to end. Text goes in and a 16 kHz waveform comes out, with no separate vocoder or phonemizer.
- Lightweight. About 36M parameters and 145 MB per language, fast enough for a CPU.
- Native scripts. Devanagari, Bengali, Tamil, Arabic and many other scripts are taken directly. A small number of languages need romanization, which is handled for you.
- Load on demand. Each language downloads only once, on first use, and is cached locally.
Table of Contents
- Languages
- Quick Start
- Usage
- Generation Controls
- Performance and Hardware
- Technical Specifications
- Intended Use
- Limitations
- Ethical Considerations
- Demo Application
- License
- Citation
Languages
Bundled languages
Stored in this repository and loaded with subfolder=:
| Language | Code | Script | Vocabulary | Source checkpoint |
|---|---|---|---|---|
| English | eng |
Latin (lowercased automatically) | 38 symbols | facebook/mms-tts-eng |
| Hindi (हिन्दी) | hin |
Devanagari | 72 symbols | facebook/mms-tts-hin |
| Marathi (मराठी) | mar |
Devanagari | 73 symbols | facebook/mms-tts-mar |
SDLC-Corp/TTS
├── eng/ ─┐
├── hin/ ├─ config.json · model.safetensors · tokenizer_config.json
├── mar/ ─┘ special_tokens_map.json · vocab.json
├── assets/
└── README.md
Only the requested subfolder is downloaded, so loading Hindi does not fetch English or Marathi.
Extended languages (1,100+)
Every other language uses Meta's checkpoint facebook/mms-tts-<code>, where <code> is the
ISO 639-3 language code. Some languages have
script variants, such as urd-script_arabic. Commonly used examples:
| Region | Languages (code) |
|---|---|
| India and South Asia | Bengali (ben) · Tamil (tam) · Telugu (tel) · Gujarati (guj) · Kannada (kan) · Malayalam (mal) · Punjabi (pan) · Odia (ory) · Assamese (asm) · Urdu (urd-script_arabic, urd-script_devanagari, urd-script_latin) |
| Europe | Spanish (spa) · French (fra) · German (deu) · Portuguese (por) · Russian (rus) |
| Middle East and Africa | Arabic (ara) · Swahili (swh) · Yoruba (yor) |
| East and Southeast Asia | Indonesian (ind) · Vietnamese (vie) · Thai (tha) · Korean (kor, romanized) |
Find your language: browse all checkpoints on the Hugging Face Hub or in Meta's language coverage list.
Romanized languages
A few checkpoints, such as Korean, were trained on romanized text. Their tokenizer reports
is_uroman = True, and input must first be converted to Latin script with
uroman (pip install uroman). The
MultilingualTTS class does this automatically.
Coverage notes
- Coverage is broad but not universal. For example, Mandarin Chinese and Japanese have no MMS-TTS checkpoint.
- Quality varies by language with the amount of training data. Evaluate a language on your own content before relying on it.
Quick Start
Requirements: Python 3.10+
pip install torch transformers soundfile
A bundled language (English, Hindi or Marathi):
import torch
import soundfile as sf
from transformers import AutoTokenizer, VitsModel
repo, lang = "SDLC-Corp/TTS", "hin" # "eng", "hin" or "mar"
tokenizer = AutoTokenizer.from_pretrained(repo, subfolder=lang)
model = VitsModel.from_pretrained(repo, subfolder=lang).eval()
inputs = tokenizer("नमस्ते, आप कैसे हैं?", return_tensors="pt")
torch.manual_seed(0) # generation is stochastic; fix the seed for reproducible audio
with torch.inference_mode():
waveform = model(**inputs).waveform[0].numpy()
sf.write("output.wav", waveform, model.config.sampling_rate) # 16 kHz WAV
Any other language. Use Meta's model ID and drop subfolder:
model_id = "facebook/mms-tts-tam" # Tamil
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = VitsModel.from_pretrained(model_id).eval()
inputs = tokenizer("வணக்கம், எப்படி இருக்கிறீர்கள்?", return_tensors="pt")
torch.manual_seed(0)
with torch.inference_mode():
waveform = model(**inputs).waveform[0].numpy()
sf.write("tamil.wav", waveform, model.config.sampling_rate)
Usage
One interface for every language
MultilingualTTS takes a language name or code. It loads bundled languages from this
repository and all others from Meta, romanizes input where required, caches loaded models,
and uses a GPU when one is available.
import torch
from transformers import AutoTokenizer, VitsModel
class MultilingualTTS:
REPO = "SDLC-Corp/TTS"
BUNDLED = {"eng", "hin", "mar"}
ALIASES = {
"english": "eng", "hindi": "hin", "marathi": "mar",
"bengali": "ben", "tamil": "tam", "telugu": "tel", "gujarati": "guj",
"kannada": "kan", "malayalam": "mal", "punjabi": "pan", "odia": "ory",
"spanish": "spa", "french": "fra", "german": "deu", "arabic": "ara",
}
def __init__(self, device: str | None = None):
self.device = device or ("cuda" if torch.cuda.is_available() else "cpu")
self._models: dict[str, tuple] = {}
def _load(self, code: str):
if code not in self._models:
if code in self.BUNDLED:
repo, kwargs = self.REPO, {"subfolder": code}
else:
repo, kwargs = f"facebook/mms-tts-{code}", {}
tokenizer = AutoTokenizer.from_pretrained(repo, **kwargs)
model = VitsModel.from_pretrained(repo, **kwargs).to(self.device).eval()
self._models[code] = (tokenizer, model)
return self._models[code]
@torch.inference_mode()
def synthesize(self, text: str, language: str, seed: int = 0):
"""Return (waveform as float32 numpy array, sample_rate)."""
code = self.ALIASES.get(language.lower(), language)
tokenizer, model = self._load(code)
if getattr(tokenizer, "is_uroman", False):
import uroman # pip install uroman
text = uroman.Uroman().romanize_string(text)
inputs = tokenizer(text, return_tensors="pt").to(self.device)
if inputs["input_ids"].shape[-1] == 0:
raise ValueError(f"Text contains no characters supported by the '{code}' model.")
torch.manual_seed(seed)
waveform = model(**inputs).waveform[0].cpu().numpy()
return waveform, model.config.sampling_rate
tts = MultilingualTTS()
audio, sr = tts.synthesize("नमस्कार, आपले स्वागत आहे.", "marathi") # bundled
audio, sr = tts.synthesize("নমস্কার, আপনি কেমন আছেন?", "bengali") # extended
audio, sr = tts.synthesize("Hola, ¿cómo estás?", "spa") # any ISO 639-3 code
With the text-to-speech pipeline
import soundfile as sf
from transformers import AutoTokenizer, VitsModel, pipeline
repo, lang = "SDLC-Corp/TTS", "eng"
tts_pipe = pipeline(
"text-to-speech",
model=VitsModel.from_pretrained(repo, subfolder=lang),
tokenizer=AutoTokenizer.from_pretrained(repo, subfolder=lang),
)
result = tts_pipe("Welcome to SDLC Corp.")
sf.write("welcome.wav", result["audio"].squeeze(), result["sampling_rate"])
For an extended language, pass pipeline("text-to-speech", model="facebook/mms-tts-<code>").
Playback in a notebook
from IPython.display import Audio
Audio(audio, rate=sr)
Generation Controls
These attributes can be adjusted on any loaded model before generation:
| Attribute | Default | Description |
|---|---|---|
model.speaking_rate |
1.0 |
Speech tempo. Values above 1.0 are faster, below are slower. |
model.noise_scale |
0.667 |
Prosodic variation. Lower values give flatter, more consistent intonation. |
model.noise_scale_duration |
0.8 |
Variation in phoneme timing. |
model.speaking_rate = 0.9 # slightly slower delivery
model.noise_scale = 0.5 # steadier intonation
VITS sampling is stochastic. Call torch.manual_seed(...) before each generation when you
need deterministic output.
Performance and Hardware
| CPU | GPU | |
|---|---|---|
| Supported | Yes, out of the box | Yes, any CUDA-capable GPU |
| Memory per loaded language | ~150 MB RAM | < 1 GB VRAM |
| Typical latency (short sentence) | A few seconds on a laptop CPU | Well under a second |
| Download per language | ~145 MB, once | ~145 MB, once |
Every language uses the same architecture, so these figures apply to all of them. A free Google Colab or Kaggle T4 GPU is more than sufficient.
Technical Specifications
| Property | Value |
|---|---|
| Architecture | VITS: conditional VAE with adversarial training, normalizing-flow prior and stochastic duration predictor |
| Text encoder | 6 transformer layers · hidden size 192 · 2 attention heads · FFN 768 |
| Waveform decoder | HiFi-GAN-style generator, upsampling ×8 · ×8 · ×2 · ×2 |
| Parameters | ~36M per language |
| Weights format | safetensors, float32 |
| Tokenizer | VitsTokenizer, character-level; uroman romanization for a small set of languages |
| Speakers | Single speaker per language |
| Output | 16 kHz · mono · float32 waveform |
| Language coverage | 3 bundled (eng, hin, mar) · 1,100+ via MMS-TTS checkpoints |
| Training data | MMS read-speech recordings (predominantly religious texts), per Pratap et al. (2023) |
| Original developer | Meta AI |
| Packaged by | SDLC Corp |
Intended Use
Suitable for
- Multilingual products and research, especially for Indian and low-resource languages
- Accessibility tools such as screen readers and read-aloud features
- Education, language-learning material, internal demos and proofs of concept
- Lightweight on-device or CPU-only deployments
Out of scope
- Commercial products or services (prohibited by the license)
- Voice cloning, speaker impersonation or expressive/emotional speech
- Languages without an MMS-TTS checkpoint (for example Mandarin Chinese and Japanese)
Limitations
- Script must match the model. Each model expects its own script (for example Devanagari
for Hindi, Tamil script for Tamil). Unsupported characters are dropped by the tokenizer,
which can result in empty input. The
MultilingualTTSclass checks for this. - No text normalization. Digits, dates, currency and abbreviations are not expanded. Spell them out (for example "twenty-five" or "पच्चीस") for correct pronunciation.
- One language per model. Segment mixed-language text (for example Hinglish) and route each segment to the matching language.
- Single voice. One neutral voice per language, with no speaker or style selection.
- Uneven quality. Naturalness varies across languages with the amount of training data.
- Domain shift. Training data is predominantly read religious text, so conversational or technical content may sound less natural.
Ethical Considerations
Synthetic speech can be misused. Do not use these models to impersonate real individuals, to produce deceptive or fraudulent audio, or to present generated speech as a genuine recording. Where generated audio is published, we recommend disclosing that it is synthetic.
Demo Application
A Gradio web application for the bundled languages is available on GitHub. It offers language tabs, a character counter, an audio player, WAV download and automatic CPU/GPU detection.
git clone https://github.com/Sudhanshu619/TTS.git
cd TTS
pip install torch --index-url https://download.pytorch.org/whl/cpu # or a CUDA build
pip install -r requirements-demo.txt
python app.py # http://127.0.0.1:7860
License
All MMS-TTS model weights, both those bundled here and Meta's extended-language checkpoints, are developed by Meta AI and distributed under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) license.
- Non-commercial use only. The models, and audio generated with them, may not be used for commercial purposes.
- Attribution. Credit Meta AI and the MMS authors, and reference the license.
- Modifications. The English, Hindi and Marathi checkpoints are consolidated into one
repository, and only their
safetensorsweights are distributed. Model weights are unchanged. Extended languages are loaded directly from Meta's repositories.
Citation
If you use these models in your work, please cite the original MMS paper:
@article{pratap2023mms,
title = {Scaling Speech Technology to 1,000+ Languages},
author = {Vineel Pratap and Andros Tjandra and Bowen Shi and Paden Tomasello and Arun Babu
and Sayani Kundu and Ali Elkahky and Zhaoheng Ni and Apoorv Vyas and Maryam Fazel-Zarandi
and Alexei Baevski and Yossi Adi and Xiaohui Zhang and Wei-Ning Hsu and Alexis Conneau
and Michael Auli},
journal = {arXiv preprint arXiv:2305.13516},
year = {2023}
}
Acknowledgements
- Meta AI, Massively Multilingual Speech: original models and research
- 🤗 Hugging Face Transformers: VITS implementation and inference
- Gradio: demo application UI
Maintained by SDLC Corp
Model tree for SDLC-Corp/TTS
Base model
facebook/mms-tts-eng


# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-speech", model="SDLC-Corp/TTS")