tyiannak/pyAudioAnalysis

'SVC' object has no attribute 'classify'

troncook opened this issue · 1 comments

from pyAudioAnalysis import audioSegmentation
num_speakers = 4
audioSegmentation.speaker_diarization("ES2004.wav", num_speakers)

AttributeError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_46952/3533011787.py in
1 from pyAudioAnalysis import audioSegmentation
2 num_speakers = 4
----> 3 audioSegmentation.speaker_diarization("ES2004.wav", num_speakers)

~\anaconda3\lib\site-packages\pyAudioAnalysis\audioSegmentation.py in speaker_diarization(filename, n_speakers, mid_window, mid_step, short_window, lda_dim, plot_res)
913 feature_norm_all = (mt_feats_to_red[:, index] - mean_all) / std_all
914 feature_norm_fm = (mt_feats_to_red[:, index] - mean_fm) / std_fm
--> 915 _, p1 = at.classifier_wrapper(classifier_all, "knn",
916 feature_norm_all)
917 _, p2 = at.classifier_wrapper(classifier_fm, "knn", feature_norm_fm)

~\anaconda3\lib\site-packages\pyAudioAnalysis\audioTrainTest.py in classifier_wrapper(classifier, classifier_type, test_sample)
83 probability = -1
84 if classifier_type == "knn":
---> 85 class_id, probability = classifier.classify(test_sample)
86 elif classifier_type == "svm" or
87 classifier_type == "randomforest" or
'SVC' object has no attribute 'classify'

Can you check on the latest version. It should be ok now in both pypi and source code version as I've changed the default method in speaker diarization and also replaced the knn models with the correct ones (svms)