class_docstr: Constructs a Whisper feature extractor.
  
  This feature extractor inherits from [`~feature_extraction_sequence_utils.SequenceFeatureExtractor`] 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 (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.
class_docstr_tok: ["Constructs","a","Whisper","feature","extractor",".","This","feature","extractor","inherits","from","[","`","~feature_extraction_sequence_utils.SequenceFeatureExtractor","`","]","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","(","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: Every array in the list is normalized to have zero mean and unit variance
docstr_tok: ["Every","array","in","the","list","is","normalized","to","have","zero","mean","and","unit","variance"]
code: def zero_mean_unit_var_norm(
      input_values: List[np.ndarray],
      attention_mask: List[np.ndarray],
      padding_value: float = 0.0,
  ) -> List[np.ndarray]:
      """
      Every array in the list is normalized to have zero mean and unit variance
      """
      if attention_mask is not None:
          attention_mask = np.array(attention_mask, np.int32)
          normed_input_values = []
  
          for vector, length in zip(
              input_values, attention_mask.sum(-1)
          ):
              normed_slice = (
                  vector - vector[:length].mean()
              ) / np.sqrt(vector[:length].var() + 1e-7)
              if length < normed_slice.shape[0]:
                  normed_slice[length:] = padding_value
  
              normed_input_values.append(normed_slice)
      else:
          normed_input_values = [
              (x - x.mean()) / np.sqrt(x.var() + 1e-7)
              for x in input_values
          ]
  
      return normed_input_values
  
file_path: transformers/src/transformers/models/whisper/feature_extraction_whisper.py
imports: from typing import List, Optional, Union
  import numpy
  from ...None import is_torch_available
  from ...audio_utils import mel_filter_bank, spectrogram, window_function
  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.zero_mean_unit_var_norm(input_values, attention_mask, padding_value) and returns: normed_input_values