Bug in extracting audio feature
scopeInfinity opened this issue · 2 comments
scopeInfinity commented
Stacktrace
Video Id [3764] Already Downloaded
Traceback (most recent call last):
File "videohandler.py", line 382, in <module>
autocache()
File "videohandler.py", line 352, in autocache
cache_videoid(_id, percent)
File "videohandler.py", line 333, in cache_videoid
vHandler.get_iframes_audio(_id = _id)
File "videohandler.py", line 251, in get_iframes_audio
afeatures = librosa.feature.mfcc(y=audio_y, sr=sr, n_mfcc=self.AUDIO_FEATURE[1])
File "/home/gagan.cs14/.local/lib/python2.7/site-packages/librosa/feature/spectral.py", line 1377, in mfcc
S = power_to_db(melspectrogram(y=y, sr=sr, **kwargs))
File "/home/gagan.cs14/.local/lib/python2.7/site-packages/librosa/feature/spectral.py", line 1466, in melspectrogram
power=power)
File "/home/gagan.cs14/.local/lib/python2.7/site-packages/librosa/core/spectrum.py", line 1325, in _spectrogram
S = np.abs(stft(y, n_fft=n_fft, hop_length=hop_length))**power
File "/home/gagan.cs14/.local/lib/python2.7/site-packages/librosa/core/spectrum.py", line 163, in stft
y = np.pad(y, int(n_fft // 2), mode=pad_mode)
File "/home/gagan.cs14/.conda/envs/V2D/lib/python2.7/site-packages/numpy/lib/arraypad.py", line 1420, in pad
" in axis {} of `array`".format(axis))
ValueError: There aren't any elements to reflect in axis 0 of `array`
Workaround
Ignoring such videos for now
qianbudiao6 commented
I also encountered this problem in another project. How did you deal with it? can you help me?
github-actions commented
Is follow-up required?