梅爾權重矩陣

梅爾權重矩陣 - 17

版本

此版本的運算子自版本 17 起可用。

摘要

產生一個梅爾權重矩陣,該矩陣可用於根據梅爾刻度上的 [lower_edge_hertz, upper_edge_hertz] 範圍,將包含線性取樣頻譜(來自 DFT 或 STFT)的張量重新加權為 num_mel_bins 頻率資訊。此函式根據以下公式定義以赫茲為單位的頻率的梅爾刻度

mel(f) = 2595 * log10(1 + f/700)

在傳回的矩陣中,所有三角形(濾波器組)的峰值為 1.0。

傳回的梅爾權重矩陣可用於右乘形狀為 [frames, num_spectrogram_bins] 的線性刻度頻譜值(例如 STFT 幅度)的光譜圖 S,以產生形狀為 [frames, num_mel_bins] 的「梅爾光譜圖」M。

屬性

  • output_datatype - INT (預設值為 '1')

    輸出張量的資料類型。必須嚴格符合 TensorProto 中 DataType 列舉的其中一個值,其值對應於 T3。預設值為 1 = FLOAT。

輸入

  • num_mel_bins (異質) - T1

    梅爾頻譜中的頻帶數量。

  • dft_length (異質) - T1

    原始 DFT 的大小。原始 DFT 的大小用於推斷單邊 DFT 的大小,該大小被理解為 floor(dft_length/2) + 1,即光譜圖僅包含非冗餘 DFT 頻率格。

  • sample_rate (異質) - T1

    用於建立光譜圖的輸入訊號的每秒樣本數。用於計算對應於每個光譜圖頻率格的頻率,這決定了它們如何映射到梅爾刻度。

  • lower_edge_hertz (異質) - T2

    梅爾頻譜中要包含的頻率下限。這對應於最低三角形頻帶的下邊緣。

  • upper_edge_hertz (異質) - T2

    最高頻帶的所需頂邊緣。

輸出

  • output (異質) - T3

    梅爾權重矩陣。輸出形狀為:[floor(dft_length/2) + 1][num_mel_bins]。

類型約束

  • T1 in ( tensor(int32), tensor(int64) )

    限制為整數張量。

  • T2 in ( tensor(bfloat16), tensor(double), tensor(float), tensor(float16) )

    限制為浮點張量

  • T3 in ( tensor(bfloat16), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8) )

    限制為任何數值類型。