You are not logged in.

#1 2024-03-04 16:01:47

arch_SENPAI
Member
Registered: 2024-02-11
Posts: 16

[SOLVED]OSError: libespeak.so.1: cannot open shared object file

I have a macine learning project, running on Qtile however it keeps giving me

OSError: libespeak.so.1: cannot open shared object file: No such file or directory

i have tried searching for libspeak h however no package like that exists.

i have also installed the pip pyttsx3 , which is the text to speech converter im using

How do i solve it.

Last edited by arch_SENPAI (2024-05-09 07:37:13)


its a bird, its a plane , no its Arch_SENPAI

Offline

#2 2024-03-04 19:35:43

mpan
Member
Registered: 2012-08-01
Posts: 1,612
Website

Re: [SOLVED]OSError: libespeak.so.1: cannot open shared object file

Hello. What program are you trying to run? And how did you acquire/install the program?

Offline

#3 2024-03-04 21:09:47

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,578
Website

Re: [SOLVED]OSError: libespeak.so.1: cannot open shared object file

libespeak.so.1 appears to be a Debianism (actually, might just be a symptom, not the cause). Can you rebuild the project so it links against the real shared object? (libespeak-ng.so.1, part of espeak-ng in [extra])

If not, you may need to create a compat symlink.

Last edited by WorMzy (2024-03-04 21:18:32)


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2024-03-05 05:10:32

arch_SENPAI
Member
Registered: 2024-02-11
Posts: 16

Re: [SOLVED]OSError: libespeak.so.1: cannot open shared object file

If i run  the program on Windows it works without issues . THE error only appears on arch  , here is the full error




"/home/cyberpunk/Downloads/ai image to speech/venv/bin/python" "/home/cyberpunk/Downloads/ai image to speech/app.py"
2024-03-04 20:42:11.198264: I external/local_tsl/tsl/cuda/cudart_stub.cc:31] Could not find cuda drivers on your machine, GPU will not be used.
2024-03-04 20:42:11.321225: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-03-04 20:42:11.321370: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-03-04 20:42:11.328171: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-03-04 20:42:11.340576: I external/local_tsl/tsl/cuda/cudart_stub.cc:31] Could not find cuda drivers on your machine, GPU will not be used.
2024-03-04 20:42:11.340989: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-03-04 20:42:14.010030: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1709574136.177581   20606 gl_context_egl.cc:85] Successfully initialized EGL. Major : 1 Minor: 5
I0000 00:00:1709574136.181983   20730 gl_context.cc:357] GL version: 3.2 (OpenGL ES 3.2 Mesa 24.0.2-arch1.1), renderer: Mesa Intel(R) HD Graphics 5500 (BDW GT2)
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
Traceback (most recent call last):
  File "/home/cyberpunk/Downloads/ai image to speech/venv/lib/python3.11/site-packages/pyttsx3/__init__.py", line 20, in init
    eng = _activeEngines[driverName]
          ~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/usr/lib/python3.11/weakref.py", line 136, in __getitem__
    o = self.data[key]()
        ~~~~~~~~~^^^^^
KeyError: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/cyberpunk/Downloads/ai image to speech/app.py", line 583, in <module>
    main()
  File "/home/cyberpunk/Downloads/ai image to speech/app.py", line 166, in main
    debug_image = draw_info_text(
                  ^^^^^^^^^^^^^^^
  File "/home/cyberpunk/Downloads/ai image to speech/app.py", line 549, in draw_info_text
    speak_text(hand_sign_text)  # Speak the identified hand sign
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/cyberpunk/Downloads/ai image to speech/app.py", line 530, in speak_text
    engine = pyttsx3.init()
             ^^^^^^^^^^^^^^
  File "/home/cyberpunk/Downloads/ai image to speech/venv/lib/python3.11/site-packages/pyttsx3/__init__.py", line 22, in init
    eng = Engine(driverName, debug)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/cyberpunk/Downloads/ai image to speech/venv/lib/python3.11/site-packages/pyttsx3/engine.py", line 30, in __init__
    self.proxy = driver.DriverProxy(weakref.proxy(self), driverName, debug)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/cyberpunk/Downloads/ai image to speech/venv/lib/python3.11/site-packages/pyttsx3/driver.py", line 50, in __init__
    self._module = importlib.import_module(name)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/cyberpunk/Downloads/ai image to speech/venv/lib/python3.11/site-packages/pyttsx3/drivers/espeak.py", line 9, in <module>
    from . import _espeak, toUtf8, fromUtf8
  File "/home/cyberpunk/Downloads/ai image to speech/venv/lib/python3.11/site-packages/pyttsx3/drivers/_espeak.py", line 18, in <module>
    dll = cdll.LoadLibrary('libespeak.so.1')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/ctypes/__init__.py", line 454, in LoadLibrary
    return self._dlltype(name)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/ctypes/__init__.py", line 376, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: libespeak.so.1: cannot open shared object file: No such file or directory

Last edited by arch_SENPAI (2024-03-05 08:18:59)


its a bird, its a plane , no its Arch_SENPAI

Offline

#5 2024-03-05 14:30:36

mpan
Member
Registered: 2012-08-01
Posts: 1,612
Website

Re: [SOLVED]OSError: libespeak.so.1: cannot open shared object file

I ask once again:

mpan wrote:

What program are you trying to run? And how did you acquire/install the program?

Please start answering the questions.

Offline

#6 2024-03-05 15:15:32

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,578
Website

Re: [SOLVED]OSError: libespeak.so.1: cannot open shared object file

Looks like a bug in pyttsx3 which was fixed three years ago: https://github.com/nateshmbhat/pyttsx3/ … 048577e962

However, it doesn't look like the software is still developed, and the last release predates this fix.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB