def METHOD_NAME(self, y):
    if self.pad and y.shape[-1] < 14000:
        y = F.pad(y, (0, 14000 - y.shape[-1]))
    window = torch.hann_window(self.win_length).to(y)
    y = torch.stft(y, n_fft=self.embedder_params["n_fft"],
                   hop_length=self.hop_length,
                   win_length=self.win_length,
                   window=window)
    magnitudes = torch.norm(y, dim=-1, p=2) ** 2
    mel = torch.log10(self.mel_basis @ magnitudes + 1e-6)
    return mel