请解释频谱图librosa.stft

时间:2019-08-15 03:05:56

标签: python pandas matplotlib scipy librosa

我尝试了这段代码,并且已经获得了光谱

y, sr = librosa.load("Sample1.wav")
ar=np.abs(librosa.stft(y))
D = librosa.amplitude_to_db(ar, ref=np.max)
librosa.display.specshow(D[:,0:], y_axis='linear',x_axis='time')
plt.colorbar(format='%+2.0f dB')
plt.title('frequency power spectrogram')

enter image description here

我不知道如何操作D数组

我想将每个时间单元格放入数据框(具有索引作为频率),

但是我不知道如何找到每个D [:,n]的频率值。

以及如何计算每一行的时间,据我所知,这不是精确的时间。

我的问题是如何知道:

  1. 每个单元格的时间(以毫秒为单位)
  2. 每个单元格的频率
  3. 为什么图片中的频率未达到20k HZ

关于dB为何为负的一点解释

0 个答案:

没有答案