- class torchaudio.pipelines.Tacotron2TTSBundle.Vocoder¶
Interface of the vocoder part of Tacotron2TTS pipeline
torchaudio.pipelines.Tacotron2TTSBundle.get_vocoder()for the usage.
- abstract Vocoder.__call__(specgrams: Tensor, lengths: Optional[Tensor] = None) Tuple[Tensor, Optional[Tensor]] ¶
Generate waveform from the given input, such as spectrogram
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)
The generated waveform. Shape: (batch, max length)
- Tensor or None:
The valid length of each sample in the batch. Shape: (batch, ).
- Return type: