Closed marianasignal closed 2 years ago
Is it better if you transform your code sample by
from phonemizer.backend import EspeakBackend
backend = EspeakBackend('cmn')
separator = Separator(word='/', phone=' ', syllable="-")
with open(scp_path) as f:
for line in f.readlines():
txt = txtdict.get(line[0])
phone = backend.phonemize(txt, separator=separator)
rows.append([wav, new_wav, txt, phone, new_phone])
?
it works, thanks for your suggestion!
Is it better if you transform your code sample by
from phonemizer.backend import EspeakBackend backend = EspeakBackend('cmn') separator = Separator(word='/', phone=' ', syllable="-") with open(scp_path) as f: for line in f.readlines(): txt = txtdict.get(line[0]) phone = backend.phonemize(txt, separator=separator) rows.append([wav, new_wav, txt, phone, new_phone])
When i try your suggestion i get the different result. I want to get the first result and how can I get it by modifying the config?
maybe something gets wrong?
Ok I see, the text must be a list of str in backend.phonemize
, and not a str. I modified the code so that it now raises an exception : https://github.com/bootphon/phonemizer/commit/db89aafa7ca4f590630480c825c85a5bde78e57b. Just have a backend.phonemize([text], separator=separator)
and it should work.
that's great
Describe the bug
When phonemizing a text whick has more than 100k utterances, it will always gives a "RuntimeError" include "espeak not installed on your system",“failed to find espeak library” and "invalid voice code 'cmn' " at around 900 utterances.
Phonemizer version phonemizer-3.0 available backends: espeak-ng-1.49.2, espeak-mbrola, festival-2.5.0, segments-2.2.0
System cat /proc/version: Linux version 4.15.0-106-generic (buildd@lcy01-amd64-016) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04))
python: Python 3.9.1 (default, Dec 11 2020, 14:32:07) [GCC 7.3.0] :: Anaconda, Inc. on linux
To reproduce
Expected behavior