So, I have been analyzing audio data. I used the librosa package and used its .stft() function to calculate the Fourier transform of my audio data. I did the following-
aud,sr=librosa.load(os.path.join(path,'genres_original',i,f'{i}.00001.wav'))
aud_ft= np.abs(librosa.stft(aud, n_fft = n_fft, hop_length = hop_length,win_length=win_length))
plt.figure(figsize=(12,4))
plt.plot(aud_ft)
The shape of the aud_ft is (1025,1309). The plot represents frequency on the y-axis and time on the x-axis and also represents the power/amplitude of each frequency at each time sample using color.
My doubt is how does a 2d array stores frequency as well as power values?
In addition to that, I noticed some weird outputs of the plot() function.
Why does the plot remain the same for both the cases, how do I explain this?
Any help is highly appreciated. Thank you in advance.