class_docstr: Convert waveform to Mel Spectrogram
  
  Args:
      - sample_rate (`int`):
          Sample rate of audio signal.
      - window_length (`int`):
          Window & FFT size.
      - hop_length (`int`):
          Length of hop between STFT windows.
      - f_min (`int`):
          Minimum frequency.
      - f_max (`int`):
          Maximum frequency.
      - n_mels (`int`):
          Number of mel filterbanks.
      - naf_mode (`bool`):
          The flag to control other parameters of mel spectrogram transform
      - mel_log (`str`):
          The torch log type in ['log', 'log10']
      - spec_norm (`str`):
          The normalization type (max normalization for 'max').
code: def __init__(
      self,
      sample_rate=8000,
      window_length=1024,
      hop_length=256,
      f_min=300,
      f_max=4000,
      n_mels=256,
      naf_mode=False,
      mel_log="log",
      spec_norm="l2",
  ):
      super().__init__()
      self.naf_mode = naf_mode
      self.mel_log = mel_log
      self.spec_norm = spec_norm
      self.mel = torchaudio.transforms.MelSpectrogram(
          sample_rate=sample_rate,
          n_fft=window_length,
          hop_length=hop_length,
          f_min=f_min,
          f_max=f_max,
          n_mels=n_mels,
          window_fn=torch.hann_window,
          power=1 if naf_mode else 2,
          pad_mode="constant" if naf_mode else "reflect",
          norm="slaney" if naf_mode else None,
          mel_scale="slaney" if naf_mode else "htk",
      )
  
file_path: towhee/towhee/models/utils/audio_preprocess.py
imports: import numpy
  import torch
  import torchaudio
  from towhee.utils.log import models_log
label_desc: Use image node_id 1 to create a new MelSpec object from inherited base classes: torch.nn with example: obj = MelSpec(sample_rate, window_length, hop_length, f_min, f_max, n_mels, naf_mode, mel_log, spec_norm)