mirror of https://github.com/coqui-ai/TTS.git
Define foldr name explicitly and mozilla preprocessor update
This commit is contained in:
parent
6df6f2c036
commit
add08e331b
|
@ -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
|
||||
|
|
10
train.py
10
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')
|
||||
|
||||
|
|
Loading…
Reference in New Issue