src/transformers/models/mctct/feature_extraction_mctct.py/MCTCTFeatureExtractor/_apply_preemphasis_inplace
class MCTCTFeatureExtractor:    def _apply_preemphasis_inplace(frames, window_length, preemphasis_coeff):
        if frames.size % window_length != 0:
            raise ValueError(
                f"`frames` is supposed to have length divisble by `window_length`, but is {frames.size} with"
                f" window_length={window_length}."
            )

        n_frames = frames.size // window_length
        for frame_idx in range(n_frames, 0, -1):
            start = (frame_idx - 1) * window_length
            end = frame_idx * window_length - 1
            frames[start + 1 : end + 1] -= preemphasis_coeff * frames[start:end]
            frames[start] *= 1 - preemphasis_coeff