class_docstr: WaveGrad Dataset searchs for all the wav files under root path
  and converts them to acoustic features on the fly and returns
  random segments of (audio, feature) couples.
class_docstr_tok: ["WaveGrad","Dataset","searchs","for","all","the","wav","files","under","root","path","and","converts","them","to","acoustic","features","on","the","fly","and","returns","random","segments","of","(","audio",",","feature",")","couples","."]
code: def __init__(
      self,
      ap,
      items,
      seq_len,
      hop_len,
      pad_short,
      conv_pad=2,
      is_training=True,
      return_segments=True,
      use_noise_augment=False,
      use_cache=False,
      verbose=False,
  ):
      self.ap = ap
      self.item_list = items
      self.seq_len = seq_len if return_segments else None
      self.hop_len = hop_len
      self.pad_short = pad_short
      self.conv_pad = conv_pad
      self.is_training = is_training
      self.return_segments = return_segments
      self.use_cache = use_cache
      self.use_noise_augment = use_noise_augment
      self.verbose = verbose
  
      if return_segments:
          assert (
              seq_len % hop_len == 0
          ), " [!] seq_len has to be a multiple of hop_len."
      self.feat_frame_len = seq_len // hop_len + (2 * conv_pad)
  
      # cache acoustic features
      if use_cache:
          self.create_feature_cache()
  
file_path: TTS/TTS/vocoder/datasets/wavegrad_dataset.py
imports: import os
  import glob
  import torch
  import random
  import numpy
  from torch.utils.data import Dataset
  from multiprocessing import Manager
label_desc: Use image node_id 1 to create a new WaveGradDataset object from inherited base classes: Dataset with example: obj = WaveGradDataset(ap, items, seq_len, hop_len, pad_short, conv_pad, is_training, return_segments, use_noise_augment, use_cache, verbose)