class_docstr: A ready-to-use inference wrapper for DiffWave as vocoder.
  The wrapper allows to perform generative tasks:
      locally-conditional generation: mel_spec -> waveform
  Arguments
  ---------
  hparams
      Hyperparameters (from HyperPyYAML)
class_docstr_tok: ["A","ready-to-use","inference","wrapper","for","DiffWave","as","vocoder",".","The","wrapper","allows","to","perform","generative","tasks",":","locally-conditional","generation",":","mel_spec","-",">","waveform","Arguments","--","--","--","--","-","hparams","Hyperparameters","(","from","HyperPyYAML",")"]
code: def __init__(self, *args, **kwargs):
      super().__init__(*args, **kwargs)
      if hasattr(self.hparams, "diffwave"):
          self.infer = self.hparams.diffusion.inference
      else:
          raise NotImplementedError
  
imports: import logging
  import torch
  from speechbrain.dataio.dataio import length_to_mask
  from speechbrain.inference.interfaces import Pretrained
label_desc: Use image node_id 1 to create a new DiffWaveVocoder object from inherited base classes: Pretrained with example: obj = DiffWaveVocoder()