RayanWang / Speech_emotion_recognition_BLSTM

Bidirectional LSTM network for speech emotion recognition.
MIT License
263 stars 79 forks source link

meet a issue in python3 #7

Closed Haorotu closed 6 years ago

Haorotu commented 6 years ago

image

File "F:/123/find_best_model.py", line 160, in ds = pickle.load(open(dataset + '_db.p', 'rb'))

FileNotFoundError: [Errno 2] No such file or directory: 'berlin_db.p'

RayanWang commented 6 years ago

OK, first you have to run the code with "-l" as argument at your first run to generate the db file. Then you don't need this argument again.

Haorotu commented 6 years ago

Due to using python3,I ask for your help how to write the code in this issue."python find_best_model.py -d "berlin" -p [berlin data path] -l -e -c 7" how to transform. Thank you.

RayanWang commented 6 years ago

Please enter the following in terminal: python "F:/123/find_best_model.py" -d "berlin" -p [berlin data path] -l -e -c 7 which [berlin data path] is the training data directory such as "F:/Berlin/download/wav/"

Haorotu commented 6 years ago

Thanks for your help to solove my problems,I also meet another issue.Please help me in your spare time.Thanks very much.

F:\123>python find_best_model.py -d "berlin" -p "F:/123/wav/" -l -e -c 7 Using TensorFlow backend. Writing berlin data set to file... F:\Anaconda3\lib\site-packages\pyAudioAnalysis\audioFeatureExtraction.py:66: RuntimeWarning: invalid value encountered in true_divide Xt = Xt / Xt.max() Traceback (most recent call last): File "find_best_model.py", line 163, in functions.feature_extract(ds.data, nb_samples=len(ds.targets), dataset=dataset) File "F:\123\utility\functions.py", line 17, in feature_extract f = audioFeatureExtraction.stFeatureExtraction(x, Fs, globalvars.frame_size Fs, globalvars.step Fs) File "F:\Anaconda3\lib\site-packages\pyAudioAnalysis\audioFeatureExtraction.py", line 579, in stFeatureExtraction chromaNames, chromaF = stChromaFeatures(X, Fs, nChroma, nFreqsPerChroma) File "F:\Anaconda3\lib\site-packages\pyAudioAnalysis\audioFeatureExtraction.py", line 277, in stChromaFeatures C2[0:C.shape[0]] = C ValueError: could not broadcast input array from shape (200) into shape (192)

F:\123>

RayanWang commented 6 years ago

Please upgrade the project to the newest version.

Haorotu commented 6 years ago

Excuse me,I'm so sorry to disturb again.I meet a issue at the processing of using the newest version.Please help me !Thanks very much! image

RayanWang commented 6 years ago

Only reserve the first two arguments and it will work.

RayanWang commented 6 years ago

Modify codes: mfccInitFilterBanks(fs, nfft, ...) -> mfccInitFilterBanks(fs, nfft), just leave fs and nfft.

Haorotu commented 6 years ago

This issue is already solved by myself,Thanks very much.Happy mid-Autumn Festival

Haorotu commented 6 years ago

Dear Rayan image

I’m so sorry to disturb you again.Please help me.I hope to study your code careful and serious.I sincerely thank you for sharing this code.I feel worry about this issue.I don't know how to revise the code.Please help me .Thanks very much.

RayanWang commented 6 years ago

Cast the type of variable 'nfft' to integer in method stFeatureSpeed, and it will work.

Haorotu commented 6 years ago

Thanks,but I knew "nfft" should be a 'int',I don't know how to revise it.I'm sorry to disturb you again.Please help.Thank you very much

RayanWang commented 6 years ago

Comment out the invocation of method 'mfccInitFilterBanks' in stFeatureSpeed, and modify nfft like this: 'nfft = int(win / 2)'