pykaldi / pykaldi

A Python wrapper for Kaldi
https://pykaldi.github.io
Apache License 2.0
990 stars 248 forks source link

_online_endpoint.so, 2): Symbol not found #280

Open Natphitchayuk opened 3 years ago

Natphitchayuk commented 3 years ago

help pls

Traceback (most recent call last):
  File "/Users/natphitchayuksiwahansaphan/Desktop/workspace/pykaldi/../kpat-core-asr/test.py", line 1, in <module>
    from kaldi.asr import NnetLatticeFasterOnlineRecognizer
  File "/Users/natphitchayuksiwahansaphan/Desktop/workspace/kpat-core-asr/env/lib/python3.9/site-packages/pykaldi-0.2.1-py3.9-macosx-10.9-x86_64.egg/kaldi/asr.py", line 28, in <module>
    from . import online2 as _online2
  File "/Users/natphitchayuksiwahansaphan/Desktop/workspace/kpat-core-asr/env/lib/python3.9/site-packages/pykaldi-0.2.1-py3.9-macosx-10.9-x86_64.egg/kaldi/online2/__init__.py", line 50, in <module>
    from ._online_endpoint import *
ImportError: dlopen(/Users/natphitchayuksiwahansaphan/Desktop/workspace/kpat-core-asr/env/lib/python3.9/site-packages/pykaldi-0.2.1-py3.9-macosx-10.9-x86_64.egg/kaldi/online2/_online_endpoint.so, 2): Symbol not found: __ZN5kaldi21TrailingSilenceLengthINS_29LatticeFasterOnlineDecoderTplIN3fst13GrammarFstTplINS2_8ConstFstINS2_6ArcTplINS2_17TropicalWeightTplIfEEEEjEEEEEEEEiRKNS_15TransitionModelERKNSt3__112basic_stringIcNSF_11char_traitsIcEENSF_9allocatorIcEEEERKT_
  Referenced from: /Users/natphitchayuksiwahansaphan/Desktop/workspace/kpat-core-asr/env/lib/python3.9/site-packages/pykaldi-0.2.1-py3.9-macosx-10.9-x86_64.egg/kaldi/online2/_online_endpoint.so
  Expected in: flat namespace
 in /Users/natphitchayuksiwahansaphan/Desktop/workspace/kpat-core-asr/env/lib/python3.9/site-packages/pykaldi-0.2.1-py3.9-macosx-10.9-x86_64.egg/kaldi/online2/_online_endpoint.so
WhuRan commented 2 years ago

I meet the same problem, do you solve this?

bmilde commented 2 years ago

I've seen the same problem in our most recent Mac OS X build, on Linux it seems to be fine though. Workaround: if you don't actually want to use the online decoders you can uncomment the online2 import in kaldi/asr.py and use the other decoders for batch decoding without problems.