dron3flyv3r
commited on
Commit
·
0f92166
1
Parent(s):
002e8bd
Update README.md with usage instructions and example code for MeloTTS model
Browse files
README.md
CHANGED
@@ -1,3 +1,41 @@
|
|
1 |
---
|
2 |
license: mit
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
---
|
4 |
+
|
5 |
+
## Uses
|
6 |
+
This model is trained using the [MeloTTS libary](https://github.com/myshell-ai/MeloTTS).
|
7 |
+
|
8 |
+
## Interface
|
9 |
+
start by cloning the repository and installing the requirements:
|
10 |
+
```bash
|
11 |
+
git clone https://github.com/myshell-ai/MeloTTS.git
|
12 |
+
cd MeloTTS
|
13 |
+
pip install -r requirements.txt
|
14 |
+
```
|
15 |
+
|
16 |
+
Then you can download the model and configure from this repository:
|
17 |
+
<!-- Show how to download the files from a hugginface repo -->
|
18 |
+
```bash
|
19 |
+
huggingface-cli download dron3flyv3r/MeloTTS-GLaDOS config.json --local-dir ./
|
20 |
+
huggingface-cli download dron3flyv3r/MeloTTS-GLaDOS model.pth --local-dir ./
|
21 |
+
```
|
22 |
+
|
23 |
+
You can how use the model by running:
|
24 |
+
```python
|
25 |
+
from MeloTTS.melo.api import TTS
|
26 |
+
|
27 |
+
model = TTS(language="EN", config_path="config.json", ckpt_path="model.pth")
|
28 |
+
|
29 |
+
def tts_file(text: str, path: str):
|
30 |
+
model.tts_to_file(text, 0, path)
|
31 |
+
|
32 |
+
def tts(text: str):
|
33 |
+
temp_path = "temp.wav"
|
34 |
+
tts_file(text, temp_path)
|
35 |
+
play_audio(temp_path)
|
36 |
+
|
37 |
+
tts("Hello, and again, welcome to the Aperture Science computer-aided enrichment center.")
|
38 |
+
```
|
39 |
+
|
40 |
+
## Acknowledgements
|
41 |
+
This model was trained using the [MeloTTS libary](https://github.com/myshell-ai/MeloTTS) by [myshell-ai](https://github.com/myshell-ai/MeloTTS).
|