src/transformers/models/speecht5/feature_extraction_speecht5.py/SpeechT5FeatureExtractor/_extract_fbank_features
class SpeechT5FeatureExtractor:    def _extract_fbank_features(
        self,
        one_waveform: np.ndarray,
    ) -> np.ndarray:
        """
        Extracts log-mel filterbank features for one waveform vector (unbatched). Adapted from Flashlight's C++ MFSC
        code and librosa.
        """
        one_waveform = self._center_pad(one_waveform, self.n_fft, "reflect")

        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
        )

        window = getattr(torch, self.win_function)(window_length=self.sample_size, periodic=True)
        window = window.numpy()

        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)

        fbanks = torchaudio.functional.melscale_fbanks(
            n_freqs=self.n_freqs,
            f_min=self.fmin,
            f_max=self.fmax,
            n_mels=self.num_mel_bins,
            sample_rate=self.sampling_rate,
            norm="slaney",
            mel_scale="slaney",
        )
        fbanks = fbanks.numpy()

        return np.log10(np.maximum(self.mel_floor, np.dot(dft_out, fbanks)))