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

Trouble using beatExtraction() from command line #72

Open
laag115 opened this issue Mar 29, 2017 · 3 comments
Open

Trouble using beatExtraction() from command line #72

laag115 opened this issue Mar 29, 2017 · 3 comments

Comments

@laag115
Copy link

laag115 commented Mar 29, 2017

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)

@rishavag1995
Copy link

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

Lakmus85 added a commit to Lakmus85/pyAudioAnalysis that referenced this issue Jun 3, 2019
…xtraction expects mono

Signed-off-by: Lakmus85 <lakmus85@gmail.com>
@blgnksy
Copy link

blgnksy commented Apr 20, 2020

Convert your stereo signal to mono signal.

signal = audioBasicIO.stereo2mono(signal)

@beinstoss
Copy link

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)

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