使用 Librosa 生成的频谱图看起来与 Kaldi 不一致?

Spectrograms generated using Librosa don't look consistent with Kaldi?

我使用 Kaldi 的 "egs/tidigits" 代码生成了 "seven" 话语的频谱图,使用了 23 个箱子、20kHz 采样率、25ms window 和 10ms 偏移。通过 MATLAB imagesc 函数显示的频谱图如下所示:

我正在尝试使用 Librosa 作为 Kaldi 的替代品。我使用与上面相同的箱数、采样率和 window 长度/偏移设置我的代码如下。

time_series, sample_rate = librosa.core.load("7a.wav",sr=20000)
spectrogram = librosa.feature.melspectrogram(time_series, sr=20000, n_mels=23, n_fft=500, hop_length=200)
log_S = librosa.core.logamplitude(spectrogram)
np.savetxt("7a.txt", log_S.T)

然而,当我可视化同一 WAV 文件的结果 Librosa 频谱图时,它看起来不同:

谁能帮我理解为什么这些看起来如此不同?在我尝试过的其他 WAV 文件中,我注意到在上面的 Librosa 脚本中,我的擦音(如上例中 "seven" 中的 /s/)被截断,这极大地影响了我的数字分类准确性。谢谢!

Kaldi默认在dct输出上应用lifter,这就是为什么上层系数被衰减的原因。查看详细信息 here