tyiannak / pyAudioAnalysis

Python Audio Analysis Library: Feature Extraction, Classification, Segmentation and Applications
Apache License 2.0
5.84k stars 1.19k forks source link

Error in stFeatureExtraction #63

Open sreejasuresh007 opened 7 years ago

sreejasuresh007 commented 7 years ago

Please help.

Traceback (most recent call last): File "E:\dATAbnc\pyAudioAnalysis-master\pyAudioAnalysis-master\demo.py", line 7, in F = audioFeatureExtraction.stFeatureExtraction(x, Fs, 0.050Fs, 0.025Fs); File "E:\dATAbnc\pyAudioAnalysis-master\pyAudioAnalysis-master\audioFeatureExtraction.py", line 544, in stFeatureExtraction N = len(signal) # total number of samples TypeError: object of type 'numpy.float64' has no len()

tuulihill commented 7 years ago

I've been getting this error too. I tried to change the type of signal but didn't manage to.

sreejasuresh007 commented 7 years ago

Actually my issue got solved when I changed the input file. Now its working fine.

onsunsl commented 7 years ago

I've been getting this error too

tuulihill commented 7 years ago

I also got past this with another input file.

tyiannak commented 7 years ago

@tuulihill could you share an input file to check it, because I am pretty sure this error occurs when audioBasicIO cannot read the input file

tuulihill commented 7 years ago

@tyiannak I was just testing it out using the threewords.wav file that came with, then I switched to count.wav. Then in audioBasicIO.py I had to change xrange to range

ziweizh commented 7 years ago

I also encountered the same error which persisted despite changing 'xrange' to 'range'. What's the solution?

manish-manghwani commented 6 years ago

@tyiannak I have encountered the same issue. on changing the audio file, it worked for me. Details for admissible file format is as follows :
File size : 187.9 KB codec : wav sample rate : 16000 Hz. count.wav.zip

The one which is not running is with File size : 395.1 KB codec : opus sample rate : 48000 Hz 1min.wav.zip

So now I have tried with the following file and its running File size : 1.4 MB codec : WAV sample rate : 44100 Hz download.wav.zip

I guess the problem is with codec now. If it's WAV -> working, opus -> not working

Final test run was performed and it may be noticed that codec -> wav is running File size : 27.9 MB codec : WAV sample rate : 48000 (since file size is >10 MB, i can't upload it)

The above information is my observation, it may or may not be relevant.