code: def design_prototype_filter(
      taps: int = 62, cutoff_ratio: float = 0.142, beta: float = 9.0
  ) -> np.ndarray:
      """Design prototype filter for PQMF.
  
      This method is based on `A Kaiser window approach for the design of prototype
      filters of cosine modulated filterbanks`_.
  
      Args:
          taps (int): The number of filter taps.
          cutoff_ratio (float): Cut-off frequency ratio.
          beta (float): Beta coefficient for kaiser window.
  
      Returns:
          ndarray: Impluse response of prototype filter (taps + 1,).
  
      .. _`A Kaiser window approach for the design of prototype filters of cosine
          modulated filterbanks`: https://ieeexplore.ieee.org/abstract/document/681427
  
      """
      # check the arguments are valid
      assert taps % 2 == 0, "The number of taps mush be even number."
      assert (
          0.0 < cutoff_ratio < 1.0
      ), "Cutoff ratio must be > 0.0 and < 1.0."
  
      # make initial filter
      omega_c = np.pi * cutoff_ratio
      with np.errstate(invalid="ignore"):
          h_i = np.sin(omega_c * (np.arange(taps + 1) - 0.5 * taps)) / (
              np.pi * (np.arange(taps + 1) - 0.5 * taps)
          )
      h_i[taps // 2] = (
          np.cos(0) * cutoff_ratio
      )  # fix nan due to indeterminate form
  
      # apply kaiser window
      w = kaiser(taps + 1, beta)
      h = h_i * w
  
      return h
  
file_path: espnet/espnet2/gan_tts/melgan/pqmf.py
imports: import numpy
  import torch
  import torch.nn.functional
  from scipy.signal import kaiser
label_desc: Use image node_id 1 for calling a global function with example usage: design_prototype_filter(taps, cutoff_ratio, beta) and returns: h