code: def compute_fbank_matrix(
      sample_rate: int = 16000,
      n_fft: int = 400,
      n_mels: int = 80,
      f_min: int = 0.0,
      f_max: int = 8000.0,
  ):
      mel = paddle.linspace(
          hz_to_mel(f_min, htk=True),
          hz_to_mel(f_max, htk=True),
          n_mels + 2,
          dtype=paddle.float32,
      )
      hz = mel_to_hz(mel, htk=True)
  
      band = hz[1:] - hz[:-1]
      band = band[:-1]
      f_central = hz[1:-1]
  
      n_stft = n_fft // 2 + 1
      all_freqs = paddle.linspace(0, sample_rate // 2, n_stft)
      all_freqs_mat = all_freqs.tile([f_central.shape[0], 1])
  
      f_central_mat = f_central.tile(
          [all_freqs_mat.shape[1], 1]
      ).transpose([1, 0])
      band_mat = band.tile([all_freqs_mat.shape[1], 1]).transpose(
          [1, 0]
      )
  
      slope = (all_freqs_mat - f_central_mat) / band_mat
      left_side = slope + 1.0
      right_side = -slope + 1.0
  
      fbank_matrix = paddle.maximum(
          paddle.zeros_like(left_side),
          paddle.minimum(left_side, right_side),
      )
  
      return fbank_matrix
  
file_path: PaddleHub/modules/audio/speaker_recognition/ecapa_tdnn_voxceleb/feature.py
imports: import paddle
  import paddleaudio
  from paddleaudio.features.spectrum import hz_to_mel
  from paddleaudio.features.spectrum import mel_to_hz
  from paddleaudio.features.spectrum import power_to_db
  from paddleaudio.features.spectrum import Spectrogram
  from paddleaudio.features.window import get_window
label_desc: Use image node_id 1 for calling a global function with example usage: compute_fbank_matrix(sample_rate, n_fft, n_mels, f_min, f_max) and returns: fbank_matrix