Spaces:
Running
Running
Cambio app.py
Browse files
app.py
CHANGED
@@ -15,21 +15,22 @@ print(MODEL_NAMES)
|
|
15 |
|
16 |
|
17 |
def tts(text: str,
|
18 |
-
model_file: str = "
|
19 |
):
|
20 |
|
21 |
-
model_path = os.path.join(os.getcwd(), model_file)
|
22 |
# if text is "celtia" take celtia.pth and celtia_config.json
|
23 |
-
if
|
24 |
config_path = "celtia_config.json"
|
25 |
-
|
26 |
-
elif
|
27 |
config_path = "icia_config.json"
|
28 |
-
|
29 |
else:
|
30 |
config_path = "sabela_config.json"
|
31 |
-
|
32 |
|
|
|
|
|
33 |
vocoder_path = None
|
34 |
vocoder_config_path = None
|
35 |
|
|
|
15 |
|
16 |
|
17 |
def tts(text: str,
|
18 |
+
model_file: str = "sabela.pth"
|
19 |
):
|
20 |
|
|
|
21 |
# if text is "celtia" take celtia.pth and celtia_config.json
|
22 |
+
if model_file == "Celtia":
|
23 |
config_path = "celtia_config.json"
|
24 |
+
model_path = "celtia.pth"
|
25 |
+
elif model_file == "Icia":
|
26 |
config_path = "icia_config.json"
|
27 |
+
model_path = "icia.pth"
|
28 |
else:
|
29 |
config_path = "sabela_config.json"
|
30 |
+
model_path = "sabela.pth"
|
31 |
|
32 |
+
model_path = os.path.join(os.getcwd(), model_file)
|
33 |
+
|
34 |
vocoder_path = None
|
35 |
vocoder_config_path = None
|
36 |
|