class_docstr: UnivNet Generator
  
  Originally from https://github.com/mindslab-ai/univnet/blob/master/model/generator.py.
class_docstr_tok: ["UnivNet","Generator","Originally","from","https",":","\/\/github.com\/mindslab-ai\/univnet\/blob\/master\/model\/generator.py","."]
code: def inference(self, c, z=None):
      # pad input mel with zeros to cut artifact
      # see https://github.com/seungwonpark/melgan/issues/8
      zero = torch.full(
          (c.shape[0], self.mel_channel, 10), -11.5129
      ).to(c.device)
      mel = torch.cat((c, zero), dim=2)
  
      if z is None:
          z = torch.randn(c.shape[0], self.noise_dim, mel.size(2)).to(
              mel.device
          )
  
      audio = self.forward(mel, z)
      audio = audio[:, :, : -(self.hop_length * 10)]
      audio = audio.clamp(min=-1, max=1)
      return audio
  
imports: from dataclasses import dataclass
  from enum import Enum
  from typing import Callable, Optional
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.nn.utils.parametrize
label_desc: Use image node_id 5 for calling the UnivNetGenerator obj's underlying member method code with example usage: obj.inference(c, z) and returns: audio