Open SimoMoilanen opened 7 years ago
I'm also having an issue training an HMM model. Getting a similar error here:
File "/usr/local/lib/python2.7/dist-packages/pyAudioAnalysis/audioFeatureExtraction.py", line 48, in stEnergyEntropy
subWindows = frame.reshape(subWinLength, numOfShortBlocks, order='F').copy()
ValueError: total size of new array must be unchanged
@SimoMoilanen I tried converting the WAV files to a sample rate of 16000 (what the package author uses in his examples) and now it works without any problems.
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 he is right. I recommend using pydub to convert to wav and mono.
from pydub import AudioSegment
sound = AudioSegment.from_file("/path/to/file.wav", format="wav")
sound = sound.set_channels(1)
sound.export(output_filename, format='wav')
Hello, I'm trying to train a HMM model from a 15 minute wav file. It crashes with following traceback:
chunk.segments:
Operating system: OS X El Capitan 10.11.4 Python 2.7.13 numpy==1.12.0
I can train and segment with other models (svm, knn, extratrees, gradientboosting and randomforest) successfully.