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

Please do not throw an RunTime error for espeak not install on your system! #189

Open
MonolithFoundation opened this issue Nov 19, 2024 · 0 comments

Comments

@MonolithFoundation
Copy link

Actually, so many users have installed espeak on their system, but still got error:

espeak not install on your system.

Some users can resovle this issue by setting library on their system path, however, there still many users can't. even though they have set the PATH, lib, everything, still found error.

The root reason in this case, is not lib not installed or not found, it's some other reason behind the Runtime Error catch!

For instance:

 version `GLIBCXX_3.4.30' not found 

I wasted about 4 hours on this issue, make sure installed lib, reinstall again and again, but still, same error keep throw.

After I digging into the phonemizer lib, I found the reason is not the lib not found, it's this error":

>>> import os
>>> os.environ['PHONEMIZER_ESPEAK_LIBRARY'] = '/usr/lib64/libespeak-ng.so'
>>> a = EspeakBackend('zh')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/data/miniconda3/envs/env-3.9.2/lib/python3.9/site-packages/phonemizer/backend/espeak/espeak.py", line 45, in __init__
    super().__init__(
  File "/data/miniconda3/envs/env-3.9.2/lib/python3.9/site-packages/phonemizer/backend/espeak/base.py", line 39, in __init__
    super().__init__(
  File "/data/miniconda3/envs/env-3.9.2/lib/python3.9/site-packages/phonemizer/backend/base.py", line 77, in __init__
    raise RuntimeError(  # pragma: nocover
RuntimeError: espeak not installed on your system
>>> from phonemizer.backend.espeak.wrapper import EspeakWrapper
>>> 
>>> a = EspeakWrapper()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/data/miniconda3/envs/env-3.9.2/lib/python3.9/site-packages/phonemizer/backend/espeak/wrapper.py", line 60, in __init__
    self._espeak = EspeakAPI(self.library())
  File "/data/miniconda3/envs/env-3.9.2/lib/python3.9/site-packages/phonemizer/backend/espeak/api.py", line 62, in __init__
    raise RuntimeError(
RuntimeError: failed to load espeak library: /data/miniconda3/envs/env-3.9.2/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/lib64/libespeak-ng.so.1.1.51)
>>> 

THIS especially happened when you are on a relatively old machine!!

If you also encountred same situation, please help me to drive original author consider improve the error message. Thanks!

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

No branches or pull requests

1 participant