class_docstr: Encoder module of Spectrogram prediction network.
  
  This is a module of encoder of Spectrogram prediction network in Singing Tacotron,
  which described in `Singing-Tacotron: Global Duration Control Attention and Dynamic
  Filter for End-to-end Singing Voice Synthesis`_. This is the encoder which converts
  either a sequence of characters or acoustic features into the sequence of
  hidden states.
  
  .. _`Singing-Tacotron: Global Duration Control Attention and Dynamic
  Filter for End-to-end Singing Voice Synthesis`:
     https://arxiv.org/abs/2202.07907
class_docstr_tok: ["Encoder","module","of","Spectrogram","prediction","network",".","This","is","a","module","of","encoder","of","Spectrogram","prediction","network","in","Singing","Tacotron",",","which","described","in","`","Singing-Tacotron",":","Global","Duration","Control","Attention","and","Dynamic","Filter","for","End-to-end","Singing","Voice","Synthesis","`","_",".","This","is","the","encoder","which","converts","either","a","sequence","of","characters","or","acoustic","features","into","the","sequence","of","hidden","states",".","..","_","`","Singing-Tacotron",":","Global","Duration","Control","Attention","and","Dynamic","Filter","for","End-to-end","Singing","Voice","Synthesis","`",":","https",":","\/\/arxiv.org\/abs\/2202.07907"]
docstr: Inference.
  
  Args:
      x (Tensor): The sequeunce of character ids (T,)
              or acoustic feature (T, idim * encoder_reduction_factor).
  
  Returns:
      Tensor: The sequences of encoder states(T, eunits).
docstr_tok: ["Inference",".","Args",":","x","(","Tensor",")",":","The","sequeunce","of","character","ids","(","T",",",")","or","acoustic","feature","(","T",",","idim","*","encoder_reduction_factor",")",".","Returns",":","Tensor",":","The","sequences","of","encoder","states","(","T",",","eunits",")","."]
code: def inference(self, x, ilens):
      """Inference.
  
      Args:
          x (Tensor): The sequeunce of character ids (T,)
                  or acoustic feature (T, idim * encoder_reduction_factor).
  
      Returns:
          Tensor: The sequences of encoder states(T, eunits).
  
      """
  
      xs = x
  
      return self.forward(xs, ilens)[0][0]
  
file_path: espnet/espnet2/svs/singing_tacotron/encoder.py
imports: import torch
  from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
label_desc: Use image node_id 3 for calling the Encoder obj's underlying member method code with example usage: obj.inference(x, ilens) and returns: self