PrashanthaTP / audio-emotion-detector

Detection of emotion in audio using Machine Learning(SVM)
3 stars 3 forks source link

Fix handling of audio files which are not from Ravdess dataset #2

Open PrashanthaTP opened 1 year ago

PrashanthaTP commented 1 year ago

image

https://github.com/PrashanthaTP/audio-emotion-detector/blob/d34b02c36520bcd0df340077332557215aa42bf3/emotion_detector/gui.py#L204-L208

Korbpw commented 10 months ago

having the same problem here

########\AppData\Local\Programs\Python\Python37\lib\site-packages\librosa\core\spectrum.py:224: UserWarning: n_fft=1024 is too small for input signal of length=714
  n_fft, y.shape[-1]
#######\Local\Programs\Python\Python37\lib\site-packages\librosa\core\spectrum.py:224: UserWarning: n_fft=1024 is too small for input signal of length=357
  n_fft, y.shape[-1]
EMOTIONS :['neutral', 'calm', 'happy', 'sad', 'angry', 'fearful', 'disgust', 'surprised']
Predicted emotion :fearful
Cannot extract features.. list index out of range
file name :  #######.Wav
Extracting the features for the file #######.Wav
C:\Users\accou\AppData\Local\Programs\Python\Python37\lib\site-packages\librosa\core\spectrum.py:224: UserWarning: n_fft=1024 is too small for input signal of length=589
  n_fft, y.shape[-1]
EMOTIONS :['neutral', 'calm', 'happy', 'sad', 'angry', 'fearful', 'disgust', 'surprised']
Predicted emotion :fearful
Cannot extract features.. list index out of range