bootphon / phonemizer

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

[espeak-1.48.03] Language switch not happening #49

Closed cfrancesco closed 4 years ago

cfrancesco commented 4 years ago

Hi, taken from the documentation, I run

echo "j'aime le football" | phonemize -l fr-fr -b espeak --language-switch keep-flags

and it outputs

ʒɛm ləfutbɔːl

I'm on MacOS catalina, latest phonemizer and espeak versions

mmmaat commented 4 years ago

Hi,

Can I have the output of phonemize --version and echo "j'aime le football" | espeak-ng -vfr-fr -x --ipa -q --sep=_ please?

I have

$ echo "j'aime le football" | phonemize -l fr-fr -b espeak --language-switch keep-flags
[WARNING] fount 1 utterances containing language switches on lines 1
[WARNING] extra phones may appear in the "fr-fr" phoneset
[WARNING] language switch flags have been kept (applying "keep-flags" policy)
ʒɛm lə (en)fʊtbɔːl(fr) 
$ phonemize --version
phonemizer-2.2
available backends: espeak-ng-1.50, espeak-mbrola, festival-2.5.0, segments-2.1.3
$ echo "j'aime le football" | espeak-ng -vfr-fr -x --ipa -q --sep=_
ʒ_ˈɛ_m l_ə- (en)_f_ˈʊ_t_b_ɔː_l_(fr)
cfrancesco commented 4 years ago
>> phonemize --version
phonemizer-2.2
available backends: espeak-1.48.03, segments-2.1.3
uninstalled backends: espeak-mbrola, festival

espeak-ng is not installed, I am using espeak instead. With espeak:

>> echo "j'aime le football" | espeak -vfr-fr -x --ipa -q
 ʒˈɛm lə-fˈutbɔːl

As soon as I get espeak-ng working I'll post the output.

edit: I'm still having issues installing espeak-ng, but the flags did work with espeak backend "last time" I used the phonemizer.

mmmaat commented 4 years ago

Indeed using espeak-1.48.03 as backend I replicate your output...

$ echo "j'aime le football" | /bin/espeak -vfr-fr --ipa=3 -q
 ʒ_ˈɛ_m l_ə-_f_ˈu_t_b_ɔː_l
cfrancesco commented 4 years ago

I tried on a larger corpus and the flags are actually showing up, just fairly seldom. The ticket could probably be closed.

mmmaat commented 4 years ago

Indeed this is related to espeak, not phonemizer...