def METHOD_NAME(
    self,
    audio: torch.Tensor,
    ilens: torch.Tensor = None,
) -> torch.Tensor:
    """Use log-mel spectrogram computation native to Whisper training"""
    window = torch.hann_window(self.win_length).to(audio.device)
    stft = torch.stft(
        audio, self.n_fft, self.hop_length, window=window, return_complex=True
    )
    # whisper deletes the last frame by default (Shih-Lun)
    magnitudes = stft[..., :-1].abs() ** 2
    filters = self.mel_filters(audio.device, self.n_mels)
    mel_spec = filters @ magnitudes
    log_spec = torch.clamp(mel_spec, min=1e-10).log10()
    if ilens is not None:
        olens = ilens // self.hop_length
    else:
        olens = None
    log_spec = torch.maximum(
        log_spec,
        log_spec.view(audio.size(0), -1).max(dim=-1)[0][:, None, None] - 8.0,
    )
    log_spec = (log_spec + 4.0) / 4.0
    return log_spec, olens