Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
leoheart0125 opened this issue Jan 2, 2019 · 3 comments

Comments

@leoheart0125
Copy link

leoheart0125 commented Jan 2, 2019

I get this error message in extract_fearures

@CZFuChason
Copy link

I also get this error, have you solve it?

@Nandy-Saran
Copy link

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!

@returnWOW
Copy link

returnWOW commented May 13, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants