class_docstr: Constructs a M-CTC-T 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
  code has been adapted from Flashlight's C++ code. For more information about the implementation, one can refer to
  this [notebook](https://colab.research.google.com/drive/1GLtINkkhzms-IsdcGy_-tVCkv0qNF-Gt#scrollTo=pMCRGMmUC_an)
  that takes the user step-by-step in the implementation.
  
  Args:
      feature_size (`int`, defaults to 80):
          The feature dimension of the extracted features. This is the number of mel_frequency
      sampling_rate (`int`, defaults to 16000):
          The sampling rate at which the audio files should be digitalized expressed in hertz (Hz).
      padding_value (`float`, defaults to 0.0):
          The value that is used to fill the padding values.
      hop_length (`int`, defaults to 10):
          Number of audio samples between windows. Otherwise referred to as "shift" in many papers.
      win_length (`int`, defaults to 25):
          Number of ms per window
      win_function (`str`, defaults to `"hamming_window"`):
          Name for the window function used for windowing, must be accessible via `torch.{win_function}`
      frame_signal_scale (`float`, defaults to 32768.0):
          Constant multiplied in creating the frames before applying DFT.
      preemphasis_coeff (`float`, defaults to 0.97):
          Constant multiplied in applying Pre-emphasis before DFT.
      mel_floor (`float` defaults to 1.0):
          Minimum value of mel frequency banks.
      normalize_means (`bool`, *optional*, defaults to `True`):
          Whether or not to zero-mean normalize the extracted features.
      normalize_vars (`bool`, *optional*, defaults to `True`):
          Whether or not to unit-variance normalize the extracted features.
class_docstr_tok: ["Constructs","a","M-CTC-T","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","code","has","been","adapted","from","Flashlight","'s","C++","code",".","For","more","information","about","the","implementation",",","one","can","refer","to","this","[","notebook","]","(","https",":","\/\/colab.research.google.com\/drive\/1GLtINkkhzms-IsdcGy_-tVCkv0qNF-Gt","#","scrollTo=pMCRGMmUC_an",")","that","takes","the","user","step-by-step","in","the","implementation",".","Args",":","feature_size","(","`","int","`",",","defaults","to","80",")",":","The","feature","dimension","of","the","extracted","features",".","This","is","the","number","of","mel_frequency","sampling_rate","(","`","int","`",",","defaults","to","16000",")",":","The","sampling","rate","at","which","the","audio","files","should","be","digitalized","expressed","in","hertz","(","Hz",")",".","padding_value","(","`","float","`",",","defaults","to","0.0",")",":","The","value","that","is","used","to","fill","the","padding","values",".","hop_length","(","`","int","`",",","defaults","to","10",")",":","Number","of","audio","samples","between","windows",".","Otherwise","referred","to","as","``","shift","''","in","many","papers",".","win_length","(","`","int","`",",","defaults","to","25",")",":","Number","of","ms","per","window","win_function","(","`","str","`",",","defaults","to","`","``","hamming_window","''","`",")",":","Name","for","the","window","function","used","for","windowing",",","must","be","accessible","via","`","torch",".","{","win_function","}","`","frame_signal_scale","(","`","float","`",",","defaults","to","32768.0",")",":","Constant","multiplied","in","creating","the","frames","before","applying","DFT",".","preemphasis_coeff","(","`","float","`",",","defaults","to","0.97",")",":","Constant","multiplied","in","applying","Pre-emphasis","before","DFT",".","mel_floor","(","`","float","`","defaults","to","1.0",")",":","Minimum","value","of","mel","frequency","banks",".","normalize_means","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","or","not","to","zero-mean","normalize","the","extracted","features",".","normalize_vars","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","or","not","to","unit-variance","normalize","the","extracted","features","."]
code: def __init__(
      self,
      feature_size=80,
      sampling_rate=16000,
      padding_value=0.0,
      hop_length=10,
      win_length=25,
      win_function="hamming_window",
      frame_signal_scale=32768.0,
      preemphasis_coeff=0.97,
      mel_floor=1.0,
      normalize_means=True,
      normalize_vars=True,
      return_attention_mask=False,
      **kwargs,
  ):
      super().__init__(
          feature_size=feature_size,
          sampling_rate=sampling_rate,
          padding_value=padding_value,
          **kwargs,
      )
  
      self.feature_size = feature_size
      self.sampling_rate = sampling_rate
      self.padding_value = padding_value
      self.hop_length = hop_length
      self.win_length = win_length
      self.frame_signal_scale = frame_signal_scale
      self.preemphasis_coeff = preemphasis_coeff
      self.mel_floor = mel_floor
      self.normalize_means = normalize_means
      self.normalize_vars = normalize_vars
      self.win_function = win_function
      self.return_attention_mask = return_attention_mask
  
      self.sample_size = win_length * sampling_rate // 1000
      self.sample_stride = hop_length * sampling_rate // 1000
  
      self.n_fft = optimal_fft_length(self.sample_size)
      self.n_freqs = (self.n_fft // 2) + 1
  
file_path: transformers/src/transformers/models/deprecated/mctct/feature_extraction_mctct.py
imports: from typing import List, Optional, Union
  import numpy
  from ....audio_utils import mel_filter_bank, optimal_fft_length, spectrogram, window_function
  from ....feature_extraction_sequence_utils import SequenceFeatureExtractor
  from ....feature_extraction_utils import BatchFeature
  from ....file_utils import PaddingStrategy, TensorType
  from ....utils import logging
label_desc: Use image node_id 1 to create a new MCTCTFeatureExtractor object from inherited base classes: SequenceFeatureExtractor with example: obj = MCTCTFeatureExtractor(feature_size, sampling_rate, padding_value, hop_length, win_length, win_function, frame_signal_scale, preemphasis_coeff, mel_floor, normalize_means, normalize_vars, return_attention_mask)