class_docstr: Constructs a SeamlessM4T feature extractor.
  
  This feature extractor inherits from [`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.
  
  Args:
      feature_size (`int`, *optional*, defaults to 80):
          The feature dimension of the extracted features.
      sampling_rate (`int`, *optional*, defaults to 16000):
          The sampling rate at which the audio files should be digitalized expressed in hertz (Hz).
      num_mel_bins (`int`, *optional*, defaults to 80):
          Number of Mel-frequency bins.
      padding_value (`float`, *optional*, defaults to 0.0):
          The value that is used to fill the padding vectors.
      stride (`int`, *optional*, defaults to 2):
          Stride used to reshape audios from shape (batch_size,num_frames,num_mel_bins) to
          (batch_size,num_frames//stride,num_mel_bins*stride).
class_docstr_tok: ["Constructs","a","SeamlessM4T","feature","extractor",".","This","feature","extractor","inherits","from","[","`","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",".","Args",":","feature_size","(","`","int","`",",","*","optional","*",",","defaults","to","80",")",":","The","feature","dimension","of","the","extracted","features",".","sampling_rate","(","`","int","`",",","*","optional","*",",","defaults","to","16000",")",":","The","sampling","rate","at","which","the","audio","files","should","be","digitalized","expressed","in","hertz","(","Hz",")",".","num_mel_bins","(","`","int","`",",","*","optional","*",",","defaults","to","80",")",":","Number","of","Mel-frequency","bins",".","padding_value","(","`","float","`",",","*","optional","*",",","defaults","to","0.0",")",":","The","value","that","is","used","to","fill","the","padding","vectors",".","stride","(","`","int","`",",","*","optional","*",",","defaults","to","2",")",":","Stride","used","to","reshape","audios","from","shape","(","batch_size",",","num_frames",",","num_mel_bins",")","to","(","batch_size",",","num_frames\/\/stride",",","num_mel_bins","*","stride",")","."]
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/seamless_m4t/feature_extraction_seamless_m4t.py
imports: from typing import List, Optional, Union
  import numpy
  from ...utils 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 PaddingStrategy, TensorType, logging
label_desc: Use image node_id 2 for calling the SeamlessM4TFeatureExtractor 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