π£οΈ Menstrual Bangla TTS
π Model Overview
This model is a LoRA-adapted version of VoxCPM designed for:
- Bangla speech synthesis
- Domain-specific menstrual health narration
- Clean and natural TTS output
- Lightweight inference
Base Model: VoxCPM-0.5B
Fine-tuning: LoRA
Language: Bangla
π Installation
Install required dependencies:
pip install torch soundfile transformers huggingface_hub
π Authentication (Required for Private Models)
If the repository is private, authenticate using:
huggingface-cli login
OR in Python:
from huggingface_hub import login
login()
Use your own Hugging Face access token.
π» Usage Example
import sys
from huggingface_hub import snapshot_download
from pathlib import Path
import soundfile as sf
Replace with your repo path if under organization
repo_id = "SibgatUl/menstrual_bangla_tts"
Download model files
local_dir = snapshot_download(repo_id=repo_id)
print("Downloaded to:", local_dir)
ROOT = Path(local_dir)
Add local model paths
sys.path.insert(0, str(ROOT))
sys.path.insert(0, str(ROOT / "VoxCPM"))
Import loader
from load_model import load_menstrual_bangla_tts
Load model
model = load_menstrual_bangla_tts(str(ROOT))
Generate audio
audio = model.generate(
text="ΰ¦ΰ¦ΰ¦Ώ ΰ¦ΰ¦ΰ¦ΰ¦Ώ ΰ¦ͺΰ¦°ΰ§ΰ¦ΰ§ΰ¦·ΰ¦Ύ",
cfg_value=2.0,
inference_timesteps=10,
)
Save output
sf.write("output.wav", audio, model.tts_model.sample_rate)
print("Generation successful.")
βοΈ Generation Parameters
text β Bangla text input
cfg_value β Guidance strength (default ~2.0)
inference_timesteps β Number of diffusion steps (higher = better quality but slower)
Recommended configuration:
cfg_value = 2.0
inference_timesteps = 10β20
π€ Author
Developed by Maisha Rahman
Affiliation: Machine Intelligence Lab