Skip to content

Commit

Permalink
Fix: roll back #170 and fix bug in api /tools/random_example (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangyuxiaoxiao authored Nov 11, 2023
1 parent 5c37dbd commit 9483a6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def wav2(i, o, format):
# 加载模型
models = config.server_config.models
for model in models:
hps_List.append(utils.get_hparams_from_file(model["config_path"]))
hps_List.append(utils.get_hparams_from_file(model["config"]))
# 添加角色字典
chrsMap.append(dict())
for name, cid in hps_List[-1].data.spk2id.items():
Expand Down
4 changes: 2 additions & 2 deletions server_fastapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def get_models(self):
models_info = config.server_config.models
for model_info in models_info:
loaded_models.init_model(
config_path=model_info["config_path"],
config_path=model_info["config"],
model_path=model_info["model"],
device=model_info["device"],
language=model_info["language"],
Expand Down Expand Up @@ -550,7 +550,7 @@ def random_example(
examples = all_examples[root_dir]

# 从项目Data目录中搜索train/val.list
for root, directories, _files in os.walk("Data"):
for root, directories, _files in os.walk(root_dir):
for file in _files:
if file in ["train.list", "val.list"]:
with open(
Expand Down

0 comments on commit 9483a6c

Please sign in to comment.