RayanWang / Speech_emotion_recognition_BLSTM

Bidirectional LSTM network for speech emotion recognition.
MIT License
260 stars 78 forks source link

Error about mfccInitFilterBanks() #1

Closed zhangxing753951 closed 6 years ago

zhangxing753951 commented 6 years ago

Hello RanyanWang,I read your code and want to run it.But I catch the erorr "TypeError: mfccInitFilterBanks() takes exactly 2 arguments (7 given)",then I delete five arguments But new error appear "TypeError: 'float' object cannot be interpreted as an index",Can you tell me how to modify the code in audioFeatureExtraction.py?Just delete the code of stFeatureSpeed?

RayanWang commented 6 years ago

Hi zhangxing753951, first of all, delete the five parameters in mfccInitFilterBanks() just like you did, then cast all indices from float to integer, ex: x = signal[curPos:curPos + Win] -> x = signal[int(curPos):int(curPos + Win)] whenever you encounter these type of errors.