Downloads · 30 days
13
6% of all-time downloads
Dragneel/nepali-vits2-tts
nepali-vits2-tts is a text-to-speech model from Dragneel. Use it when you need text read aloud. The card lists the license as mit.
Single-speaker Nepali TTS trained from scratch using p0p4k/vits2pytorch on OpenSLR 43.
Downloads · 30 days
13
6% of all-time downloads
All-time downloads
207
Public
Repo size
457 MB
Likes
0
Public
Click a slice to open those files.
.pth457 MB · 100%
From the Hugging Face model README
Single-speaker Nepali TTS trained from scratch using p0p4k/vits2_pytorch on OpenSLR 43.
Status: experimental. Trained for only 54k steps as a comparison run against Dragneel/nepali-vits-tts. For best quality on this dataset, prefer the VITS1 model.
Try it live: Dragneel/nepali-tts Space (select "VITS2 (54k steps)")
use_transformer_flows: true (pre_conv)use_mel_posterior_encoder: trueuse_noise_scaled_mas: trueuse_duration_discriminator: true (dur_disc_1)use_spk_conditioned_encoder: false, n_speakers: 0nepali_vits2.json in this repopip install torch soundfile huggingface_hub
python infer_vits2.py "नमस्ते, काठमाडौं एक सुन्दर शहर हो।"
The script clones p0p4k/vits2_pytorch,
builds the Cython monotonic_align extension, downloads model files, and
writes output_vits2.wav.
Posterior channels = 80: VITS2 with use_mel_posterior_encoder: true
uses mel channels (80), NOT filter_length // 2 + 1 (513). The model
construction must use 80:
net_g = SynthesizerTrn(len(symbols), 80,
hps.train.segment_size // hps.data.hop_length,
**hps.model)
commons.intersperse(t, 0) is required (same as VITS1) — without
it the audio is garbled.
Stale repo clones can break inference: this checkpoint was trained
against a specific attentions.Encoder.forward signature. If your
cloned vits2_pytorch is on an old commit where the inner Encoder
does NOT accept g=None, you'll see:
TypeError: Encoder.forward() got an unexpected keyword argument 'g'
Fix: delete the clone and re-clone fresh from main (the current
upstream Encoder.forward(self, x, x_mask, g=None) is compatible).
The Space's app.py handles this by re-cloning on every cold start.
| File | Text |
|---|---|
| samples/vits2_sample_a.wav | यो नेपाली आवाजको परीक्षण हो |
| samples/vits2_sample_b.wav | काठमाडौं पर्यटनका लागि राम्रो सहर हो |
| samples/vits2_sample_c.wav | पोखरामा पानी परिरहेको छ |
G_54000.pth # generator
config.json # alt config name (use nepali_vits2.json)
nepali_vits2.json # training/inference config (canonical)
nepali_symbols.py # 71 Devanagari grapheme symbols
nepali_cleaners.py # text cleaner (NFC normalize)
infer_vits2.py # ready-to-run inference script
samples/ # WAV demos
VITS2 brings architectural improvements (transformer flows, mel posterior
encoder, duration discriminator) that should yield better quality given
sufficient data and training. On this 3-hour SLR43 corpus at 54k steps, the
gains aren't yet apparent vs. the 100k-step VITS1 checkpoint. Both models
are bottlenecked by dataset size — see the project repo's TRAINING_PLAN.md
for the data-scaling recipe.
MIT. Inherits OpenSLR 43 dataset terms for training data.