diff --git a/datasets/preprocess.py b/datasets/preprocess.py index c1b8469a..9313e3e5 100644 --- a/datasets/preprocess.py +++ b/datasets/preprocess.py @@ -50,16 +50,18 @@ def mozilla(root_path, meta_files): items = [] for idx, meta_file in enumerate(meta_files): folder = folders[idx] - txt_file = os.path.join(root_path, meta_file) + # txt_file = os.path.join(root_path, meta_file) + txt_file = meta_file with open(txt_file, 'r') as ttf: for line in ttf: cols = line.split('|') - wav_file = os.path.join(root_path, folder, 'wavs_no_processing', cols[1].strip()) + # wav_file = os.path.join(root_path, folder, 'wavs_no_processing', cols[1].strip()) + wav_file = os.path.join(folder, 'wavs_no_processing', cols[1].strip()) if os.path.isfile(wav_file): text = cols[0].strip() items.append([text, wav_file]) else: - print(" > Error: {}".format(cols)) + print(" > Error: {}".format(wav_file)) continue random.shuffle(items) return items diff --git a/train.py b/train.py index 90427fbf..f9c80ebe 100644 --- a/train.py +++ b/train.py @@ -499,6 +499,12 @@ if __name__ == '__main__': type=str, help='path for training outputs.', default='') + parser.add_argument( + '--output_folder', + type=str, + default='', + help='folder name for traning outputs.' + ) # DISTRUBUTED parser.add_argument( @@ -524,8 +530,10 @@ if __name__ == '__main__': else: OUT_PATH = args.output_path - if args.group_id == '': + if args.group_id == '' and args.output_folder == '': OUT_PATH = create_experiment_folder(OUT_PATH, c.run_name, args.debug) + else: + OUT_PATH = os.path.join(OUT_PATH, args.output_folder) AUDIO_PATH = os.path.join(OUT_PATH, 'test_audios')