Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using with the HiFiGAN vocoder #57

Closed
godspirit00 opened this issue Jul 18, 2021 · 4 comments
Closed

Error when using with the HiFiGAN vocoder #57

godspirit00 opened this issue Jul 18, 2021 · 4 comments

Comments

@godspirit00
Copy link

I was trying to synthesize speech using the pretrained model with the HiFiGAN vocoder.

First I generated the mel file with
python gen_forward.py --input_text 'this is whatever you want it to be' melgan

Then, in the HiFiGAN vocoder repo, as stated in its README, I put the mel file in the test_mel_files, and run
python inference_e2e.py --checkpoint_file "./model/generator_v3"

And I got the following error:

Removing weight norm...
Traceback (most recent call last):
  File "inference_e2e.py", line 89, in <module>
    main()
  File "inference_e2e.py", line 85, in main
    inference(a)
  File "inference_e2e.py", line 49, in inference
    x = torch.FloatTensor(x).to(device)
ValueError: could not determine the shape of object type 'NpzFile'

It seems to have something to do with the mel file.

What am I missing? What should I do?
Thanks.

@cschaefer26
Copy link

Hi, true I just found that the current HifiGAN repo requests numpy files. Just updated the code. Try with :

python gen_forward.py --input_text 'this is whatever you want it to be' hifigan

@godspirit00
Copy link
Author

Thank you for your reply!
So I downloaded the code and tried again, now it says:

Loading tts checkpoint model/forward_step80k.pt
Traceback (most recent call last):
  File "gen_forward.py", line 71, in <module>
    tts_model, config = load_forward_taco(checkpoint_path)
  File "gen_forward.py", line 21, in load_forward_taco
    tts_model = ForwardTacotron.from_config(config)
  File "D:\TTS\ForwardTacotron-master\models\forward_tacotron.py", line 276, in from_config
    return ForwardTacotron(**model_config)
TypeError: __init__() got an unexpected keyword argument 'pitch_emb_dims'

Using Wavernn vocoder would show the same error.

@cschaefer26
Copy link

cschaefer26 commented Jul 18, 2021

Hi, it seems that you trained your model with an old version of the repo - I made some major changes that couldn't be backward compatible. You have two options: 1) retrain the model with the updated code (probably better quality), or 2) use the old code (you would need to revert it to the point before updating) and just replace the generate_forward.py with the newest version.

@godspirit00
Copy link
Author

Solved!
Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants