Spaces:
Running
Running
Commit
·
61f51e4
1
Parent(s):
09dfd9b
feat: add new model sixian-hailu-mix-se
Browse files- app.py +2 -0
- configs/models.yaml +11 -0
app.py
CHANGED
@@ -20,12 +20,14 @@ def load_model(model_id):
|
|
20 |
model_ckpt_path = os.path.join(model_dir, "model.pth")
|
21 |
speaker_file_path = os.path.join(model_dir, "speakers.pth")
|
22 |
language_file_path = os.path.join(model_dir, "language_ids.json")
|
|
|
23 |
|
24 |
temp_config_path = "temp_config.json"
|
25 |
with open(config_file_path, "r") as f:
|
26 |
content = f.read()
|
27 |
content = content.replace("speakers.pth", speaker_file_path)
|
28 |
content = content.replace("language_ids.json", language_file_path)
|
|
|
29 |
f.close()
|
30 |
with open(temp_config_path, "w") as f:
|
31 |
f.write(content)
|
|
|
20 |
model_ckpt_path = os.path.join(model_dir, "model.pth")
|
21 |
speaker_file_path = os.path.join(model_dir, "speakers.pth")
|
22 |
language_file_path = os.path.join(model_dir, "language_ids.json")
|
23 |
+
speaker_embedding_file_path = os.path.join(model_dir, "speaker_embs.pth")
|
24 |
|
25 |
temp_config_path = "temp_config.json"
|
26 |
with open(config_file_path, "r") as f:
|
27 |
content = f.read()
|
28 |
content = content.replace("speakers.pth", speaker_file_path)
|
29 |
content = content.replace("language_ids.json", language_file_path)
|
30 |
+
content = content.replace("speaker_embs.pth", speaker_embedding_file_path)
|
31 |
f.close()
|
32 |
with open(temp_config_path, "w") as f:
|
33 |
f.write(content)
|
configs/models.yaml
CHANGED
@@ -1,5 +1,16 @@
|
|
1 |
sixian-hailu-mix:
|
2 |
model: ${load_model:formospeech/taiwanese-hakka-tts-sixian-hailu-mix}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
avalible_dialect:
|
4 |
- sixian
|
5 |
- hailu
|
|
|
1 |
sixian-hailu-mix:
|
2 |
model: ${load_model:formospeech/taiwanese-hakka-tts-sixian-hailu-mix}
|
3 |
+
avalible_dialect:
|
4 |
+
- sixian
|
5 |
+
- hailu
|
6 |
+
speaker_mapping: # display_name: id
|
7 |
+
sixian/female: XF
|
8 |
+
sixian/male: XM
|
9 |
+
hailu/female: HF
|
10 |
+
hailu/male: HM
|
11 |
+
|
12 |
+
sixian-hailu-mix-se:
|
13 |
+
model: ${load_model:formospeech/taiwanese-hakka-tts-sixian-hailu-mix-se}
|
14 |
avalible_dialect:
|
15 |
- sixian
|
16 |
- hailu
|