code: def construct_filterbank(num_filters, nfft, sr, min_freq, max_freq):
      
  
      min_mel = freq_to_mel(min_freq)
      max_mel = freq_to_mel(max_freq)
      mel_points = np.linspace(min_mel, max_mel, num_filters + 2)
      bin_freqs = mel_to_freq(mel_points)
      # bins = round((nfft - 1) * bin_freqs / sr)
  
      fftfreqs = np.arange(int(nfft / 2 + 1)) / nfft * sr
  
      fbank = np.zeros((num_filters, int(nfft / 2 + 1)))
      for i in range(num_filters):
          fs = bin_freqs[i + np.arange(3)]
          fs = fs[1] + (fs - fs[1])
          loslope = (fftfreqs - fs[0]) / (fs[1] - fs[0])
          highslope = (fs[2] - fftfreqs) / (fs[2] - fs[1])
          fbank[i, :] = np.maximum(np.zeros(loslope.shape), np.minimum(loslope, highslope))
      return fbank.transpose()
docs: Constructs a mel-frequency filter bank.
  
              Parameters
              ----------
              nfft : int
                  Number of points in the FFT.
  
              Returns
              -------
              array
                  Filter bank to multiply an FFT spectrum to create a mel-frequency
                  spectrum.