Maisha0055's picture
Add files using upload-large-folder tool
03505fa verified
|
Raw
History Blame Contribute Delete
1.95 kB
# 🗣️ 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