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
problem with nchroma in stChromaFeatures #30
Comments
Thanx alot for the info. |
Hi again. It should work now, please update and retry. |
Hi, |
Hi, |
OK, I missed one part. |
Would the code below be correct ?
|
At last i found the solution. Thanks! Faced this problem week ago. when was training my SER model with shorten samples, and then wanted to test real-life, longer examples. |
Hi,
I got the following error :
Traceback (most recent call last):
File "/home/jmw/Bureau/bacasable/musiques-stream/testpydub.py", line 42, in
F = pafe.stFeatureExtraction(mysample[:2*w], Fs, w, pas)
File "/home/jmw/Bureau/bacasable/musiques-stream/pyAudioAnalysis-master/pyAudioAnalysis/audioFeatureExtraction.py", line 591, in stFeatureExtraction
chromaNames, chromaF = stChromaFeatures(X, Fs, nChroma, nFreqsPerChroma)
File "/home/jmw/Bureau/bacasable/musiques-stream/pyAudioAnalysis-master/pyAudioAnalysis/audioFeatureExtraction.py", line 283, in stChromaFeatures
print "nFreqsPerChroma[nChroma]",nFreqsPerChroma[nChroma]
IndexError: index 56 is out of bounds for axis 1 with size 55
if the windows is small, e.g. below the max(nChroma), in my case the Win size is 110 (10ms with Fs=11000), half window is 55 then C /= nFreqsPerChroma[nChroma] crashes.
This error happens only with a small window, e.g. Fs=11000 with 10ms window so I set Win=110 samples and half window =55 for FFT.
I put a few prints in the code and saw that he nChroma table contains 92 samples) so that the code :
C /= nFreqsPerChroma[nChroma]
in stChromaFeatures crashes.
This is because the nFreqPerChroma array is of size nChroma (=55) but nChroma contains values larger than 55.
I think you should have a look at this code.
best regards
The text was updated successfully, but these errors were encountered: