waveglow-tensorflow icon indicating copy to clipboard operation
waveglow-tensorflow copied to clipboard

How to do inference (mel-spectorgram -> wav) ?

Open byuns9334 opened this issue 5 years ago • 1 comments

Could you let me know the example command line for it?

byuns9334 avatar Aug 16 '19 05:08 byuns9334

Hello I'm researching on this repo and this repo's usage is simple which I like. :)

For inference with checkpoint, all you have to do is to change hparams.py


##Inference##
parser.add_argument('--do_infer', dest='is_training', default=True, action='store_false', help='Default to training mode, do inference if --do_infer is specified')
parser.add_argument('--infer_mel_dir', dest='infer_mel_dir', default='/waveglow/training_mels', help='Path to inference numpy files of mel spectrogram')
parser.add_argument('--infer_path', dest='infer_path', default='/waveglow/inference', help='Path to output inference wavs')

Change do_infer default value or with --do_infer that will make action for storing false And designate the input, output path

And finally run main.py

with tf.Session(config=tfconfig) as sess:
      model = WaveGlow(sess)
      if args.is_training:
         model.train()
      else:
         model.infer()

you can find infer, train process in model.py

Ella77 avatar Aug 20 '19 06:08 Ella77