I am extracting a log Mel - spectrogram from the GTZAN dataset using Librosa in python. My code -
data, sampling_rate = librosa.load(os.path.join(dir, folder, file), )
mel = librosa.feature.melspectrogram(y=data, hop_length = 512//2, n_fft = 512, n_mels = 64)
mel = librosa.power_to_db(mel**2)
Well, It works perfectly. But, the size of each Mel-spectrogram is different. Most of the log Mel-spectrogram having a size of 2586, a few of them having 2590 to 2620.
I checked the size is different when taking the log on Mel-spectrogram. How they differ in size when taking the log were all audios are in the same length...
Any suggestion, thanks