From f051ab76a04460745a879f6a0a4bd9acd96fadca Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Thu, 26 Dec 2019 06:44:40 -0500 Subject: [PATCH] Now there's human voice audio!!!! WOO! --- tacotron_melgan/wrap_torch_model.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tacotron_melgan/wrap_torch_model.py b/tacotron_melgan/wrap_torch_model.py index d8b1befce2..a783c827c6 100755 --- a/tacotron_melgan/wrap_torch_model.py +++ b/tacotron_melgan/wrap_torch_model.py @@ -188,8 +188,12 @@ module.load_state_dict(melgan_model['model_g']) #module.eval(inference=False) print('JIT model...') -container = torch.jit.script(module) +mel_file = '/home/bt/dev/voder/data/mels/LJ002-0320.mel' +example = torch.load(mel_file, map_location=torch.device('cpu')) +traced_script_module = torch.jit.trace(module, example) +traced_script_module.save("container.pt") +#container = torch.jit.script(module) -print('Saving model...') -container.save("container.pt") +#print('Saving model...') +#container.save("container.pt")