bootphon / phonemizer

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

Is espeak backend using the wrong "g"? #86

Closed sch0ngut closed 2 years ago

sch0ngut commented 2 years ago

Describe the bug It seems that the phonemized 'g' is not the same as on a standard keyboard. For example if I phonemize the word "grandma" the output is "ɡɹˈændmɑː". However, the first letter is not equivalent to the "g" on my keyboard. Is that intended or an actual bug?

Phonemizer version

phonemizer-3.0
available backends: espeak-ng-1.49.2, espeak-mbrola, festival-2.5.0, segments-2.2.0

System Python 3.7.12

To reproduce

from phonemizer import phonemize

phonetic = phonemize('grandma', language='en-us', backend='espeak', with_stress=True)
print(phonetic) # ɡɹˈændmɑː
print(phonetic[0] == 'g') # False

Expected behavior phonetic[0] == 'g' should be true

mmmaat commented 2 years ago

Hi, this is the way espeak makes its transcriptions, the 'g' char may be a specific IPA symbol (I'm not sure). In any case this is not a phonemizer bug. It may be an espeak bug, but this is unlikely.