Closed tosa-no-onchan closed 9 months ago
Hey, thanks. The idea was that it would append the end of the spectrogram by default, not sure how I missed this, but definitely I will fix this in the next release. Thanks!
Your code is a little complicated. Right now it is following:
padded_spectrogram = np.pad(spectrogram, ((self.max_spectrogram_length - spectrogram.shape[0], 0),(0,0)), mode="constant", constant_values=self.padding_value)
To pad the end of it is as simple as this:
padded_spectrogram = np.pad(spectrogram, ((0, self.max_spectrogram_length - spectrogram.shape[0]),(0,0)), mode="constant", constant_values=self.padding_value)
Issued fixed
Hi @pythonlessons,
I think, Class SpectrogramPadding has a bag.
Original code:
A short spectrogram data is slide to backward(tail) of padded_spectrogram.
But, I want, A short spectrogram data will be slide to forward(head) of padded_spectrogram.
New code: