my-bangla-tts

A single-speaker Bengali (Bangla) text-to-speech model based on the VITS (Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech) architecture, fine-tuned from a base VITS checkpoint using the finetune-hf-vits toolkit.

This model converts Bengali text directly into natural-sounding speech waveforms in a single forward pass, without requiring a separate vocoder.

Model Details

  • Architecture: VITS (VitsModel, Transformers)
  • Language: Bengali (bn)
  • Speakers: Single speaker (num_speakers: 1)
  • Sampling rate: 16,000 Hz
  • Vocabulary size: 74 tokens
  • Framework: PyTorch, Transformers (transformers==4.35.2)
  • Precision: float32

Architecture summary

Component Value
Hidden size 192
Flow size 192
Attention heads 2
Hidden layers 6
FFN dimension 768
Duration predictor Stochastic
Prior encoder WaveNet layers 4
Posterior encoder WaveNet layers 16

Usage

from transformers import VitsModel, VitsTokenizer
import torch
import scipy.io.wavfile as wavfile

model = VitsModel.from_pretrained("tareq052/my-bangla-tts")
tokenizer = VitsTokenizer.from_pretrained("tareq052/my-bangla-tts")

text = "আমার নাম তারেক, আমি একটি বাংলা ভয়েস মডেল তৈরি করেছি।"
inputs = tokenizer(text, return_tensors="pt")

with torch.no_grad():
    output = model(**inputs).waveform

wavfile.write("output.wav", model.config.sampling_rate, output.squeeze().numpy())

Training

This model was fine-tuned on a Bengali speech dataset using the finetune-hf-vits toolkit, which adapts the original VITS architecture for fine-tuning within the Hugging Face transformers ecosystem.

Related Models

An emotion-conditioned variant of this model, fine-tuned on the BEASC (Bengali Emotional Speech Corpus) dataset with four emotions (angry, sad, happy, surprise) mapped to distinct speaker embeddings, is available separately.

Limitations

  • Single-speaker only — this checkpoint does not support speaker or emotion conditioning.
  • Trained on a limited dataset; pronunciation of rare words, numbers, or code-switched (non-Bengali) text may be inconsistent.
  • Output sampling rate is fixed at 16 kHz.

License

Apache 2.0

Downloads last month
104
Safetensors
Model size
36.3M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for tareq052/my-bangla-tts