as-ideas / ForwardTacotron

⏩ Generating speech in a single forward pass without any attention!
https://as-ideas.github.io/ForwardTacotron/
MIT License
578 stars 113 forks source link

Cannot generate using a pre-trained model #27

Closed JacquesBass closed 4 years ago

JacquesBass commented 4 years ago

Hi,

I am trying to generate the example from the README page. I get an error "RuntimeError: language "en" is not supported by the espeak backend".

In colab is works fine, but I cannot make it work on my machine. My eSpeak is 1.48.03 which comes by default on Ubuntu 20.4

Traceback (most recent call last):
  File "gen_forward.py", line 118, in <module>
    text = clean_text(input_text.strip())
  File "/home/jadmin/kaalam.github/ForwardTacotron/utils/text/__init__.py", line 59, in clean_text
    text = cleaner(text)
  File "/home/jadmin/kaalam.github/ForwardTacotron/utils/text/cleaners.py", line 82, in english_cleaners
    text = to_phonemes(text)
  File "/home/jadmin/kaalam.github/ForwardTacotron/utils/text/cleaners.py", line 97, in to_phonemes
    language_switch='remove-flags')
  File "/home/jadmin/anaconda3/envs/torch/lib/python3.7/site-packages/phonemizer/phonemize.py", line 160, in phonemize
    logger=logger)
  File "/home/jadmin/anaconda3/envs/torch/lib/python3.7/site-packages/phonemizer/backend/espeak.py", line 147, in __init__
    preserve_punctuation=preserve_punctuation, logger=logger)
  File "/home/jadmin/anaconda3/envs/torch/lib/python3.7/site-packages/phonemizer/backend/base.py", line 54, in __init__
    .format(language, self.name()))
RuntimeError: language "en" is not supported by the espeak backend
cschaefer26 commented 4 years ago

Hi, the phonemizer should default to en-us, this might be a version issue. I just updated the hparams to default to en-us explicitely, could you pull and try again?

JacquesBass commented 4 years ago

It works now. Thank you!