bootphon / phonemizer

Simple text to phones converter for multiple languages
https://bootphon.github.io/phonemizer/
GNU General Public License v3.0
1.2k stars 166 forks source link

espeak-ng version number and phone separator error #18

Closed cainesap closed 5 years ago

cainesap commented 5 years ago

Bonjour Mathieu,

A couple of issues after I installed the current version of phonemizer. One is a simple fix, the other is a problem I don't understand:

1, espeak-ng is now version 1.49.3, therefore line 175 in backend.py needs to be updated.

2, I tried to use a space character as phone separator but see the following error:

echo "hello world" | phonemize -l en-us --sep=' '
fatal error: [Errno 2] No such file or directory: '--sep= '

I'm not sure why this happens so at the moment used a hack workaround in line 248, also not specifying a separator in the command line:

w = w.replace('_', ' ')

It's working as I want it to now, so this is not an urgent matter. Thanks for sharing this great resource! Andrew

mmmaat commented 5 years ago

Hi Andrew, thanks for reporting!

  1. Solved
  2. You must use -p/--phone-separator, not --sep:
    $ echo "hello world" | phonemize -l en-us -p ' ' -w ''
    h ə l oʊ w ɜː l d 

Best, Mathieu

cainesap commented 5 years ago

1, Great, thanks Mathieu! 2, sorry, I did mean that I used p ' ', ah but I see, I must use -w '' as well (i.e. i should read the error message :))