Shortcuts

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

abstract property Vocoder.sample_rate

The sample rate of the resulting waveform

Type:

float

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])

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources