Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EspeakBackend enters a corrupted state upon seeing some characters #133

Open
CorentinJ opened this issue Jul 15, 2022 · 1 comment
Open

Comments

@CorentinJ
Copy link

Describe the bug
When calling phonemize on an instance of EspeakBackend with the character "ꪁ", the backend enters a corrupted state where all succeeding phonemization (including in the sentence with "ꪁ") is incorrect.

Phonemizer version
Phonemizer 3.2.1
Espeak NG 1.50

System
Reproduced the bug both on Win10 and Ubuntu

To reproduce

from phonemizer.backend import EspeakBackend

texts = [
    "a, b, c, d, e, f, p, w, y, z",
    "ꪁ",
    "a, b, c, d, e, f, p, w, y, z"
]

backend = EspeakBackend(
    language="en-us", preserve_punctuation=True, with_stress=True,
    language_switch="remove-flags", words_mismatch="ignore"
)

for text in texts:
    print(backend.phonemize([text])[0])

Expected behavior
Expected output:

ˈeɪ , bˈiː , sˈiː , dˈiː , ˈiː , ˈɛf , pˈiː , dˈʌbəljˌuː , wˈaɪ , zˈiː 

ˈeɪ , bˈiː , sˈiː , dˈiː , ˈiː , ˈɛf , pˈiː , dˈʌbəljˌuː , wˈaɪ , zˈiː

Actual output:

ˈeɪ , bˈiː , sˈiː , dˈiː , ˈiː , ˈɛf , pˈiː , dˈʌbəljˌuː , wˈaɪ , zˈiː 

ˈʌ , bˈʌ , sˈʌ , dˈʌ , ˈʌ , ˈʌf , pˈʌ , dˈʌbd-jʌ , wˈʌ , zˈʌ 
@CorentinJ
Copy link
Author

I have tried to reproduce the issue with espeak only, but it seems to be doing ok:

espeak-ng.exe -qx --ipa
>>> a, b, c, d, e, f, p, w, y, z
ˈeɪ
bˈiː
sˈiː
dˈiː
ˈiː
ˈɛf
pˈiː
dˈʌbəljˌuː
wˈaɪ
zˈɛd
>>> ꪁ

>>> a, b, c, d, e, f, p, w, y, z
ˈeɪ
bˈiː
sˈiː
dˈiː
ˈiː
ˈɛf
pˈiː
dˈʌbəljˌuː
wˈaɪ
zˈɛd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants