diff --git a/toolbox/__init__.py b/toolbox/__init__.py index ee96ef3..431ed78 100644 --- a/toolbox/__init__.py +++ b/toolbox/__init__.py @@ -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") diff --git a/vocoder/hifigan/inference.py b/vocoder/hifigan/inference.py index 1475146..ffbe83d 100644 --- a/vocoder/hifigan/inference.py +++ b/vocoder/hifigan/inference.py @@ -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: