Text-to-Speech
VoxCPM
Laz
Turkish
tts
speech-synthesis
audio
laz
lazca
lazuri
lora
low-resource
endangered-languages
turkey
mozilla-common-voice
Instructions to use Anadilorg/MozilLaz with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- VoxCPM
How to use Anadilorg/MozilLaz with VoxCPM:
import soundfile as sf from voxcpm import VoxCPM model = VoxCPM.from_pretrained("Anadilorg/MozilLaz") wav = model.generate( text="VoxCPM is an innovative end-to-end TTS model from ModelBest, designed to generate highly expressive speech.", prompt_wav_path=None, # optional: path to a prompt speech for voice cloning prompt_text=None, # optional: reference text cfg_value=2.0, # LM guidance on LocDiT, higher for better adherence to the prompt, but maybe worse inference_timesteps=10, # LocDiT inference timesteps, higher for better result, lower for fast speed normalize=True, # enable external TN tool denoise=True, # enable external Denoise tool retry_badcase=True, # enable retrying mode for some bad cases (unstoppable) retry_badcase_max_times=3, # maximum retrying times retry_badcase_ratio_threshold=6.0, # maximum length restriction for bad case detection (simple but effective), it could be adjusted for slow pace speech ) sf.write("output.wav", wav, 16000) print("saved: output.wav") - Notebooks
- Google Colab
- Kaggle
| license: mit | |
| language: | |
| - lzz | |
| - tur | |
| tags: | |
| - text-to-speech | |
| - tts | |
| - lazuri | |
| - laz | |
| - voxcpm | |
| - lora | |
| - turkish | |
| - mozilla | |
| pipeline_tag: text-to-speech | |
| # Model Card: MozilLaz | |
| ## Model Detayları | |
| **MozilLaz**, VoxCPM2 mimarisi üzerine LoRA fine-tuning ile eğitilmiş bir Lazca (Lazuri) Text-to-Speech modelidir. Mozilla'nın açık kaynak Lazca veri setleri kullanılarak eğitilmiştir. | |
| ### Yapı | |
| - **Base Model:** openbmb VoxCPM2 | |
| - **Adapter:** LoRA (r=32, alpha=32) | |
| - **Çıktı Sample Rate:** 48 kHz | |
| - **Model Formatı:** Safetensors (LoRA weights ~70MB) | |
| ### Eğitim | |
| - **Eğitim Verisi:** ~21,000 segment Mozilla Lazca veri setinden | |
| - **Eğitim Adımları:** 2,000 | |
| - **Learning Rate:** 0.0001 | |
| - **Batch Size:** 2 (gradient accumulation: 8 → effective batch: 16) | |
| ### Sınırlamalar | |
| - Tek konuşucu modeli (spk_tmp_001) | |
| - Çoklu konuşucu veya çoklu dil desteği yok | |
| - Kısa cümleler için optimize edilmiştir (21071 training sample ortalaması) | |
| - Mozilla Lazca veri setinde olmayan Lazca lehçe veya sözlük kalıpları için sınırlı genelleme | |
| ## Kullanım | |
| Modeli kullanmak için [inference.py](./inference.py) dosyasını referans alın. | |
| ### CLI Kullanımı | |
| ```bash | |
| python inference.py --text "[speaker:spk_tmp_001 language:lzz] Metin burada" --output output.wav | |
| ``` | |
| ### Python API | |
| Ağırlıklar `peft` formatında değildir; `voxcpm` paketinin kendi (native) LoRA | |
| desteğiyle yüklenir: | |
| ```python | |
| import json | |
| from voxcpm import VoxCPM | |
| from voxcpm.model.voxcpm import LoRAConfig | |
| with open("lora_config.json") as f: | |
| lc = json.load(f)["lora_config"] | |
| cfg = LoRAConfig(**{k: v for k, v in lc.items() if k in LoRAConfig.model_fields}) | |
| model = VoxCPM.from_pretrained( | |
| "openbmb/VoxCPM2", | |
| lora_config=cfg, | |
| lora_weights_path="lora_weights.safetensors", | |
| ) | |
| audio = model.generate( | |
| text="[speaker:spk_tmp_001 language:lzz] Nanışkimi uç den ikayme.", | |
| inference_timesteps=10, | |
| cfg_value=2.0 | |
| ) | |
| ``` | |
| ## Lisans | |
| Bu model MIT lisansı altında sunulmuştur. | |