Fix bug when searching for vocoder

pull/470/head
babysor00 2022-03-07 20:08:29 +08:00
parent fc26c38152
commit 3c97d22938
2 changed files with 3 additions and 2 deletions

View File

@ -453,7 +453,8 @@ class Toolbox:
model_config_fpaths = list(model_fpath.parent.rglob("*.json"))
if self.vc_mode and self.ui.current_extractor_fpath is None:
return
model_config_fpath = model_config_fpaths[0]
if len(model_config_fpaths) > 0:
model_config_fpath = model_config_fpaths[0]
else:
vocoder = rnn_vocoder
self.ui.log("set wavernn as vocoder")

View File

@ -19,7 +19,7 @@ def load_checkpoint(filepath, device):
return checkpoint_dict
def load_model(weights_fpath, config_fpath="./vocoder/saved_models/24k/config.json", verbose=True):
def load_model(weights_fpath, config_fpath="./vocoder/hifigan/config_16k.json", verbose=True):
global generator, _device, output_sample_rate
if verbose: