Emotion-Recognition-from-Speech icon indicating copy to clipboard operation
Emotion-Recognition-from-Speech copied to clipboard

ValueError: could not broadcast input array from shape (34,366) into shape (34)

Open leoheart0125 opened this issue 6 years ago • 3 comments

I get this error message in extract_fearures

leoheart0125 avatar Jan 02 '19 07:01 leoheart0125

I also get this error, have you solve it?

CZFuChason avatar Feb 07 '19 07:02 CZFuChason

I download the Berlin dataset and saved it in a folder called download. I went into the src folder and ran the following command:

python emorecognition.py -d 'berlin' -p /home/nandhini/Project/download/wav/ -e -l

and I came across this error:

/usr/local/lib/python2.7/dist-packages/pydub/utils.py:165: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning) Loading data from berlin dataset... Saving berlin dataset info to file... Number of dataset samples: 535 Traceback (most recent call last): File "emorecognition.py", line 59, in Fglobal.append(np.concatenate((np.mean(F,axis=1),np.std(F,axis=1)))) File "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", line 3118, in mean out=out, **kwargs) File "/usr/local/lib/python2.7/dist-packages/numpy/core/_methods.py", line 59, in _mean arr = asanyarray(a) File "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py", line 591, in asanyarray return array(a, dtype, copy=False, order=order, subok=True) ValueError: could not broadcast input array from shape (34,264) into shape (34)

Help me out!

Nandy-Saran avatar Feb 25 '19 06:02 Nandy-Saran

This problem reason: pyAudioAnalysis update method stFeatureExtraction to return two value. How to fix: modify F by F[0] -> Fglobal.append(np.concatenate((np.mean(F[0],axis=1),np.std(F[0],axis=1))))

Sorry for my bad english.

returnWOW avatar May 13 '19 11:05 returnWOW