class_docstr: Constructs a Whisper feature extractor.
  
  This feature extractor inherits from [`WhisperFeatureExtractor`] which contains most of the main methods. Users
  should refer to this superclass for more information regarding those methods.
  
  This class extracts mel-filter bank features from raw speech using a custom numpy implementation of the `Short Time
  Fourier Transform` which should match pytorch's `torch.stft` equivalent.
  
  Args:
      feature_size (`int`, defaults to 80):
          The feature dimension of the extracted features.
      sampling_rate (`int`, defaults to 16000):
          The sampling rate at which the audio files should be digitalized expressed in Hertz per second (Hz).
      hop_length (`int`, defaults to 160):
          Length of the overlaping windows for the STFT used to obtain the Mel Frequency coefficients.
      chunk_length (`int`, defaults to 30):
          The maximum number of chuncks of `sampling_rate` samples used to trim and pad longer or shorter audio
          sequences.
      n_fft (`int`, defaults to 400):
          Size of the Fourier transform.
      padding_value (`float`, *optional*, defaults to 0.0):
          Padding value used to pad the audio. Should correspond to silences.
docstr: Compute the log-Mel spectrogram of the provided audio, gives similar results whisper's original torch
  implementation with 1e-5 tolerance.
docstr_tok: ["Compute","the","log-Mel","spectrogram","of","the","provided","audio",",","gives","similar","results","whisper","'s","original","torch","implementation","with","1e-5","tolerance","."]
code: def _np_extract_fbank_features(
      self, waveform: np.array
  ) -> np.ndarray:
      """
      Compute the log-Mel spectrogram of the provided audio, gives similar results whisper's original torch
      implementation with 1e-5 tolerance.
      """
      window = np.hanning(self.n_fft + 1)[:-1]
  
      frames = self.fram_wave(waveform)
      stft = self.stft(frames, window=window)
      magnitudes = np.abs(stft[:, :-1]) ** 2
  
      filters = self.mel_filters
      mel_spec = filters @ magnitudes
  
      log_spec = np.log10(np.clip(mel_spec, a_min=1e-10, a_max=None))
      log_spec = np.maximum(log_spec, log_spec.max() - 8.0)
      log_spec = (log_spec + 4.0) / 4.0
  
      return log_spec
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/models/whisper/feature_extraction_whisper.py
imports: from typing import List, Optional, Union
  import numpy
  from numpy.fft import fft
  from ...feature_extraction_sequence_utils import SequenceFeatureExtractor
  from ...feature_extraction_utils import BatchFeature
  from ...utils import TensorType, logging
label_desc: Use image node_id 5 for calling the WhisperFeatureExtractor obj's underlying member method code with example usage: obj._np_extract_fbank_features(waveform) and returns: log_spec