Skip to content

Commit 9483a6c

Browse files
Fix: roll back #170 and fix bug in api /tools/random_example (#177)
1 parent 5c37dbd commit 9483a6c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

server.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def wav2(i, o, format):
5050
# 加载模型
5151
models = config.server_config.models
5252
for model in models:
53-
hps_List.append(utils.get_hparams_from_file(model["config_path"]))
53+
hps_List.append(utils.get_hparams_from_file(model["config"]))
5454
# 添加角色字典
5555
chrsMap.append(dict())
5656
for name, cid in hps_List[-1].data.spk2id.items():

server_fastapi.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def get_models(self):
163163
models_info = config.server_config.models
164164
for model_info in models_info:
165165
loaded_models.init_model(
166-
config_path=model_info["config_path"],
166+
config_path=model_info["config"],
167167
model_path=model_info["model"],
168168
device=model_info["device"],
169169
language=model_info["language"],
@@ -550,7 +550,7 @@ def random_example(
550550
examples = all_examples[root_dir]
551551

552552
# 从项目Data目录中搜索train/val.list
553-
for root, directories, _files in os.walk("Data"):
553+
for root, directories, _files in os.walk(root_dir):
554554
for file in _files:
555555
if file in ["train.list", "val.list"]:
556556
with open(

0 commit comments

Comments
 (0)