--- license: apache-2.0 language: - hi - en - bn - gu - kn - ml - mr - or - pa - ta - te pipeline_tag: text-to-speech tags: - text-to-speech - tts - indic - tiny - on-device - int8 - int4 --- # Mithi Tiny A very small text-to-speech model for **11 Indian languages** with **2 voices**, made to run on phones, laptops, small boards and inside a web browser. - **Languages:** Hindi, English, Bengali, Gujarati, Kannada, Malayalam, Marathi, Odia, Punjabi, Tamil, Telugu. - **Voices:** Satvik (male) and Charvi (female). Both speak all 11 languages. - **Size:** 13.2 M parameters; **under 10 MB of weights** (9.9 MB). - **Weights:** compressed (int8 and int4) safetensors. - **Output:** 24 kHz mono audio. - **License:** Apache-2.0, free to use, including commercially. See [License](#license). **Try it in your browser:** [Mithi Tiny demo](https://huggingface.co/spaces/Oomni/mithi-tiny-demo). Everything runs on your device; your text is not sent anywhere. ## License Mithi is released under the **Apache License 2.0** (see `LICENSE`). It is **free to use**, for personal, research and commercial projects alike: you can use, modify and redistribute the model and code, and build products on it. Keep the license and the credits (see [Acknowledgements](#acknowledgements)) with any copy you share. Mithi was built entirely on open-source models and tools, each under a permissive license: | Component | License | |---|---| | Maya2-native | Apache-2.0 | | Kokoro-82M | Apache-2.0 | | indic-bert | MIT | | Maya text normaliser | Apache-2.0 | | misaki | Apache-2.0 | Packages installed with `pip` keep their own licenses. ## Quick start **1. Download the model and install the dependencies** (Python 3.10 or newer): ```bash pip install -U huggingface_hub hf download Oomni/mithi-tiny --local-dir mithi-tiny cd mithi-tiny pip install "torch>=2.4" "transformers>=5.0" "safetensors>=0.4" "numpy>=1.26" "soundfile>=0.12" \ "misaki[en]>=0.9.4" "espeakng-loader>=0.2.4" "phonemizer-fork>=3.3.2" "spacy>=3.8" "num2words>=0.5" python -m spacy download en_core_web_sm ``` espeak-ng comes with the `espeakng-loader` package, so no system install is needed. A GPU is used if there is one; the model is small enough to run comfortably on a CPU. **2. Run it from the command line:** ```bash python run.py --lang hi --voice charvi --text "आज मौसम कितना अच्छा है! चलो, शाम को कहीं बाहर घूमने चलते हैं।" --out hindi.wav python run.py --lang en --voice satvik --text "Your appointment is confirmed for Monday at 10:30 AM." --out english.wav ``` **3. Or from Python**, inside the `mithi-tiny` folder: ```python from run import Mithi tts = Mithi() # loads the model from this folder audio = tts.synthesize("नमस्ते! आप कैसे हैं?", lang="hi", voice="charvi") tts.save(audio, "namaste.wav") # 24 kHz WAV for voice in tts.voices: # both voices tts.save(tts.synthesize("வணக்கம்! எப்படி இருக்கீங்க?", lang="ta", voice=voice), f"hello_ta_{voice}.wav") ``` **4. Run on CPU** (laptops, Raspberry Pi, phones, servers without a GPU): ```bash python run.py --device cpu --threads 4 --lang hi --voice satvik --text "आज मौसम कितना अच्छा है!" --out hindi_cpu.wav ``` Set `--threads`: without it PyTorch starts one thread per core, which on a busy many-core machine can be much slower. From Python: ```python import torch torch.set_num_threads(4) from run import Mithi tts = Mithi(device="cpu") tts.save(tts.synthesize("নমস্কার, কেমন আছেন?", lang="bn", voice="charvi"), "namaskar_cpu.wav") ``` Languages: `hi` Hindi · `en` English · `bn` Bengali · `gu` Gujarati · `kn` Kannada · `ml` Malayalam · `mr` Marathi · `or` Odia · `pa` Punjabi · `ta` Tamil · `te` Telugu Long text is read sentence by sentence automatically. ## Voices | Voice | `--voice` | Gender | |---|---|---| | **Satvik** | `satvik` | Male | | **Charvi** | `charvi` | Female | ## Files | File | Contents | |---|---| | `run.py` | everything needed to run the model: command line and Python API | | `config.json` | languages, voices and settings | | `*.safetensors`, `chars.json` | model weights (compressed) and the character table | | `onnx/` | files for the browser demo | | `LICENSE` | Apache License 2.0 | ## Limitations - **Tiny model:** it trades some naturalness for size; the larger Mithi models ([Mithi v1 Edge](https://huggingface.co/Oomni/mithi-v1-edge), [Mithi v2 Flash](https://huggingface.co/Oomni/mithi-v2-flash)) sound more natural and have more voices. - **Two voices** only: Satvik and Charvi. - **Expressiveness:** intonation and emotion are flatter than in natural human speech. - **Pronunciation:** some words, especially rare names and loanwords, can be mispronounced. - **Numbers, dates, currency, URLs** are read only as well as the text normaliser expands them. - **Long text** is read sentence by sentence; each sentence is spoken without seeing the others. - **No published evaluation** yet: no automated scores and no human listening study (MOS). ## Acknowledgements - **[Maya2-native](https://huggingface.co/maya-research/maya2-native)** by Maya Research, Apache-2.0. - **Kokoro-82M:** [hexgrad/kokoro](https://github.com/hexgrad/kokoro), Apache-2.0. - **indic-bert:** [ai4bharat/indic-bert](https://huggingface.co/ai4bharat/indic-bert), MIT. - **[misaki](https://github.com/hexgrad/misaki)** and **espeak-ng**.