class_docstr: TTranslatotron Synthesizer related modules for speech-to-speech translation.
  
  This is a module of Spectrogram prediction network in Translatotron described
  in `Direct speech-to-speech translation with a sequence-to-sequence model`_,
  which converts the sequence of hidden states into the sequence of Mel-filterbanks.
  
  .. _`Direct speech-to-speech translation with a sequence-to-sequence model`:
     https://arxiv.org/pdf/1904.06037.pdf
class_docstr_tok: ["TTranslatotron","Synthesizer","related","modules","for","speech-to-speech","translation",".","This","is","a","module","of","Spectrogram","prediction","network","in","Translatotron","described","in","`","Direct","speech-to-speech","translation","with","a","sequence-to-sequence","model","`","_",",","which","converts","the","sequence","of","hidden","states","into","the","sequence","of","Mel-filterbanks",".","..","_","`","Direct","speech-to-speech","translation","with","a","sequence-to-sequence","model","`",":","https",":","\/\/arxiv.org\/pdf\/1904.06037.pdf"]
code: def _forward(
      self,
      hs: torch.Tensor,
      hlens: torch.Tensor,
      ys: torch.Tensor,
      olens: torch.Tensor,
      spembs: torch.Tensor,
      sids: torch.Tensor,
      lids: torch.Tensor,
  ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
      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/s2st/synthesizer/translatotron.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.s2st.synthesizer.abs_synthesizer import AbsSynthesizer
  from espnet2.torch_utils.device_funcs import force_gatherable
  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, AttMultiHeadAdd
  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 Translatotron obj's underlying member method code with example usage: obj._forward(hs, hlens, ys, olens, spembs, sids, lids) and returns: self