YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

πŸŽ™οΈ 10M Modern TTS Engine (2026 Tech: OT-CFM + Vocos)

An ultra-lightweight, edge-device friendly ~10 Million Parameter Text-to-Speech (TTS) engine built with Optimal Transport Conditional Flow Matching (OT-CFM), ConvNeXt-V2 1D Backbone, and Vocos 24kHz Neural Vocoder.


⚑ Why This Architecture Beats Traditional 100M Models

Problem in Old 100M Models Hamare 10M Modern Model Me Solution
"Robot Beep" / Constant Whistle Tone No GAN mode collapse! OT-CFM me koi adversarial discriminator nahi hota, loss pure smooth regression hoti hai.
Data Starvation (Needs 1,000+ hours) 10M size is mathematically balanced for 2–5 hours of single-speaker audio data without overfitting!
Words Skip / Infinite Looping Monotonic Alignment Search (MAS): Text-to-audio alignment strictly monotonic chalti hai, 0% repetition/skipping guarantee!
High Latency & Expensive GPUs Runs blazingly fast on regular CPU in only 4 to 8 ODE steps (< 60ms latency)!

πŸ“Š Exact Parameter Breakdown

==================================================
          10M TTS MODEL PARAMETERS SUMMARY        
==================================================
  Text Encoder (RoPE Transformer): 2,699,776 (~2.70M)
  Duration Predictor:               395,009 (~0.40M)
  Alignment Projection:              20,736 (~0.02M)
  OT-CFM Vector Field:            4,973,904 (~4.97M)
--------------------------------------------------
  TOTAL ACOUSTIC PARAMETERS:      8,089,425 (~8.09M)
  Vocos Neural Vocoder:          ~2,500,000 (~2.50M)
==================================================
  COMPLETE END-TO-END SYSTEM:   ~10,589,425 (~10.5M)
==================================================

πŸ“ 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:

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:

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:

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:

python train.py --metadata dataset/metadata.csv --epochs 100 --batch_size 16 --lr 2e-4
  • Training ke dauran AudioSanityGuardian har step par check karega ki koi robotic beep ya NaN na bane.
  • Har checkpoint par sample audio automatic checkpoints/samples/ folder me generate hogi.

Step 3: Fast Inference

Inference chalane ke liye:

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 studio quality 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:

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:

python app.py

Yeh demo direct Hugging Face Spaces par bina kisi code change ke deploy kiya ja sakta hai!

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support