tyiannak / pyAudioAnalysis

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

Error when using Speaker Diarization pipeline #371

Closed thangld201 closed 2 years ago

thangld201 commented 2 years ago

When I run the following command (as illustrated in the tutorial !python audioAnalysis.py speakerDiarization -i ./data/diarizationExample.wav --num 2 --flsd. I got the error

Traceback (most recent call last):
  File "audioAnalysis.py", line 617, in <module>
    speakerDiarizationWrapper(args.input, args.num, args.flsd)
  File "audioAnalysis.py", line 237, in speakerDiarizationWrapper
    aS.speaker_diarization(inputFile, numSpeakers, lda_dim=5, plot_res=True)
  File "/content/pyAudioAnalysis/pyAudioAnalysis/audioSegmentation.py", line 832, in speaker_diarization
    at.load_model(os.path.join(base_dir, "svm_rbf_speaker_10"))
  File "/content/pyAudioAnalysis/pyAudioAnalysis/../pyAudioAnalysis/audioTrainTest.py", line 530, in load_model
    mean = cPickle.load(fo)
ValueError: unsupported pickle protocol: 5


I'm using google colaboratory environment and already installed the libraries and dependencies, what could be the cause ?

thangld201 commented 2 years ago

@tyiannak Could you help me please ?

thangld201 commented 2 years ago

I found where the error came from: Google Colab uses pickle 4 by default, so you have to do

!pip install pickle5
import pickle5 as cPickle