Shortcuts

Tacotron2TTSBundle.TextProcessor

class torchaudio.pipelines.Tacotron2TTSBundle.TextProcessor

Interface of the text processing part of Tacotron2TTS pipeline

See torchaudio.pipelines.Tacotron2TTSBundle.get_text_processor() for the usage.

tokens

abstract property TextProcessor.tokens

The tokens that the each value in the processed tensor represent.

Type:

List[str]

__call__

abstract TextProcessor.__call__(texts: Union[str, List[str]]) Tuple[Tensor, Tensor]

Encode the given (batch of) texts into numerical tensors

Parameters:

text (str or list of str) – The input texts.

Returns:

Tensor:

The encoded texts. Shape: (batch, max length)

Tensor:

The valid length of each sample in the batch. Shape: (batch, ).

Return type:

(Tensor, 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