Spaces:
Running
Running
Yurii Paniv
commited on
Commit
•
312c1fb
1
Parent(s):
c00658c
Add metrics
Browse files- README.md +1 -0
- app.py +11 -0
- flagged/uk-tts-output +1 -0
README.md
CHANGED
@@ -14,6 +14,7 @@ pinned: false
|
|
14 |
Ukrainian TTS (text-to-speech) using Coqui TTS.
|
15 |
|
16 |
Link to online demo -> [https://huggingface.co/spaces/robinhad/ukrainian-tts](https://huggingface.co/spaces/robinhad/ukrainian-tts)
|
|
|
17 |
Link to source code and models -> [https://github.com/robinhad/ukrainian-tts](https://github.com/robinhad/ukrainian-tts)
|
18 |
Telegram bot -> [https://t.me/uk_tts_bot](https://t.me/uk_tts_bot)
|
19 |
|
|
|
14 |
Ukrainian TTS (text-to-speech) using Coqui TTS.
|
15 |
|
16 |
Link to online demo -> [https://huggingface.co/spaces/robinhad/ukrainian-tts](https://huggingface.co/spaces/robinhad/ukrainian-tts)
|
17 |
+
Note: online demo saves user input to improve user experience, by using it you give your consent to analyze this data.
|
18 |
Link to source code and models -> [https://github.com/robinhad/ukrainian-tts](https://github.com/robinhad/ukrainian-tts)
|
19 |
Telegram bot -> [https://t.me/uk_tts_bot](https://t.me/uk_tts_bot)
|
20 |
|
app.py
CHANGED
@@ -4,6 +4,7 @@ from datetime import datetime
|
|
4 |
from enum import Enum
|
5 |
from ukrainian_tts.tts import TTS, Stress, Voices
|
6 |
from torch.cuda import is_available
|
|
|
7 |
|
8 |
class StressOption(Enum):
|
9 |
AutomaticStress = "Автоматичні наголоси (за словником) 📖"
|
@@ -57,6 +58,13 @@ def tts(text: str, voice: str, stress: str):
|
|
57 |
_, text = ukr_tts.tts(text, speaker_name, stress_selected, fp)
|
58 |
return fp.name, text
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
with open("README.md") as file:
|
62 |
article = file.read()
|
@@ -115,5 +123,8 @@ iface = gr.Interface(
|
|
115 |
StressOption.AutomaticStress.value,
|
116 |
],
|
117 |
],
|
|
|
|
|
|
|
118 |
)
|
119 |
iface.launch(enable_queue=True)
|
|
|
4 |
from enum import Enum
|
5 |
from ukrainian_tts.tts import TTS, Stress, Voices
|
6 |
from torch.cuda import is_available
|
7 |
+
from os import environ
|
8 |
|
9 |
class StressOption(Enum):
|
10 |
AutomaticStress = "Автоматичні наголоси (за словником) 📖"
|
|
|
58 |
_, text = ukr_tts.tts(text, speaker_name, stress_selected, fp)
|
59 |
return fp.name, text
|
60 |
|
61 |
+
if environ["HF_API_TOKEN"] is None:
|
62 |
+
print("Using default flagging.")
|
63 |
+
flagging_callback = gr.CSVLogger()
|
64 |
+
else:
|
65 |
+
print("Using HuggingFace dataset saver.")
|
66 |
+
flagging_callback = gr.HuggingFaceDatasetSaver(hf_token=environ["HF_API_TOKEN"], dataset_name="uk-tts-output", private=True)
|
67 |
+
|
68 |
|
69 |
with open("README.md") as file:
|
70 |
article = file.read()
|
|
|
123 |
StressOption.AutomaticStress.value,
|
124 |
],
|
125 |
],
|
126 |
+
allow_flagging="auto",
|
127 |
+
flagging_callback=flagging_callback,
|
128 |
+
flagging_options=None
|
129 |
)
|
130 |
iface.launch(enable_queue=True)
|
flagged/uk-tts-output
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Subproject commit edbf469f4a6b6f20bb1ccf1d54b274435ad9e554
|