tiny-voca-hindi / README.md
RL10x's picture
Model card: intro: remove the CPU line
b76940f verified
|
Raw History Blame Contribute Delete
10.3 kB
metadata
language:
  - hi
license: cc-by-4.0
library_name: gguf
pipeline_tag: text-to-speech
tags:
  - text-to-speech
  - tts
  - hindi
  - gguf
  - tiny
  - cpu
datasets:
  - ai4bharat/Rasa

Tiny Voca Hindi (9.7M)

A very small Hindi text-to-speech model: 9.7M parameters, one female voice and eight speaking styles.

It is a Hindi port of tiny-voca: a small transformer predicts timing, pitch and the spectral envelope, and a built-in source-filter synthesizer (a pulse train plus noise, each shaped by a predicted filter) makes the waveform directly. No separate neural vocoder is needed.

Examples

All clips below were made by this model (the 8-bit GGUF in the C++ engine on a laptop CPU, 8 threads). The text is shown as it was typed; numbers, dates, times and money are turned into Hindi words before speaking.

Speaking styles

Neutral · 7.6 s of audio, made in 0.17 s

भारत एक विशाल देश है, जहाँ अनेक भाषाएँ बोली जाती हैं और हर क्षेत्र की अपनी अलग संस्कृति है।

Conversational · 5.0 s of audio, made in 0.11 s

अरे यार, तुम कल आए क्यों नहीं? मैं पूरे दिन तुम्हारा इंतज़ार करती रही।

Happy · 5.3 s of audio, made in 0.12 s

वाह! आज तो कमाल हो गया, मुझे नौकरी मिल गई है, मैं बहुत खुश हूँ!

Sad · 6.1 s of audio, made in 0.13 s

उसके जाने के बाद यह घर बहुत सूना लगता है, कुछ भी पहले जैसा नहीं रहा।

Angry · 4.8 s of audio, made in 0.10 s

मैंने तुमसे कितनी बार कहा है कि मेरी चीज़ों को हाथ मत लगाया करो!

Afraid · 5.8 s of audio, made in 0.13 s

बाहर कोई है... मुझे किसी के कदमों की आवाज़ सुनाई दे रही है, दरवाज़ा बंद कर दो।

Surprised · 4.4 s of audio, made in 0.11 s

क्या? तुमने यह सब अकेले बनाया? मुझे तो यकीन ही नहीं हो रहा!

Disgusted · 4.9 s of audio, made in 0.11 s

छी, यह खाना कितने दिन पुराना है? इसमें से तो बदबू आ रही है।

Numbers, dates and money

Neutral · 12.0 s of audio, made in 0.27 s

मेरा फ़ोन नंबर 9876543210 है और मेरी फ़्लाइट 15/08/2025 को सुबह 7:30 बजे है।

Neutral · 7.7 s of audio, made in 0.18 s

इस फ़ोन की कीमत ₹24,999 है, यानी पिछले साल से 12% कम।

Long passages

Neutral · 36.8 s of audio, made in 1.00 s

मौसम विभाग के अनुसार आज दिल्ली का अधिकतम तापमान 42 डिग्री सेल्सियस दर्ज किया गया, जो पिछले 10 सालों में सबसे ज़्यादा है। सुबह 6 बजे से ही गर्म हवाएँ चलने लगी थीं, और दोपहर 2:30 बजे तक पारा अपने चरम पर पहुँच गया। विभाग ने 15 मई तक लू की चेतावनी जारी की है। अस्पतालों में पिछले 3 दिनों में करीब 250 मरीज़ भर्ती हुए हैं। डॉक्टरों की सलाह है कि लोग दिन में कम से कम 4 लीटर पानी पिएँ और दोपहर 12 से 4 बजे के बीच घर से बाहर न निकलें।

Conversational · 37.7 s of audio, made in 0.96 s

अरे सुनो, कल की ट्रेन सुबह 7:45 की है, प्लेटफ़ॉर्म नंबर 3 से। टिकट मैंने ऑनलाइन बुक कर दिए हैं, दोनों के मिलाकर ₹1,850 लगे। हम दोपहर 1 बजे तक जयपुर पहुँच जाएँगे। होटल वाले ने कहा है कि चेक-इन 2 बजे के बाद होगा, और एक रात का किराया ₹2,400 है। अगर तुम 10 मिनट भी लेट हुए न, तो ट्रेन छूट जाएगी, इसलिए अलार्म 5:30 का लगा लेना। और हाँ, मेरा नया नंबर 9123456780 है, सेव कर लेना।

Neutral · 67.8 s of audio, made in 1.72 s

भारत की आबादी 2023 में लगभग 142 करोड़ तक पहुँच गई, और वह दुनिया का सबसे ज़्यादा आबादी वाला देश बन गया। आज़ादी के समय, यानी 1947 में, यह आबादी सिर्फ़ 34 करोड़ के आसपास थी। पिछले 75 सालों में साक्षरता दर भी 12% से बढ़कर करीब 77% हो गई है। 1991 के आर्थिक सुधारों के बाद देश की अर्थव्यवस्था तेज़ी से बढ़ी, और आज भारत की जीडीपी 3.5 लाख करोड़ डॉलर से ज़्यादा है। गाँवों में भी बदलाव साफ़ दिखता है। 2011 की जनगणना के मुताबिक लगभग 69% लोग गाँवों में रहते थे, लेकिन शहरों की ओर पलायन लगातार बढ़ रहा है। अनुमान है कि 2036 तक शहरों में रहने वाले लोगों की संख्या 60 करोड़ को पार कर जाएगी। आज देश में 90 करोड़ से ज़्यादा लोग इंटरनेट का इस्तेमाल करते हैं, और डिजिटल भुगतान हर महीने 1,000 करोड़ से ज़्यादा लेन-देन तक पहुँच चुका है।

Files

File What it is Size
tts_hi_q8_0.gguf 8-bit weights (transformer matrices Q8_0, everything else float32) for a ggml/C++ engine 11.1 MB
tts_hi_f32.gguf the same in float32 (reference) 38.9 MB
tiny_voca_hindi.pt PyTorch checkpoint (state dict + config), after 100k training steps 38.9 MB
config.json the model configuration

Usage

The inference code is included: Python (speak.py, tiny_voca/, hindi_text/) and a C++ engine on ggml with a small web page (cpp/, web/).

git clone https://huggingface.co/RL10x/tiny-voca-hindi
cd tiny-voca-hindi
pip install -r requirements.txt
python speak.py "आज 15 अगस्त है और तापमान 32 डिग्री है।" --style happy --out happy.wav

Text is normalised first, so numbers, dates, times, money and units are read as Hindi words.

C++ engine (CPU only; CMake downloads ggml v0.29.0 during the first build):

cpp\build.bat          # Windows (Visual Studio 2022 C++ tools)
sh cpp/build.sh        # Linux / macOS
cpp/build/tts_hi --model tts_hi_q8_0.gguf --text "नमस्ते, आप कैसे हैं?" --style conv --out hello.wav
cpp/build/tts_hi --model tts_hi_q8_0.gguf --serve 8090 --page web --threads 4   # web page on http://127.0.0.1:8090

License and credits

The weights are released under CC BY 4.0, following the training data:

  • voice data: Rasa by AI4Bharat (CC BY 4.0);
  • architecture and original code: tiny-voca (Apache-2.0).