2017-06-19 7 views
0

イムwavファイルのいくつかの特徴を抽出しようとしている私が持っている:のpyAudioAnalysisライブラリエラー:形状にサイズ4400の配列の形状を変更することはできません(220,10)

https://s3-us-west-2.amazonaws.com/music-emotions/ambient/13+Clock+in+the+Morning+-+Waiters+the++Free+Music+Archive+(No+Copyright+Music).wav

Imは使用して特徴抽出ツールpyAudioAnalysisライブラリ:

https://github.com/tyiannak/pyAudioAnalysis/wiki/3.-Feature-Extraction

問題は、IMがnumpyののreshape()機能のエラーを取得していることです。イムこのようなウィキのような特徴抽出を使用する方法のガイドライン以下:

[Fs, x] = audioBasicIO.readAudioFile('13 Clock in the Morning - Waiters the Free Music Archive (No Copyright Music).wav') 
F = audioFeatureExtraction.stFeatureExtraction(x, Fs, 0.050 * Fs, 0.025 * Fs) 

をそして、これは私が取得エラーです:

 1 [Fs, x] = audioBasicIO.readAudioFile("song-wavs/"+song.name) 
----> 2 F = audioFeatureExtraction.stFeatureExtraction(x, Fs, 0.050 * Fs, 0.025 * Fs) 

pyAudioAnalysis/audioFeatureExtraction.pyc in stFeatureExtraction(signal, Fs, Win, Step) 
    575   curFV[0] = stZCR(x)        # zero crossing rate 
    576   curFV[1] = stEnergy(x)       # short-term energy 
--> 577   curFV[2] = stEnergyEntropy(x)     # short-term entropy of energy 
    578   [curFV[3], curFV[4]] = stSpectralCentroidAndSpread(X, Fs) # spectral centroid and spread 
    579   curFV[5] = stSpectralEntropy(X)     # spectral entropy 

pyAudioAnalysis/audioFeatureExtraction.pyc in stEnergyEntropy(frame, numOfShortBlocks) 
    49    frame = frame[0:subWinLength * numOfShortBlocks] 
    50  # subWindows is of size [numOfShortBlocks x L] 
---> 51  subWindows = frame.reshape(subWinLength, numOfShortBlocks, order='F').copy() 
    52 
    53  # Compute normalized sub-frame energies: 

ValueError: cannot reshape array of size 4400 into shape (220,10) 

は、誰もが、私は問題を解決する方法を教えてもらえます私はそれを引き起こしているのですか?

答えて

関連する問題