From 98fd3b53f293e6908509982f22b4ad8479a566b5 Mon Sep 17 00:00:00 2001 From: erogol Date: Mon, 15 Jun 2020 11:28:27 +0200 Subject: [PATCH] load mel features if 'feature_path' is provided --- vocoder/configs/multiband_melgan_config.json | 2 +- vocoder/train.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/vocoder/configs/multiband_melgan_config.json b/vocoder/configs/multiband_melgan_config.json index 164fe037..81048e31 100644 --- a/vocoder/configs/multiband_melgan_config.json +++ b/vocoder/configs/multiband_melgan_config.json @@ -111,7 +111,7 @@ // OPTIMIZER "noam_schedule": false, // use noam warmup and lr schedule. "warmup_steps_gen": 4000, // Noam decay steps to increase the learning rate from 0 to "lr" - "warmup_steps_disc": 4000, + "warmup_steps_disc": 4000, // Noam decay steps to increase the learning rate from 0 to "lr" "epochs": 10000, // total number of epochs to train. "wd": 0.0, // Weight decay weight. "gen_clip_grad": -1, // Generator gradient clipping threshold. Apply gradient clipping if > 0 diff --git a/vocoder/train.py b/vocoder/train.py index 41b3c1ec..fd44c470 100644 --- a/vocoder/train.py +++ b/vocoder/train.py @@ -441,7 +441,12 @@ def evaluate(model_G, criterion_G, model_D, criterion_D, ap, global_step, epoch) def main(args): # pylint: disable=redefined-outer-name # pylint: disable=global-variable-undefined global train_data, eval_data - eval_data, train_data = load_wav_data(c.data_path, c.eval_split_size) + print(f" > Loading wavs from: {c.data_path}") + if c.feature_path is not None: + print(f" > Loading features from: {c.feature_path}") + eval_data, train_data = load_wav_feat_data(c.data_path, c.feature_path, c.eval_split_size) + else: + eval_data, train_data = load_wav_data(c.data_path, c.eval_split_size) # setup audio processor ap = AudioProcessor(**c.audio)