--- language: - ckb license: apache-2.0 tags: - text-to-speech - tts - sorani - kurdish - cosyvoice3 - regalabs base_model: FunAudioLLM/Fun-CosyVoice3-0.5B-2512 pipeline_tag: text-to-speech library_name: cosyvoice --- ![RegaLabs-TTS Banner](https://huggingface.co/RegaLabs/RegaLabs-TTS/resolve/main/assets/banner.jpg) # RegaLabs-TTS: CosyVoice 3 Central Kurdish (Sorani) Adaptation **RegaLabs-TTS** is a high-quality Central Kurdish (Sorani / سۆرانی) text-to-speech adaptation developed by **RegaLabs** based on **CosyVoice 3**. * **Hugging Face Model:** [`RegaLabs/RegaLabs-TTS`](https://huggingface.co/RegaLabs/RegaLabs-TTS) * **GitHub Repository:** [`RegaLabs/RegaLabs-TTS`](https://github.com/RegaLabs/RegaLabs-TTS) --- ![RegaLabs-TTS Features](https://huggingface.co/RegaLabs/RegaLabs-TTS/resolve/main/assets/features.jpg) --- ## 🎧 Audio Example Listen to a generated Sorani audio sample: [🔊 Download Sample Audio WAV](https://huggingface.co/RegaLabs/RegaLabs-TTS/resolve/main/samples/aran_en021.wav) --- ## 📊 Dataset & Model Capabilities * **Dataset Volume:** Trained on **53 hours** of high-quality Sorani Kurdish speech data. * **Male Speakers:** ~35–40 hours. * **Female Speakers:** ~13–18 hours. * **Voice Cloning Performance:** * **Male Voices:** Evaluated and tested — clones male voices **flawlessly** with high similarity, prosody accuracy, and natural tone. * **Female Voices:** Untested — zero-shot female voice cloning has not been evaluated yet. --- ## 💻 Installation & Usage ### 1. Install via `pip` ```bash pip install git+https://github.com/RegaLabs/RegaLabs-TTS.git ``` ### 2. Download Model Weights & Run Inference ```bash # 1. Clone base engine git clone --recursive https://github.com/FunAudioLLM/CosyVoice.git cd CosyVoice pip install -r requirements.txt # 2. Clone RegaLabs-TTS model repo git clone https://huggingface.co/RegaLabs/RegaLabs-TTS regalabs-tts-weights # 3. Synthesize speech (the Sorani LLM adapter and flow checkpoint ship in the repo) python regalabs-tts-weights/infer.py \ --text "سڵاو، بەخێربێن بۆ پڕۆژەی RegaLabs-TTS" \ --prompt-wav regalabs-tts-weights/samples/aran_en021.wav \ --prompt-text "دەنگێکی لەسەرخۆ، هێمن و پڕ لە بڕوابەخۆبوون." \ --out output_sorani.wav ``` ### 3. Launch Web Demo (Gradio) ```bash python regalabs-tts-weights/app.py ``` --- ## 📦 Model Artifacts * `cosyvoice3_sorani_flow_best_step2300.pt` — Sorani acoustic/flow adaptation model weights (Step 2300). * `cosyvoice3_sorani_lora_refined_best.pt` — Sorani LLM LoRA adapter (required for Sorani speech). * `cosyvoice3_sorani_flow_best_step2300.yaml` — Matching flow architecture configuration. * `infer.py` — Ready-to-run Sorani inference script. * `app.py` — Gradio Web UI Live Demo script. * `sorani/censor.py` — Fail-closed Sorani sexual-word filter with integrity checks (see below). * `samples/aran_en021.wav` — Sample generated audio snippet. * `assets/` — Project banners & graphics. --- ## 🚫 Content Filtering & Model Integrity RegaLabs-TTS ships with a **fail-closed Sorani content filter** (`sorani/censor.py`). Sexual obscenities are bleeped (`......`) before synthesis instead of being spoken. * **Blocked vocabulary:** a curated, dictionary-verified blocklist of Sorani sexual obscenities (the exact terms are defined in `sorani/censor.py`). Inflected forms and spelling variants are caught automatically. * **Tamper protection:** the word list is SHA-256-signed, and the flow checkpoint must match the official SHA-256 (`033abd6f...`). If either is modified, synthesis refuses to run — the model "breaks itself" rather than speaking uncensored. * **Re-signing (only for official model updates):** `python sorani/censor.py --rehash` re-signs the word list; `python sorani/censor.py --sign-checkpoint PATH` signs a newly released official checkpoint. * **Honest limitation:** TTS censorship lives in the text layer (the weights themselves cannot refuse words), so a determined attacker with full code access can patch the checks out. This protects against accidental or naive removal and model swaps, not against deliberate reverse engineering. --- ## ⚠️ Responsible Use & No-Liability Disclaimer RegaLabs-TTS is a **voice-cloning-capable** TTS system. It generates whatever text it is given, in whichever voice it is prompted with. RegaLabs: * **is NOT responsible** for any content generated with this system, or for how it is used, modified, or redistributed — the user is solely responsible for the legality and consequences of their use; * **prohibits** cloning the voice of any real person without that person's explicit consent, and prohibits use for impersonation, fraud, deepfakes, scams, defamation, harassment, sexual content involving minors, or any illegal activity (see Section 4 of the `LICENSE`); * **warns** that all generated audio should be treated as potentially synthetic; never rely on model output as evidence of a real person's words. **Voice consent rule:** zero-shot voice cloning is only permitted with the speaker's own approval, or for voices you own or are authorized to use. --- ## 📜 License & Mandatory Attribution * **Model Checkpoint & Codebase:** Licensed under **Apache 2.0** by **RegaLabs**. Commercial and non-commercial use is **fully allowed**, provided mandatory credit for RegaLabs is included and the consent/prohibited-uses conditions in the LICENSE are respected. * **Stock Voices & Audio Samples:** **Non-Commercial Use Only**. Pre-packaged stock prompt voice samples and demo audio files (including samples in `samples/`) are strictly restricted to non-commercial use and prohibited for commercial voice cloning/redistribution. ### 📌 Credit & Attribution Guidelines Any public use, generated media (videos, podcasts, audiobooks, broadcasts, or AI services), software, or derivative works utilizing **RegaLabs-TTS** MUST explicitly provide visible credit to **RegaLabs**: * **For Videos & Audio Content:** Include in description/credits: *"Voice synthesized using RegaLabs-TTS by RegaLabs"* or *"Audio powered by RegaLabs"*. * **For Applications & Software:** Include attribution in application credits or about section.