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.
code: def __init__(
      self,
      feature_size=80,
      sampling_rate=16000,
      hop_length=160,
      chunk_length=30,
      n_fft=400,
      padding_value=0.0,
      return_attention_mask=False,  # pad inputs to max length with silence token (zero) and no attention mask
      **kwargs,
  ):
      super().__init__(
          feature_size=feature_size,
          sampling_rate=sampling_rate,
          padding_value=padding_value,
          return_attention_mask=return_attention_mask,
          **kwargs,
      )
      self.n_fft = n_fft
      self.hop_length = hop_length
      self.chunk_length = chunk_length
      self.n_samples = chunk_length * sampling_rate
      self.nb_max_frames = self.n_samples // hop_length
      self.sampling_rate = sampling_rate
      self.mel_filters = self.get_mel_filters(
          sampling_rate, n_fft, n_mels=feature_size
      )
  
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 1 to create a new WhisperFeatureExtractor object from inherited base classes: SequenceFeatureExtractor with example: obj = WhisperFeatureExtractor(feature_size, sampling_rate, hop_length, chunk_length, n_fft, padding_value, return_attention_mask)