class_docstr: Tacotron2 module for end-to-end text-to-speech.
  
  This is a module of Spectrogram prediction network in Tacotron2 described
  in `Natural TTS Synthesis by Conditioning WaveNet on Mel Spectrogram Predictions`_,
  which converts the sequence of characters into the sequence of Mel-filterbanks.
  
  .. _`Natural TTS Synthesis by Conditioning WaveNet on Mel Spectrogram Predictions`:
     https://arxiv.org/abs/1712.05884
class_docstr_tok: ["Tacotron2","module","for","end-to-end","text-to-speech",".","This","is","a","module","of","Spectrogram","prediction","network","in","Tacotron2","described","in","`","Natural","TTS","Synthesis","by","Conditioning","WaveNet","on","Mel","Spectrogram","Predictions","`","_",",","which","converts","the","sequence","of","characters","into","the","sequence","of","Mel-filterbanks",".","..","_","`","Natural","TTS","Synthesis","by","Conditioning","WaveNet","on","Mel","Spectrogram","Predictions","`",":","https",":","\/\/arxiv.org\/abs\/1712.05884"]
code: def _forward(
      self,
      xs: torch.Tensor,
      ilens: torch.Tensor,
      ys: torch.Tensor,
      olens: torch.Tensor,
      spembs: torch.Tensor,
      sids: torch.Tensor,
      lids: torch.Tensor,
  ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
      hs, hlens = self.enc(xs, ilens)
      if self.use_gst:
          style_embs = self.gst(ys)
          hs = hs + style_embs.unsqueeze(1)
      if self.spks is not None:
          sid_embs = self.sid_emb(sids.view(-1))
          hs = hs + sid_embs.unsqueeze(1)
      if self.langs is not None:
          lid_embs = self.lid_emb(lids.view(-1))
          hs = hs + lid_embs.unsqueeze(1)
      if self.spk_embed_dim is not None:
          hs = self._integrate_with_spk_embed(hs, spembs)
      return self.dec(hs, hlens, ys)
  
file_path: espnet/espnet2/tts/tacotron2/tacotron2.py
imports: import logging
  from typing import Dict, Optional, Sequence, Tuple
  import torch
  import torch.nn.functional
  from typeguard import check_argument_types
  from espnet2.torch_utils.device_funcs import force_gatherable
  from espnet2.tts.abs_tts import AbsTTS
  from espnet2.tts.gst.style_encoder import StyleEncoder
  from espnet.nets.pytorch_backend.e2e_tts_tacotron2 import GuidedAttentionLoss, Tacotron2Loss
  from espnet.nets.pytorch_backend.nets_utils import make_pad_mask
  from espnet.nets.pytorch_backend.rnn.attentions import AttForward, AttForwardTA, AttLoc
  from espnet.nets.pytorch_backend.tacotron2.decoder import Decoder
  from espnet.nets.pytorch_backend.tacotron2.encoder import Encoder
label_desc: Use image node_id 3 for calling the Tacotron2 obj's underlying member method code with example usage: obj._forward(xs, ilens, ys, olens, spembs, sids, lids) and returns: self