change order of params

This commit is contained in:
Brandon Thomas
2020-07-24 02:33:39 -04:00
parent 99afd802ec
commit 5c6619e787
2 changed files with 6 additions and 5 deletions
+5 -5
View File
@@ -27,7 +27,7 @@ def parse_args():
parser = argparse.ArgumentParser('Split audio into ingestible chunks')
parser.add_argument('--model_file', type=str, required=True) # Input
parser.add_argument('--output_file', type=str, required=False) # Explicitly set the filename
parser.add_argument('--use_default_name', default=False, action='store_true') # Save as 'glow_tts_single_speaker.torchjit'
parser.add_argument('--copy_name', default=False, action='store_true') # Save as '{model_name}.torchjit'
parser.add_argument('--output_directory', type=str, required=False, default='./OUTPUT/')
args = parser.parse_args()
@@ -38,13 +38,13 @@ def parse_args():
if args.output_file and not args.output_file.endswith('.torchjit'):
raise Exception('(Optional) JIT output filename `{}` does not end with extention `.torchjit`.'.format(args.output_file))
if args.use_default_name:
if args.copy_name:
if args.output_file:
raise Exception('Cannot --use_default_name and set an explicit --output_file')
args.output_file = DEFAULT_NAME
elif not args.output_file:
raise Exception('Cannot --copy_name and set an explicit --output_file')
basename = os.path.basename(args.model_file)
args.output_file = os.path.splitext(basename)[0] + '.torchjit'
else:
args.output_file = DEFAULT_NAME
return args
+1
View File
@@ -80,6 +80,7 @@ output_filename = 'OUTPUT/manyvoice2.0_2020-07-08_12d5838_9170.torchjit'
output_filename = 'OUTPUT/manyvoice2.0_2020-07-08_12d5838_9330.torchjit'
output_filename = 'OUTPUT/manyvoice3.0_2020-07-17_12d5838_9920.torchjit'
output_filename = 'OUTPUT/melgan-vocodes.torchjit' # Stop renaming them for a bit
output_filename = 'OUTPUT/manyvoice3.0_2020-07-17_12d5838_10090.torchjit'
#output_filename = 'OUTPUT/melgan-vocodes.torchjit' # Stop renaming them for a bit