|
Download README.md from ViuAI/TTS_10M: direct link, hf CLI and curl.
- Browser
- Download file 5.25 kB
-
https://huggingface.co/ViuAI/TTS_10M/resolve/main/README.md
- Command line
-
hf download hf://ViuAI/TTS_10M/README.md
-
curl -L -o README.md https://huggingface.co/ViuAI/TTS_10M/resolve/main/README.md
5.25 kB
| # ποΈ Murli V1.0 β 10M Hindi TTS Engine (`ViuAI/Murli-V1.0`) | |
| **Murli V1.0** (`TTS_10M`) combines a RoPE text encoder, a duration predictor with Monotonic Alignment Search (MAS), a conditional flow-matching (OT-CFM) acoustic model, and the separately loaded Vocos 24 kHz vocoder. Trained for 500 total epochs on 49.28h of single-speaker Hindi studio speech (`ViuAI/ViuAI_Hindi_TTS_50h`). The default sampler uses 48 midpoint steps with `cfg_scale=1.5`, `temperature=0.667`, `sway=-1.0`, and zero-phase de-buzzing. | |
| ## Default parameter counts | |
| ``` | |
| Text Encoder (RoPE Transformer): 2,765,312 (~2.77M) | |
| Duration Predictor: 395,009 (~0.40M) | |
| Mel Prior Projection: 25,700 (~0.03M) | |
| OT-CFM Vector Field: 4,984,164 (~4.98M) | |
| -------------------------------------------------- | |
| TOTAL ACOUSTIC PARAMETERS: 8,170,185 (~8.17M) | |
| Vocos Neural Vocoder: 13,531,650 (~13.53M) | |
| ================================================== | |
| COMPLETE END-TO-END SYSTEM: 21,701,835 (~21.70M) | |
| ================================================== | |
| ``` | |
| --- | |
| ## π Project Structure | |
| ``` | |
| TTS_10M/ | |
| βββ config.py # Hyperparameters, audio config & model parameters | |
| βββ models/ | |
| β βββ convnext.py # ConvNeXt-V2 1D blocks with GRN | |
| β βββ text_encoder.py # Modern Transformer with RoPE embeddings | |
| β βββ duration_predictor.py # Monotonic Alignment Search (MAS) & Duration Net | |
| β βββ flow_matching.py # Optimal Transport CFM ODE Solvers (4-10 steps) | |
| β βββ vocoder.py # Vocos 24kHz neural vocoder wrapper | |
| β βββ tts_engine.py # Full unified 10M TTS Engine | |
| βββ data/ | |
| β βββ audio_processor.py # 24kHz Mel-Spectrogram extractor & normalizer | |
| β βββ text_cleaner.py # Universal multilingual & Hindi/English tokenizer | |
| β βββ dataset.py # PyTorch Dataset & dynamic batch collator | |
| β βββ hf_dataset_sync.py # 1-Click push dataset to Hugging Face Hub | |
| βββ utils/ | |
| β βββ audio_sanity.py # Anti-Beep & NaN Quality Guardian | |
| β βββ checkpoint.py # Safetensors save/load & HF Hub integration | |
| βββ train.py # Training pipeline with AdamW, AMP, & Anti-Beep guards | |
| βββ infer.py # CLI synthesis script (prints latency & RTF metrics) | |
| βββ export_hf.py # 1-Click export & push model to Hugging Face Model Hub | |
| βββ app.py # Interactive Gradio Web UI / Hugging Face Spaces app | |
| βββ requirements.txt # Minimal & modern dependencies | |
| ``` | |
| --- | |
| ## π Step-by-Step Workflow | |
| ### Step 1: Prepare & Push Dataset to Hugging Face | |
| Audio files ko `dataset/wavs/` me rakhein aur transcript file `dataset/metadata.csv` me: | |
| ```csv | |
| wavs/audio_001.wav|Namaste, yeh pehla sentence hai. | |
| wavs/audio_002.wav|Aaj mausam bohot accha hai. | |
| ``` | |
| Apne dataset ko direct Hugging Face Datasets par push karne ke liye: | |
| ```bash | |
| python data/hf_dataset_sync.py --data_dir dataset --metadata dataset/metadata.csv --repo_id ViuAI/ViuAI_TTS_Dataset | |
| ``` | |
| --- | |
| ### Step 2: Model Training | |
| Aap local metadata se ya direct Hugging Face Dataset se train kar sakte hain: | |
| **Option A: Direct Hugging Face Dataset se train karein:** | |
| ```bash | |
| python train.py --hf_dataset ViuAI/ViuAI_TTS_Dataset --language hi --speaker indic_hi_male_1 --epochs 100 --batch_size 16 | |
| ``` | |
| **Option B: Local metadata.csv se train karein:** | |
| ```bash | |
| python train.py --metadata dataset/metadata.csv --epochs 100 --batch_size 16 --lr 2e-4 | |
| ``` | |
| * Audio previews run at the evaluation interval and report numerical and spectral checks. | |
| * Har evaluation par available Vocos ke saath sample audio automatic `checkpoints/samples/` folder me generate hogi. | |
| --- | |
| Mid-epoch resume uses the weights and their companion trainer state. Keep the same data and batch size. For older weights without a verifiable trainer state, use the weights-only warm start. | |
| ```bash | |
| python train.py --metadata dataset/metadata.csv --resume checkpoints/model.safetensors | |
| python train.py --metadata dataset/metadata.csv --init_from checkpoints/model_best.safetensors | |
| ``` | |
| ### Step 3: Fast Inference | |
| Inference chalane ke liye: | |
| ```bash | |
| python infer.py --text "Namaste! Yeh hamara 10M modern TTS model bol raha hai." --checkpoint checkpoints/model.safetensors --steps 8 | |
| ``` | |
| Output `output.wav` me 24,000 Hz PCM WAV me save ho jayega. | |
| --- | |
| ### Step 4: Push Model to Hugging Face Model Hub | |
| Apne trained model weights aur official Model Card ko 1 click me Hugging Face par publish karein: | |
| ```bash | |
| python export_hf.py --checkpoint checkpoints/model.safetensors --repo_id ViuAI/TTS-10M-Modern | |
| ``` | |
| --- | |
| ### Step 5: Interactive Web UI (Gradio / HF Spaces) | |
| Browser me interactive demo chalane ke liye: | |
| ```bash | |
| python app.py | |
| ``` | |
| The CLI and web app look for trained weights under checkpoints/ or model.safetensors in the current directory. The CLI also accepts an explicit diagnostic mode with --allow-random-weights. | |
| Yeh demo direct **Hugging Face Spaces** par bina kisi code change ke deploy kiya ja sakta hai! | |