src/transformers/models/mctct/feature_extraction_mctct.py/MCTCTFeatureExtractor/_extract_mfsc_features
class MCTCTFeatureExtractor:    def _extract_mfsc_features(self, one_waveform: np.array) -> np.ndarray:
        """
        Extracts MFSC Features for one waveform vector (unbatched). Adapted from Flashlight's C++ MFSC code.
        """
        if self.win_function == "hamming_window":
            window = torch.hamming_window(window_length=self.sample_size, periodic=False, alpha=0.54, beta=0.46)
        else:
            window = getattr(torch, self.win_function)()

        window = window.numpy()

        fbanks = torchaudio.functional.melscale_fbanks(
            n_freqs=self.n_freqs,
            f_min=0.0,  # change this to zeros
            f_max=self.sampling_rate / 2.0,
            n_mels=self.feature_size,
            sample_rate=self.sampling_rate,
        )

        fbanks = fbanks.numpy()

        n_frames = self._num_frames_calc(one_waveform.size, self.sample_size, self.sample_stride)

        frames = self._frame_signal(
            one_waveform, n_frames, self.frame_signal_scale, self.sample_size, self.sample_stride
        )

        self._apply_preemphasis_inplace(frames, self.sample_size, self.preemphasis_coeff)

        frames = self._windowing(frames, self.sample_size, window)

        dft_out = self._dft(frames.flatten(), self.n_freqs, n_frames, self.sample_size, self.n_fft)

        # msfc_features = STFT * mel frequency banks.
        msfc_features = np.einsum("...tf,fm->...tm", dft_out, fbanks)

        # clamp feature values then log scale, as implemented in flashlight
        msfc_features = np.maximum(msfc_features, self.mel_floor)
        msfc_features = np.log(msfc_features)

        return msfc_features