docstr: Computes mel-spectrograms from a batch of waves
  PARAMS
  ------
  y: Variable(torch.FloatTensor) with shape (B, T) in range [-1, 1]
  
  RETURNS
  -------
  mel_output: torch.FloatTensor of shape (B, n_mel_channels, T)
docstr_tok: ["Computes","mel-spectrograms","from","a","batch","of","waves","PARAMS","--","--","--","y",":","Variable","(","torch.FloatTensor",")","with","shape","(","B",",","T",")","in","range","[","-1",",","1","]","RETURNS","--","--","--","-","mel_output",":","torch.FloatTensor","of","shape","(","B",",","n_mel_channels",",","T",")"]
code: def mel_spectrogram(self, y):
      """Computes mel-spectrograms from a batch of waves
      PARAMS
      ------
      y: Variable(torch.FloatTensor) with shape (B, T) in range [-1, 1]
  
      RETURNS
      -------
      mel_output: torch.FloatTensor of shape (B, n_mel_channels, T)
      """
      assert torch.min(y.data) >= -1
      assert torch.max(y.data) <= 1
  
      magnitudes, phases = self.stft_fn.transform(y)
      magnitudes = magnitudes.data
      mel_output = torch.matmul(self.mel_basis, magnitudes)
      mel_output = self.spectral_normalize(mel_output)
      return mel_output
  
imports: import torch
  from librosa.filters import mel
  from .audio_processing import dynamic_range_compression
  from .audio_processing import dynamic_range_decompression
  from .stft import STFT
  from .utils import get_mask_from_lengths
label_desc: Use image node_id 4 for calling the TacotronSTFT obj's underlying member method code with example usage: obj.mel_spectrogram(y) and returns: mel_output