code: def get_mel(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
  
file_path: fairseq/examples/speech_synthesis/preprocessing/speaker_embedder/__init__.py
imports: import librosa
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.utils.data
  import torchaudio
label_desc: Use image node_id 2 for calling the SpkrEmbedder obj's underlying member method code with example usage: obj.get_mel(y) and returns: mel