class_docstr: Data class that bundles associated information to use pretrained Tacotron2 and vocoder.
  
  This class provides interfaces for instantiating the pretrained model along with
  the information necessary to retrieve pretrained weights and additional data
  to be used with the model.
  
  Torchaudio library instantiates objects of this class, each of which represents
  a different pretrained model. Client code should access pretrained models via these
  instances.
  
  Please see below for the usage and the available values.
  
  Example - Character-based TTS pipeline with Tacotron2 and WaveRNN
      >>> import torchaudio
      >>>
      >>> text = "Hello, T T S !"
      >>> bundle = torchaudio.pipelines.TACOTRON2_WAVERNN_CHAR_LJSPEECH
      >>>
      >>> # Build processor, Tacotron2 and WaveRNN model
      >>> processor = bundle.get_text_processor()
      >>> tacotron2 = bundle.get_tacotron2()
      Downloading:
      100%|███████████████████████████████| 107M/107M [00:01<00:00, 87.9MB/s]
      >>> vocoder = bundle.get_vocoder()
      Downloading:
      100%|███████████████████████████████| 16.7M/16.7M [00:00<00:00, 78.1MB/s]
      >>>
      >>> # Encode text
      >>> input, lengths = processor(text)
      >>>
      >>> # Generate (mel-scale) spectrogram
      >>> specgram, lengths, _ = tacotron2.infer(input, lengths)
      >>>
      >>> # Convert spectrogram to waveform
      >>> waveforms, lengths = vocoder(specgram, lengths)
      >>>
      >>> torchaudio.save('hello-tts.wav', waveforms, vocoder.sample_rate)
  
  Example - Phoneme-based TTS pipeline with Tacotron2 and WaveRNN
      >>>
      >>> # Note:
      >>> #     This bundle uses pre-trained DeepPhonemizer as
      >>> #     the text pre-processor.
      >>> #     Please install deep-phonemizer.
      >>> #     See https://github.com/as-ideas/DeepPhonemizer
      >>> #     The pretrained weight is automatically downloaded.
      >>>
      >>> import torchaudio
      >>>
      >>> text = "Hello, TTS!"
      >>> bundle = torchaudio.pipelines.TACOTRON2_WAVERNN_PHONE_LJSPEECH
      >>>
      >>> # Build processor, Tacotron2 and WaveRNN model
      >>> processor = bundle.get_text_processor()
      Downloading:
      100%|███████████████████████████████| 63.6M/63.6M [00:04<00:00, 15.3MB/s]
      >>> tacotron2 = bundle.get_tacotron2()
      Downloading:
      100%|███████████████████████████████| 107M/107M [00:01<00:00, 87.9MB/s]
      >>> vocoder = bundle.get_vocoder()
      Downloading:
      100%|███████████████████████████████| 16.7M/16.7M [00:00<00:00, 78.1MB/s]
      >>>
      >>> # Encode text
      >>> input, lengths = processor(text)
      >>>
      >>> # Generate (mel-scale) spectrogram
      >>> specgram, lengths, _ = tacotron2.infer(input, lengths)
      >>>
      >>> # Convert spectrogram to waveform
      >>> waveforms, lengths = vocoder(specgram, lengths)
      >>>
      >>> torchaudio.save('hello-tts.wav', waveforms, vocoder.sample_rate)
class_docstr_tok: ["Data","class","that","bundles","associated","information","to","use","pretrained","Tacotron2","and","vocoder",".","This","class","provides","interfaces","for","instantiating","the","pretrained","model","along","with","the","information","necessary","to","retrieve","pretrained","weights","and","additional","data","to","be","used","with","the","model",".","Torchaudio","library","instantiates","objects","of","this","class",",","each","of","which","represents","a","different","pretrained","model",".","Client","code","should","access","pretrained","models","via","these","instances",".","Please","see","below","for","the","usage","and","the","available","values",".","Example","-","Character-based","TTS","pipeline","with","Tacotron2","and","WaveRNN",">",">",">","import","torchaudio",">",">",">",">",">",">","text","=","``","Hello",",","T","T","S","!","''",">",">",">","bundle","=","torchaudio.pipelines.TACOTRON2_WAVERNN_CHAR_LJSPEECH",">",">",">",">",">",">","#","Build","processor",",","Tacotron2","and","WaveRNN","model",">",">",">","processor","=","bundle.get_text_processor","(",")",">",">",">","tacotron2","=","bundle.get_tacotron2","(",")","Downloading",":","100","%","|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588|","107M\/107M","[","00:01","<","00:00",",","87.9MB\/s","]",">",">",">","vocoder","=","bundle.get_vocoder","(",")","Downloading",":","100","%","|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588|","16.7M\/16.7M","[","00:00","<","00:00",",","78.1MB\/s","]",">",">",">",">",">",">","#","Encode","text",">",">",">","input",",","lengths","=","processor","(","text",")",">",">",">",">",">",">","#","Generate","(","mel-scale",")","spectrogram",">",">",">","specgram",",","lengths",",","_","=","tacotron2.infer","(","input",",","lengths",")",">",">",">",">",">",">","#","Convert","spectrogram","to","waveform",">",">",">","waveforms",",","lengths","=","vocoder","(","specgram",",","lengths",")",">",">",">",">",">",">","torchaudio.save","(","'hello-tts.wav","'",",","waveforms",",","vocoder.sample_rate",")","Example","-","Phoneme-based","TTS","pipeline","with","Tacotron2","and","WaveRNN",">",">",">",">",">",">","#","Note",":",">",">",">","#","This","bundle","uses","pre-trained","DeepPhonemizer","as",">",">",">","#","the","text","pre-processor",".",">",">",">","#","Please","install","deep-phonemizer",".",">",">",">","#","See","https",":","\/\/github.com\/as-ideas\/DeepPhonemizer",">",">",">","#","The","pretrained","weight","is","automatically","downloaded",".",">",">",">",">",">",">","import","torchaudio",">",">",">",">",">",">","text","=","``","Hello",",","TTS","!","''",">",">",">","bundle","=","torchaudio.pipelines.TACOTRON2_WAVERNN_PHONE_LJSPEECH",">",">",">",">",">",">","#","Build","processor",",","Tacotron2","and","WaveRNN","model",">",">",">","processor","=","bundle.get_text_processor","(",")","Downloading",":","100","%","|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588|","63.6M\/63.6M","[","00:04","<","00:00",",","15.3MB\/s","]",">",">",">","tacotron2","=","bundle.get_tacotron2","(",")","Downloading",":","100","%","|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588|","107M\/107M","[","00:01","<","00:00",",","87.9MB\/s","]",">",">",">","vocoder","=","bundle.get_vocoder","(",")","Downloading",":","100","%","|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588|","16.7M\/16.7M","[","00:00","<","00:00",",","78.1MB\/s","]",">",">",">",">",">",">","#","Encode","text",">",">",">","input",",","lengths","=","processor","(","text",")",">",">",">",">",">",">","#","Generate","(","mel-scale",")","spectrogram",">",">",">","specgram",",","lengths",",","_","=","tacotron2.infer","(","input",",","lengths",")",">",">",">",">",">",">","#","Convert","spectrogram","to","waveform",">",">",">","waveforms",",","lengths","=","vocoder","(","specgram",",","lengths",")",">",">",">",">",">",">","torchaudio.save","(","'hello-tts.wav","'",",","waveforms",",","vocoder.sample_rate",")"]
docstr: Create a Tacotron2 model with pre-trained weight.
  
  Args:
      dl_kwargs (dictionary of keyword arguments):
          Passed to :func:`torch.hub.load_state_dict_from_url`.
  
  Returns:
      Tacotron2:
          The resulting model.
docstr_tok: ["Create","a","Tacotron2","model","with","pre-trained","weight",".","Args",":","dl_kwargs","(","dictionary","of","keyword","arguments",")",":","Passed","to",":","func",":","`","torch.hub.load_state_dict_from_url","`",".","Returns",":","Tacotron2",":","The","resulting","model","."]
code: def get_tacotron2(self, *, dl_kwargs=None) -> Tacotron2:
      """Create a Tacotron2 model with pre-trained weight.
  
      Args:
          dl_kwargs (dictionary of keyword arguments):
              Passed to :func:`torch.hub.load_state_dict_from_url`.
  
      Returns:
          Tacotron2:
              The resulting model.
      """
  
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 3 for calling the Tacotron2TTSBundle obj's underlying member method code with example usage: obj.get_tacotron2() without return types