|
|
--- |
|
|
license: cc-by-nc-4.0 |
|
|
language: |
|
|
- fa |
|
|
base_model: |
|
|
- ResembleAI/chatterbox |
|
|
- speechbrain/sepformer-wham16k-enhancement |
|
|
tags: |
|
|
- text-to-speech |
|
|
- Farsi |
|
|
- Persian |
|
|
- voice-cloning |
|
|
datasets: |
|
|
- Thomcles/Persian-Farsi-Speech |
|
|
--- |
|
|
|
|
|
# Chatterbox Persian-Farsi |
|
|
## **training High quality TTS with low ressource data** |
|
|
|
|
|
**Chatterbox-TTS-Persian-Farsi** is a TTS trained on data that I cleaned, denoised, and filtered. |
|
|
|
|
|
The total cost of the TTS is **$150** on my cloud hardware. |
|
|
|
|
|
If you find this model useful and high-quality, and would like to support my work, you can send me money via ko-fi, or like it on huggingface. |
|
|
|
|
|
|
|
|
|
|
|
Dataset : [Thomcles/Persian-Farsi-Speech](https://huggingface.co/datasets/Thomcles/Persian-Farsi-Speech) |
|
|
|
|
|
--- |
|
|
|
|
|
<div align="center"><img width="400px" src="https://www.shutterstock.com/image-vector/persian-typography-iranian-art-translated-600nw-2053950194.jpg" alt="Iranian art" /></div> |
|
|
|
|
|
--- |
|
|
|
|
|
## contact : |
|
|
|
|
|
e-mail : [email protected] |
|
|
|
|
|
|
|
|
### demo audios: |
|
|
|
|
|
"سلام! به آزمایش تبدیل متن به گفتار خوش آمدید." |
|
|
<audio controls src="https://huggingface.co/Thomcles/Chatterbox-TTS-French/resolve/main/demo_audios/fa_0.mp3">Your browser does not support audio.</audio> |
|
|
|
|
|
"سه سیب سرخ روی سینی سیمی است" |
|
|
<audio controls src="https://huggingface.co/Thomcles/Chatterbox-TTS-French/resolve/main/demo_audios/fa_1.mp3">Your browser does not support audio.</audio> |
|
|
|
|
|
"دیروز در تهران باران شد، امروز آفتابی است" |
|
|
<audio controls src="https://huggingface.co/Thomcles/Chatterbox-TTS-French/resolve/main/demo_audios/fa_2.mp3">Your browser does not support audio.</audio> |
|
|
|
|
|
"قیمت لپتاپ جدید من پنجاه میلیون تومان است." |
|
|
<audio controls src="https://huggingface.co/Thomcles/Chatterbox-TTS-French/resolve/main/demo_audios/fa_3.mp3">Your browser does not support audio.</audio> |
|
|
|
|
|
"علی، نرگس و یوسف به دانشگاه شیراز رفتند." |
|
|
<audio controls src="https://huggingface.co/Thomcles/Chatterbox-TTS-French/resolve/main/demo_audios/fa_4.mp3">Your browser does not support audio.</audio> |
|
|
|
|
|
"لطفاً جملهٔ قبل را دوباره تکرار کن، دوباره تکرار کن، دوباره تکرار کن!" |
|
|
<audio controls src="https://huggingface.co/Thomcles/Chatterbox-TTS-French/resolve/main/demo_audios/fa_5.mp3">Your browser does not support audio.</audio> |
|
|
|
|
|
### 💻 Inference Code |
|
|
|
|
|
First, download the file from huggingface and place it in the current directory. |
|
|
|
|
|
The pypi version is delayed, so you must use the github version. |
|
|
|
|
|
``` |
|
|
!git clone https://github.com/resemble-ai/chatterbox.git chatterbox_git |
|
|
``` |
|
|
|
|
|
``` |
|
|
pip install chatterbox-tts |
|
|
``` |
|
|
|
|
|
```python |
|
|
from chatterbox_git.src.chatterbox import mtl_tts |
|
|
import torchaudio as ta |
|
|
from safetensors.torch import load_file as load_safetensors |
|
|
|
|
|
device = "cpu" # or mps or cuda |
|
|
|
|
|
multilingual_model = mtl_tts.ChatterboxMultilingualTTS.from_pretrained(device=device) |
|
|
|
|
|
# ---- |
|
|
# Then download the file from huggingface and place it in the current directory. |
|
|
# ---- |
|
|
|
|
|
|
|
|
t3_state = load_safetensors("t3_fa.safetensors", device="cpu") |
|
|
multilingual_model.t3.load_state_dict(t3_state) |
|
|
multilingual_model.t3.to(device).eval() |
|
|
|
|
|
persian_text = "سلام! به آزمایش تبدیل متن به گفتار خوش آمدید." |
|
|
wav_persian = multilingual_model.generate(persian_text, language_id=None) |
|
|
ta.save("test-fa.wav", wav_persian, multilingual_model.sr) |
|
|
``` |
|
|
|
|
|
|
|
|
## License |
|
|
This template is published under a [CC BY-NC 4.0 license](https://choosealicense.com/licenses/cc-by-4.0/). |
|
|
**Commercial use is prohibited without permission.** For a commercial license, please contact me at: [[email protected]](mailto:[email protected]). |
|
|
|
|
|
## ☕ Support |
|
|
|
|
|
I trained this model from my own financial resources with the sole aim of offering it to the huggingface open source community. |
|
|
|
|
|
This model has cost me a lot of money. If you find this checkpoint useful and would like to support my work, you can do it via Ko-fi: |
|
|
|
|
|
<p align="center"> |
|
|
<a href="https://ko-fi.com/thomcles" target="_blank" rel="noopener noreferrer"> |
|
|
<img src="https://storage.ko-fi.com/cdn/kofi3.png?v=3" alt="Buy Me a Coffee at ko-fi.com" width="200" rel="noopener noreferrer"/> |
|
|
</a> |
|
|
</p> |