Update README.md
Browse files
README.md
CHANGED
|
@@ -70,11 +70,20 @@ pip install coqui-tts
|
|
| 70 |
|
| 71 |
```python
|
| 72 |
from TTS.api import TTS
|
|
|
|
|
|
|
| 73 |
|
| 74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
|
| 76 |
tts.tts_to_file(
|
| 77 |
-
text="
|
| 78 |
file_path="output.wav"
|
| 79 |
)
|
| 80 |
```
|
|
|
|
| 70 |
|
| 71 |
```python
|
| 72 |
from TTS.api import TTS
|
| 73 |
+
from huggingface_hub import snapshot_download
|
| 74 |
+
import os
|
| 75 |
|
| 76 |
+
# Hugging Face-dan model papkasini kompyuter keshiga yuklab olish
|
| 77 |
+
model_dir = snapshot_download(repo_id="jahongirtech/XurmoTTS")
|
| 78 |
+
|
| 79 |
+
model_path = os.path.join(model_dir, "model.pth") # Repodagi .pth fayl nomi
|
| 80 |
+
config_path = os.path.join(model_dir, "config.json")
|
| 81 |
+
|
| 82 |
+
# Modelni ishga tushirish
|
| 83 |
+
tts = TTS(model_path=model_path, config_path=config_path, gpu=False)
|
| 84 |
|
| 85 |
tts.tts_to_file(
|
| 86 |
+
text="Xurmo media loyihasi muvoffaqqiyatli ishlayapdi",
|
| 87 |
file_path="output.wav"
|
| 88 |
)
|
| 89 |
```
|