Spaces:
Running
Running
Yurii Paniv
commited on
Commit
•
c1ec4bf
1
Parent(s):
57c5ab0
#8 Add example how to run package
Browse files
README.md
CHANGED
@@ -50,7 +50,22 @@ https://user-images.githubusercontent.com/5759207/190852259-c6746172-05c4-4918-8
|
|
50 |
https://user-images.githubusercontent.com/5759207/190852270-7aed2db9-dc08-4a9f-8775-07b745657ca1.mp4
|
51 |
|
52 |
# How to use: 📢
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
1. `pip install -r requirements.txt`.
|
55 |
2. Download `model.pth` and `speakers.pth` from "Releases" tab.
|
56 |
3. Launch as one-time command:
|
|
|
50 |
https://user-images.githubusercontent.com/5759207/190852270-7aed2db9-dc08-4a9f-8775-07b745657ca1.mp4
|
51 |
|
52 |
# How to use: 📢
|
53 |
+
As a package:
|
54 |
+
1. Install using command:
|
55 |
+
```
|
56 |
+
pip install git+https://github.com/robinhad/ukrainian-tts.git
|
57 |
+
```
|
58 |
+
2. Run a code snippet:
|
59 |
+
```python
|
60 |
+
from ukrainian_tts.tts import TTS, Voices, StressOption
|
61 |
+
|
62 |
+
tts = TTS()
|
63 |
+
with open("test.wav", mode="wb") as file:
|
64 |
+
tts.tts("Привіт", Voices.Olena.value, StressOption.Model.value, file)
|
65 |
+
```
|
66 |
+
|
67 |
+
Run manually:
|
68 |
+
`Caution: this won't use normalizer and autostress like a web demo. `
|
69 |
1. `pip install -r requirements.txt`.
|
70 |
2. Download `model.pth` and `speakers.pth` from "Releases" tab.
|
71 |
3. Launch as one-time command:
|