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: Calculates the complex Short-Time Fourier Transform (STFT) of the given framed signal. Should give the same
  results as `torch.stft`.
docstr_tok: ["Calculates","the","complex","Short-Time","Fourier","Transform","(","STFT",")","of","the","given","framed","signal",".","Should","give","the","same","results","as","`","torch.stft","`","."]
code: def stft(self, frames, window):
      """
      Calculates the complex Short-Time Fourier Transform (STFT) of the given framed signal. Should give the same
      results as `torch.stft`.
      """
      frame_size = frames.shape[1]
      fft_size = self.n_fft
  
      if fft_size is None:
          fft_size = frame_size
  
      if fft_size < frame_size:
          raise ValueError(
              "FFT size must greater or equal the frame size"
          )
      # number of FFT bins to store
      num_fft_bins = (fft_size >> 1) + 1
  
      data = np.empty((len(frames), num_fft_bins), dtype=np.complex64)
      fft_signal = np.zeros(fft_size)
  
      for f, frame in enumerate(frames):
          if window is not None:
              np.multiply(frame, window, out=fft_signal[:frame_size])
          else:
              fft_signal[:frame_size] = frame
          data[f] = fft(fft_signal, axis=0)[:num_fft_bins]
      return data.T
  
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 4 for calling the WhisperFeatureExtractor obj's underlying member method code with example usage: obj.stft(frames, window) and returns: data