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