tyiannak / pyAudioAnalysis

Python Audio Analysis Library: Feature Extraction, Classification, Segmentation and Applications
Apache License 2.0
5.8k stars 1.19k forks source link

Import Error on running SpeakerDiarization #172

Open lordzuko opened 6 years ago

lordzuko commented 6 years ago

I am getting following error on running speaker diarization. I have installed these dependensies: pip install numpy matplotlib scipy sklearn hmmlearn simplejson eyed3 pydub

python audioAnalysis.py speakerDiarization -i /home/lordzuko/Downloads/srt241.wa
v --num 0 --flsd
Traceback (most recent call last):
  File "audioAnalysis.py", line 9, in <module>
    import audioSegmentation as aS
  File "/home/lordzuko/virtualenv/speaker-diarization/pyAudioAnalysis/audioSegmentation.py", line 18, in <module>
    import hmmlearn.hmm
  File "/home/lordzuko/virtualenv/speaker-diarization/local/lib/python2.7/site-packages/hmmlearn/hmm.py", line 21, in <module>
    from .base import _BaseHMM
  File "/home/lordzuko/virtualenv/speaker-diarization/local/lib/python2.7/site-packages/hmmlearn/base.py", line 13, in <module>
    from . import _hmmc
ImportError: /home/lordzuko/virtualenv/speaker-diarization/local/lib/python2.7/site-packages/hmmlearn/_hmmc.so: undefined symbol: npy_logl
forestnoobie commented 5 years ago

Same problem here.. is this the problem occured from hmmlearn package or pyAudioAnalysis??

nicolaspanel commented 5 years ago

you may also need to upgrade numpy:

pip uninstall hmmlearn
pip install -U numpy
pip install  --no-cache-dir hmmlearn 

see https://github.com/tyiannak/pyAudioAnalysis/issues/48 and https://github.com/hmmlearn/hmmlearn/issues/160#issuecomment-266826373

KarnikaSaxena011 commented 3 years ago

module 'pyAudioAnalysis.audioSegmentation' has no attribute 'speakerDiarization. How to resolve this issue?

gastonar commented 3 years ago

I actually had this issue for hmm segmentation and speaker diarization. Try calling the function hmm_segmentation or speaker_diarization, it looks like it was renamed to follow typical Python snakecase convention as opposed to camelcase.