python_spectrograms_and_inversion icon indicating copy to clipboard operation
python_spectrograms_and_inversion copied to clipboard

Making the spectrogram Issue

Open khld opened this issue 7 years ago • 0 comments

i got error 🤢 at that line

wav_spectrogram = pretty_spectrogram(data.astype('float64'), fft_size = fft_size,

                               step_size = step_size, log = True , thresh = spec_thresh)

TypeError Traceback (most recent call last) in 1 wav_spectrogram = pretty_spectrogram(data.astype('float64'), fft_size = fft_size, ----> 2 step_size = step_size, log = True , thresh = spec_thresh)

in pretty_spectrogram(d, log, thresh, fft_size, step_size) 83 """ 84 specgram = np.abs(stft(d, fftsize=fft_size, step=step_size, real=False, ---> 85 compute_onesided=True)) 86 87 if log == True:

in stft(X, fftsize, step, mean_normalize, real, compute_onesided) 68 X -= X.mean() 69 ---> 70 X = overlap(X, fftsize, step) 71 72 size = fftsize

in overlap(X, window_size, window_step) 41 valid = len(a) - ws 42 nw = (valid) // ss ---> 43 out = np.ndarray((nw,ws),dtype = a.dtype) 44 45 for i in xrange(nw):

TypeError: 'float' object cannot be interpreted as an integer

khld avatar Nov 01 '18 10:11 khld