class_docstr: WaveRNN Dataset searchs for all the wav files under root path
  and converts them to acoustic features on the fly.
code: def collate(self, batch):
      mel_win = self.seq_len // self.hop_len + 2 * self.pad
      max_offsets = [
          x[0].shape[-1] - (mel_win + 2 * self.pad) for x in batch
      ]
  
      mel_offsets = [
          np.random.randint(0, offset) for offset in max_offsets
      ]
      sig_offsets = [
          (offset + self.pad) * self.hop_len for offset in mel_offsets
      ]
  
      mels = [
          x[0][:, mel_offsets[i] : mel_offsets[i] + mel_win]
          for i, x in enumerate(batch)
      ]
  
      coarse = [
          x[1][sig_offsets[i] : sig_offsets[i] + self.seq_len + 1]
          for i, x in enumerate(batch)
      ]
  
      mels = np.stack(mels).astype(np.float32)
      if self.mode in ["gauss", "mold"]:
          coarse = np.stack(coarse).astype(np.float32)
          coarse = torch.FloatTensor(coarse)
          x_input = coarse[:, : self.seq_len]
      elif isinstance(self.mode, int):
          coarse = np.stack(coarse).astype(np.int64)
          coarse = torch.LongTensor(coarse)
          x_input = (
              2
              * coarse[:, : self.seq_len].float()
              / (2**self.mode - 1.0)
              - 1.0
          )
      y_coarse = coarse[:, 1:]
      mels = torch.FloatTensor(mels)
      return x_input, mels, y_coarse
  
file_path: TTS/TTS/vocoder/datasets/wavernn_dataset.py
imports: import torch
  import numpy
  from torch.utils.data import Dataset
label_desc: Use image node_id 5 for calling the WaveRNNDataset obj's underlying member method code with example usage: obj.collate(batch) and returns: x_input,  mels,  y_coarse