class_docstr: Feed Forward Transformer for TTS a.k.a. FastSpeech.
  
  This is a module of FastSpeech,
  feed-forward Transformer with duration predictor described in
  `FastSpeech: Fast, Robust and Controllable Text to Speech`_,
  which does not require any auto-regressive
  processing during inference,
  resulting in fast decoding compared with auto-regressive Transformer.
  
  .. _`FastSpeech: Fast, Robust and Controllable Text to Speech`:
      https://arxiv.org/pdf/1905.09263.pdf
class_docstr_tok: ["Feed","Forward","Transformer","for","TTS","a.k.a",".","FastSpeech",".","This","is","a","module","of","FastSpeech",",","feed-forward","Transformer","with","duration","predictor","described","in","`","FastSpeech",":","Fast",",","Robust","and","Controllable","Text","to","Speech","`","_",",","which","does","not","require","any","auto-regressive","processing","during","inference",",","resulting","in","fast","decoding","compared","with","auto-regressive","Transformer",".","..","_","`","FastSpeech",":","Fast",",","Robust","and","Controllable","Text","to","Speech","`",":","https",":","\/\/arxiv.org\/pdf\/1905.09263.pdf"]
docstr: Generate the sequence of features given the sequences of characters.
  
  Args:
      x (Tensor): Input sequence of characters (T,).
      inference_args (Namespace): Dummy for compatibility.
      spemb (Tensor, optional): Speaker embedding vector (spk_embed_dim).
  
  Returns:
      Tensor: Output sequence of features (L, odim).
      None: Dummy for compatibility.
      None: Dummy for compatibility.
docstr_tok: ["Generate","the","sequence","of","features","given","the","sequences","of","characters",".","Args",":","x","(","Tensor",")",":","Input","sequence","of","characters","(","T",",",")",".","inference_args","(","Namespace",")",":","Dummy","for","compatibility",".","spemb","(","Tensor",",","optional",")",":","Speaker","embedding","vector","(","spk_embed_dim",")",".","Returns",":","Tensor",":","Output","sequence","of","features","(","L",",","odim",")",".","None",":","Dummy","for","compatibility",".","None",":","Dummy","for","compatibility","."]
code: def inference(self, x, inference_args, spemb=None, *args, **kwargs):
      """Generate the sequence of features given the sequences of characters.
  
      Args:
          x (Tensor): Input sequence of characters (T,).
          inference_args (Namespace): Dummy for compatibility.
          spemb (Tensor, optional): Speaker embedding vector (spk_embed_dim).
  
      Returns:
          Tensor: Output sequence of features (L, odim).
          None: Dummy for compatibility.
          None: Dummy for compatibility.
  
      """
      # setup batch axis
      ilens = torch.tensor(
          [x.shape[0]], dtype=torch.long, device=x.device
      )
      xs = x.unsqueeze(0)
      if spemb is not None:
          spembs = spemb.unsqueeze(0)
      else:
          spembs = None
  
      # get option
      alpha = getattr(inference_args, "fastspeech_alpha", 1.0)
  
      # inference
      _, outs, _ = self._forward(
          xs,
          ilens,
          spembs=spembs,
          is_inference=True,
          alpha=alpha,
      )  # (1, L, odim)
  
      return outs[0], None, None
  
imports: import logging
  import torch
  import torch.nn.functional
  from espnet.asr.asr_utils import get_model_conf, torch_load
  from espnet.nets.pytorch_backend.fastspeech.duration_calculator import DurationCalculator
  from espnet.nets.pytorch_backend.fastspeech.duration_predictor import DurationPredictor, DurationPredictorLoss
  from espnet.nets.pytorch_backend.fastspeech.length_regulator import LengthRegulator
  from espnet.nets.pytorch_backend.nets_utils import make_non_pad_mask, make_pad_mask
  from espnet.nets.pytorch_backend.tacotron2.decoder import Postnet
  from espnet.nets.pytorch_backend.transformer.attention import MultiHeadedAttention
  from espnet.nets.pytorch_backend.transformer.embedding import PositionalEncoding, ScaledPositionalEncoding
  from espnet.nets.pytorch_backend.transformer.encoder import Encoder
  from espnet.nets.pytorch_backend.transformer.initializer import initialize
  from espnet.nets.tts_interface import TTSInterface
  from espnet.utils.cli_utils import strtobool
  from espnet.utils.fill_missing_args import fill_missing_args
label_desc: Use image node_id 6 for calling the FeedForwardTransformer obj's underlying member method code with example usage: obj.inference(x, inference_args, spemb) and returns: outs,  None,  None