Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: TTS
|
3 |
+
task: text-to-speech
|
4 |
+
tags:
|
5 |
+
- Persian
|
6 |
+
- TTS
|
7 |
+
- Farsi
|
8 |
+
- Coqui
|
9 |
+
- CoquiTTS
|
10 |
+
- pytorch
|
11 |
+
- audio
|
12 |
+
- text-to-speech
|
13 |
+
language: fa
|
14 |
+
datasets:
|
15 |
+
- persian-tts-dataset-famale
|
16 |
+
widget:
|
17 |
+
- text: ".زندگی فقط یک بار است؛ از آن به خوبی استفاده کن"
|
18 |
+
example_title: "Hello, this is a test run."
|
19 |
+
---
|
20 |
+
|
21 |
+
# **persian-tts-female-glow_tts**
|
22 |
+
|
23 |
+
- persian-tts-female glow_tts model for text to speech purposes.
|
24 |
+
- Persian فارسی
|
25 |
+
- Single-speaker female voice
|
26 |
+
- Trained on [persian-tts-dataset-famale](https://www.kaggle.com/datasets/magnoliasis/persian-tts-dataset-famale)
|
27 |
+
- [GitHub Repo](https://github.com/coqui-ai/TTS)
|
28 |
+
# **Uses**
|
29 |
+
|
30 |
+
Install dependencies:
|
31 |
+
```python
|
32 |
+
!pip install TTS
|
33 |
+
!sudo apt-get -y install espeak-ng
|
34 |
+
```
|
35 |
+
|
36 |
+
Generate audio from text:
|
37 |
+
|
38 |
+
##### using cli:
|
39 |
+
```python
|
40 |
+
!tts --text "زندگی فقط یک بار است؛ از آن به خوبی استفاده کن" \
|
41 |
+
--model_path "/coqui_training/run-July-31-2022_10+54AM-0000000/checkpoint_24000.pth" \
|
42 |
+
--config_path "/coqui_training/run-July-31-2022_10+54AM-0000000/config.json" \
|
43 |
+
--out_path "speech1.wav"
|
44 |
+
```
|
45 |
+
##### python api:
|
46 |
+
|
47 |
+
```python
|
48 |
+
|
49 |
+
from TTS.config import load_config
|
50 |
+
from TTS.utils.manage import ModelManager
|
51 |
+
from TTS.utils.synthesizer import Synthesizer
|
52 |
+
|
53 |
+
basepath="/train_output/run-December-24-2022_09+28AM-0000000"
|
54 |
+
config=basepath+"/config.json"
|
55 |
+
model=basepath+"/best_model.pth"
|
56 |
+
|
57 |
+
model_path =model # Absolute path to the model checkpoint.pth
|
58 |
+
config_path =config # Absolute path to the model config.json
|
59 |
+
|
60 |
+
text=".زندگی فقط یک بار است؛ از آن به خوبی استفاده کن"
|
61 |
+
|
62 |
+
synthesizer = Synthesizer(
|
63 |
+
model_path, config_path
|
64 |
+
)
|
65 |
+
wavs = synthesizer.tts(text)
|
66 |
+
synthesizer.save_wav(wavs, 'sp.wav')
|
67 |
+
```
|
68 |
+
Display audio:
|
69 |
+
|
70 |
+
|
71 |
+
```python
|
72 |
+
import IPython
|
73 |
+
IPython.display.Audio('sp.wav')
|
74 |
+
```
|
75 |
+
|
76 |
+
|
77 |
+
- **Hours used:** 10
|
78 |
+
- **Cloud Provider:** kaggle
|
79 |
+
|
80 |
+
|
81 |
+
|
82 |
+
# How to Get Started with the Model
|
83 |
+
|
84 |
+
Use the code below to get started with the model.
|
85 |
+
|
86 |
+
<details>
|
87 |
+
<summary> Click to expand </summary>
|
88 |
+
|
89 |
+
More information needed
|
90 |
+
|
91 |
+
</details>
|