Spaces:
Runtime error
Runtime error
Commit
ยท
3b4975a
1
Parent(s):
f745733
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,22 @@ my_inputs = [
|
|
17 |
|
18 |
my_outputs = gr.outputs.Audio(type="file", label="Output Audio")
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
def tts(text: str):
|
|
|
21 |
best_model_path = hf_hub_download(repo_id=REPO_ID, filename="model.pth")
|
22 |
config_path = hf_hub_download(repo_id=REPO_ID, filename="config.json")
|
23 |
vocoder_path = hf_hub_download(repo_id=REPO_ID, filename="vocoder.pth")
|
|
|
17 |
|
18 |
my_outputs = gr.outputs.Audio(type="file", label="Output Audio")
|
19 |
|
20 |
+
def belarusify_russian_text(text: str):
|
21 |
+
text = text.replace("ะธ", "ั")
|
22 |
+
text = text.replace("ัั", "ัั")
|
23 |
+
text = text.replace("ะพั", "ะพั")
|
24 |
+
text = text.replace("ะฐั", "ะฐั")
|
25 |
+
text = text.replace("ัั", "ัั")
|
26 |
+
text = text.replace("ัั", "ัั")
|
27 |
+
text = text.replace("ัั", "ัั")
|
28 |
+
text = text.replace("ะตั", "ะตั")
|
29 |
+
text = text.replace("ัั", "ัั")
|
30 |
+
text = text.replace("ั", "ัั")
|
31 |
+
return text
|
32 |
+
|
33 |
+
|
34 |
def tts(text: str):
|
35 |
+
text = belarusify_russian_text(text)
|
36 |
best_model_path = hf_hub_download(repo_id=REPO_ID, filename="model.pth")
|
37 |
config_path = hf_hub_download(repo_id=REPO_ID, filename="config.json")
|
38 |
vocoder_path = hf_hub_download(repo_id=REPO_ID, filename="vocoder.pth")
|