pyAudioAnalysis icon indicating copy to clipboard operation
pyAudioAnalysis copied to clipboard

Trouble using beatExtraction() from command line

Open laag115 opened this issue 7 years ago • 3 comments

I was able to call stFeatureExtraction and it extracted 4 files, 2 csv's and 2 npy's. Do I need to pass one of these to beatextraction somehow? I can't decipher how to use this function. Thanks for any help

Here is the command I used: python audioAnalysis.py beatExtraction -i black-widow.wav

Traceback (most recent call last): File "audioAnalysis.py", line 440, in beatExtractionWrapper(args.input, args.plot) File "audioAnalysis.py", line 51, in beatExtractionWrapper F = aF.stFeatureExtraction(x, Fs, 0.050 * Fs, 0.050 * Fs) File "/home/luis/Documents/Mood/pyAudioAnalysis_beats/audioFeatureExtraction.py", line 572, in stFeatureExtraction curFV[2] = stEnergyEntropy(x) # short-term entropy of energy File "/home/luis/Documents/Mood/pyAudioAnalysis_beats/audioFeatureExtraction.py", line 48, in stEnergyEntropy subWindows = frame.reshape(subWinLength, numOfShortBlocks, order='F').copy() ValueError: cannot reshape array of size 4400 into shape (220,10)

laag115 avatar Mar 29 '17 02:03 laag115

I had the same problem. Then I discovered that the audio that I was using was stereo, and we required a mono audio file.

rishavag1995 avatar Jun 07 '17 05:06 rishavag1995

Convert your stereo signal to mono signal.

signal = audioBasicIO.stereo2mono(signal)

blgnksy avatar Apr 20 '20 22:04 blgnksy

Convert your stereo signal to mono signal.

signal = audioBasicIO.stereo2mono(signal)

Just in case anyone is seeing this now, the syntax has been updated to: signal = audioBasicIO.stereo_to_mono(signal)

beinstoss avatar Jun 09 '21 02:06 beinstoss