参考此链接:https : //aqibsaeed.github.io/2016-09-03-urban-sound-classification-part-1/,我正在尝试制作相同的波形图,但是,我得到了这个图: .
我正在运行这些 python 代码:
def plot_waves(sound_names, raw_sounds):
i = 1
fig = plt.figure()
for n, f in zip(sound_names, raw_sounds):
plt.subplot(10, 1, i)
librosa.display.waveplot(np.array(f), sr=22050)
plt.title(n.title())
i += 1
plt.suptitle("Figure 1: Waveplot", x=0.5, y=0.915, fontsize=18)
plt.show()
知道如何改进以实现与链接中所示相同的数字吗?谢谢。