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

SpeedySpeech model causes error for input text shorter than 13 characters. #382

Closed
erogol opened this issue Mar 15, 2021 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@erogol
Copy link
Member

erogol commented Mar 15, 2021

Due to the architecture of the model and the total receptive field, it causes errors for input text shorter than 13 characters.

This can be fixed by padding the input text with empty characters.

(venv) $ tts --model_name tts_models/en/ljspeech/speedy-speech-wn --text "Hey Bruce, what's good in the neighborhood?"
 > tts_models/en/ljspeech/speedy-speech-wn is already downloaded.
 > vocoder_models/en/ljspeech/multiband-melgan is already downloaded.
 > Using model: speedy_speech
Traceback (most recent call last):
  File "/home/josh/venv/bin/tts", line 8, in <module>
    sys.exit(main())
  File "/home/josh/venv/lib/python3.6/site-packages/TTS/bin/synthesize.py", line 190, in main
    synthesizer = Synthesizer(model_path, config_path, vocoder_path, vocoder_config_path, args.use_cuda)
  File "/home/josh/venv/lib/python3.6/site-packages/TTS/utils/synthesizer.py", line 47, in __init__
    use_cuda)
  File "/home/josh/venv/lib/python3.6/site-packages/TTS/utils/synthesizer.py", line 96, in load_tts
    self.tts_model.load_checkpoint(tts_config, tts_checkpoint, eval=True)
  File "/home/josh/venv/lib/python3.6/site-packages/TTS/tts/models/speedy_speech.py", line 196, in load_checkpoint
    self.load_state_dict(state['model'])
  File "/home/josh/venv/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1224, in load_state_dict
    self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for SpeedySpeech:
	size mismatch for emb.weight: copying a param with shape torch.Size([129, 128]) from checkpoint, the shape in current model is torch.Size([130, 128]).

Thanks, @JRMeyer, for pointing this out 👑

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant