docstr: Generate waveform from the given input, such as spectrogram
  
  Args:
      specgrams (Tensor):
          The input spectrogram. Shape: `(batch, frequency bins, time)`.
          The expected shape depends on the implementation.
      lengths (Tensor, or None, optional):
          The valid length of each sample in the batch. Shape: `(batch, )`.
          (Default: `None`)
  
  Returns:
      (Tensor, Optional[Tensor]):
      Tensor:
          The generated waveform. Shape: `(batch, max length)`
      Tensor or None:
          The valid length of each sample in the batch. Shape: `(batch, )`.
docstr_tok: ["Generate","waveform","from","the","given","input",",","such","as","spectrogram","Args",":","specgrams","(","Tensor",")",":","The","input","spectrogram",".","Shape",":","`","(","batch",",","frequency","bins",",","time",")","`",".","The","expected","shape","depends","on","the","implementation",".","lengths","(","Tensor",",","or","None",",","optional",")",":","The","valid","length","of","each","sample","in","the","batch",".","Shape",":","`","(","batch",",",")","`",".","(","Default",":","`","None","`",")","Returns",":","(","Tensor",",","Optional","[","Tensor","]",")",":","Tensor",":","The","generated","waveform",".","Shape",":","`","(","batch",",","max","length",")","`","Tensor","or","None",":","The","valid","length","of","each","sample","in","the","batch",".","Shape",":","`","(","batch",",",")","`","."]
code: def __call__(
      self, specgrams: Tensor, lengths: Optional[Tensor] = None
  ) -> Tuple[Tensor, Optional[Tensor]]:
      """Generate waveform from the given input, such as spectrogram
  
      Args:
          specgrams (Tensor):
              The input spectrogram. Shape: `(batch, frequency bins, time)`.
              The expected shape depends on the implementation.
          lengths (Tensor, or None, optional):
              The valid length of each sample in the batch. Shape: `(batch, )`.
              (Default: `None`)
  
      Returns:
          (Tensor, Optional[Tensor]):
          Tensor:
              The generated waveform. Shape: `(batch, max length)`
          Tensor or None:
              The valid length of each sample in the batch. Shape: `(batch, )`.
      """
  
file_path: audio/src/torchaudio/pipelines/_tts/interface.py
imports: from abc import ABC, abstractmethod
  from typing import List, Optional, Tuple, Union
  from torch import Tensor
  from torchaudio.models import Tacotron2
label_desc: Use image node_id 2 for calling the _Vocoder obj's underlying member method code with example usage: obj.__call__(specgrams, lengths) without return types