alphacep / vosk-api

Offline speech recognition API for Android, iOS, Raspberry Pi and servers with Python, Java, C# and Node
Apache License 2.0
7.57k stars 1.06k forks source link

Segfault on Import Vosk #1352

Closed jakefoehner closed 1 year ago

jakefoehner commented 1 year ago

Hi,

I am trying to use the test code 'test_words.py' when I run the command I get a sefault error.

When digging deeper this is the specific issue.

OSError: cannot load library '/home/kxm/PycharmProjects/vosk-api/venv/lib/python3.6/site-packages/vosk/libvosk.so': /home/kxm/PycharmProjects/vosk-api/venv/lib/python3.6/site-packages/vosk/libvosk.so: undefined symbol: _ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev

This error happens when the line import vosk is run.

I am using:

I had no issue install the correct python package for my build.

Any advice is appreciated!

nshmyrev commented 1 year ago

You can recompile package from source, your libstdc++ is old version or incompatible.

jakefoehner commented 1 year ago

Ok so i followed this process: https://forums.linuxmint.com/viewtopic.php?t=178574

For recompiling libstdc++ and I am still getting the same error

jakefoehner commented 1 year ago

OSError: cannot load library '/usr/local/lib/python3.6/dist-packages/vosk-0.3.45-py3.6.egg/vosk/libvosk.so': /usr/local/lib/python3.6/dist-packages/vosk-0.3.45-py3.6.egg/vosk/libvosk.so: cannot open shared object file: No such file or directory

Actually I changed some other stuff and this is the error I am getting now.

nshmyrev commented 1 year ago

You probably didn't compile libvosk.so properly when you installed python package. The file must be really missing.

jakefoehner commented 1 year ago

You're right. I just added the file back and I am continuing to get the same error

nshmyrev commented 1 year ago

What is your libstdc++ version

jakefoehner commented 1 year ago

3.4

nshmyrev commented 1 year ago

3.4 what? You need 3.4.26 reports say.

jakefoehner commented 1 year ago

ahhh I missed that. I believe I have 3.4.25. Let me try upgrading and see if that fixes it. Thank you so much for your help!

jakefoehner commented 1 year ago

That worked!! thanks!

nshmyrev commented 1 year ago

Good, thanks for figuring that out

zts2002 commented 7 months ago

Ok so i followed this process: https://forums.linuxmint.com/viewtopic.php?t=178574好的,所以我遵循了这个过程https://forums.linuxmint.com/viewtopic.php?t=178574

For recompiling libstdc++ and I am still getting the same error对于重新编译 libstdc++,我仍然遇到同样的错误

how you deal with this problem sir? i have the same wrong on jetson nano with the same report,i did not understand the answer of the link,may you show me how to deal with that with more particulars?

nshmyrev commented 7 months ago

how you deal with this problem sir? i have the same wrong on jetson nano with the same report,i did not understand the answer of the link,may you show me how to deal with that with more particulars?

We have new Vosk coming out for Jetson nano. Contact me by email contact@alphacephei.com, I'll give you the link.

mohamedabdelhadi commented 6 months ago

I having the same issue I am trying to run it on :