ERROR: Failed to find norm file.
mrgloom opened this issue · 7 comments
mrgloom commented
python generate.py --text "hello world" --spkr 1 --checkpoint models/vctk/bestmodel.pth
ERROR: Failed to find norm file.
python2 generate.py --text "hello world" --spkr 1 --checkpoint models/vctk/bestmodel.pth
Traceback (most recent call last):
File "generate.py", line 10, in <module>
import phonemizer
ImportError: No module named phonemizer
which python
/Users/my_user/external_projects/text-to-speech/facebook-voiceloop/my_env/bin/python
which python2
/Users/my_user/external_projects/text-to-speech/facebook-voiceloop/my_env/bin/python2
mrgloom commented
Looks like this helped:
git clone https://github.com/bootphon/phonemizer
cd phonemizer
python2 setup.py build
python2 setup.py install
mrgloom commented
After I have installed phonemizer and pytorch I still get error: ERROR: Failed to find norm file.
python2 generate.py --text "hello world" --spkr 1 --checkpoint models/vctk/bestmodel.pth
ERROR: Failed to find norm file.
Looks like it from here:
https://github.com/facebookresearch/loop/blob/master/generate.py#L98
I found it only for blizzard dataset:
find . -name "norm.dat"
./models/blizzard/norm.dat
But it still fails, looks like phonemizer API is changed:
python2 generate.py --text "hello world" --checkpoint models/blizzard/bestmodel.pth
Traceback (most recent call last):
File "generate.py", line 168, in <module>
main()
File "generate.py", line 123, in main
txt = text2phone(args.text, char2code)
File "generate.py", line 42, in text2phone
seperator = phonemizer.separator.Separator('', '', ' ')
AttributeError: 'module' object has no attribute 'separator'
>>> import phonemizer
>>> dir(phonemizer)
['__builtins__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__version__']
mrgloom commented
Seems related: bootphon/phonemizer#6
mrgloom commented
Solved problem with phonemizer: bootphon/phonemizer#20
def text2phone(text, char2code):
from phonemizer.phonemize import phonemize
from phonemizer.separator import Separator
seperator = Separator('', '', ' ')
ph = phonemize(text, separator=seperator)
ph = ph.split(' ')
ph.remove('')
result = [char2code[p] for p in ph]
return torch.LongTensor(result)
mrgloom commented
But get another error:
python2 generate.py --text "hello world" --checkpoint models/blizzard/bestmodel.pth
Traceback (most recent call last):
File "generate.py", line 177, in <module>
main()
File "generate.py", line 166, in main
norm_path)
File "/Users/my_user/external_projects/text-to-speech/facebook-voiceloop/utils.py", line 257, in generate_merlin_wav
weight=os.path.join(gen_dir, 'weight')), shell=True)
File "/Users/my_user/external_projects/text-to-speech/facebook-voiceloop/utils.py", line 121, in pe
for line in execute(cmd, shell=shell):
File "/Users/my_user/external_projects/text-to-speech/facebook-voiceloop/utils.py", line 114, in execute
raise subprocess.CalledProcessError(return_code, cmd)
subprocess.CalledProcessError: Command 'echo 1 1 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 | /Users/my_user/external_projects/text-to-speech/facebook-voiceloop/tools/SPTK-3.9/x2x +af > /Users/my_user/external_projects/text-to-speech/facebook-voiceloop/models/blizzard/results/weight' returned non-zero exit status 127
Looks like error related to SPTK-3.9
and my SPTK-3.9
dir is empty.
Looks like related: #18
mrgloom commented
Seems bash script failed to copy files, after manually build and copy under tools
it works:
Maybe related to #68
tree -L 1 tools/
tools/
├── REAPER
├── SPTK-3.9
└── WORLD
python2 generate.py --text "hello world" --checkpoint models/blizzard/bestmodel.pth
complete hello_world.gen_0.wav.