docstr: Encoder to extract prosody from utterance. it is made up of a reference encoder
  with a couple of linear layers and style token layer with dropout.
  
  Args:
      num_mels (int): Number of mel frames to produce.
      ref_enc_filters (list[int]): List of channel sizes for ref encoder layers.
      ref_enc_size (int): Size of the kernel for the ref encoder conv layers.
      ref_enc_strides (List[int]): List of strides to use for teh ref encoder conv layers.
      ref_enc_gru_size (int): Number of hidden features for the gated recurrent unit.
      dropout (float): Probability of dropout.
      n_hidden (int): Size of hidden layers.
      bottleneck_size_u (int): Size of the bottle neck layer.
  
  Inputs: inputs, mask
      - **inputs** (batch, dim, time): Tensor containing mel vector
      - **lengths** (batch): Tensor containing the mel lengths.
  Returns:
      - **outputs** (batch, 1, dim): Tensor produced by Utterance Level Prosody Encoder.
docstr_tok: ["Encoder","to","extract","prosody","from","utterance",".","it","is","made","up","of","a","reference","encoder","with","a","couple","of","linear","layers","and","style","token","layer","with","dropout",".","Args",":","num_mels","(","int",")",":","Number","of","mel","frames","to","produce",".","ref_enc_filters","(","list","[","int","]",")",":","List","of","channel","sizes","for","ref","encoder","layers",".","ref_enc_size","(","int",")",":","Size","of","the","kernel","for","the","ref","encoder","conv","layers",".","ref_enc_strides","(","List","[","int","]",")",":","List","of","strides","to","use","for","teh","ref","encoder","conv","layers",".","ref_enc_gru_size","(","int",")",":","Number","of","hidden","features","for","the","gated","recurrent","unit",".","dropout","(","float",")",":","Probability","of","dropout",".","n_hidden","(","int",")",":","Size","of","hidden","layers",".","bottleneck_size_u","(","int",")",":","Size","of","the","bottle","neck","layer",".","Inputs",":","inputs",",","mask","-","*","*","inputs","*","*","(","batch",",","dim",",","time",")",":","Tensor","containing","mel","vector","-","*","*","lengths","*","*","(","batch",")",":","Tensor","containing","the","mel","lengths",".","Returns",":","-","*","*","outputs","*","*","(","batch",",","1",",","dim",")",":","Tensor","produced","by","Utterance","Level","Prosody","Encoder","."]
code: def __init__(
      self,
      num_mels: int,
      ref_enc_filters: List[Union[int, int, int, int, int, int]],
      ref_enc_size: int,
      ref_enc_strides: List[Union[int, int, int, int, int]],
      ref_enc_gru_size: int,
      dropout: float,
      n_hidden: int,
      bottleneck_size_u: int,
      token_num: int,
  ):
      """
      Encoder to extract prosody from utterance. it is made up of a reference encoder
      with a couple of linear layers and style token layer with dropout.
  
      Args:
          num_mels (int): Number of mel frames to produce.
          ref_enc_filters (list[int]): List of channel sizes for ref encoder layers.
          ref_enc_size (int): Size of the kernel for the ref encoder conv layers.
          ref_enc_strides (List[int]): List of strides to use for teh ref encoder conv layers.
          ref_enc_gru_size (int): Number of hidden features for the gated recurrent unit.
          dropout (float): Probability of dropout.
          n_hidden (int): Size of hidden layers.
          bottleneck_size_u (int): Size of the bottle neck layer.
  
      Inputs: inputs, mask
          - **inputs** (batch, dim, time): Tensor containing mel vector
          - **lengths** (batch): Tensor containing the mel lengths.
      Returns:
          - **outputs** (batch, 1, dim): Tensor produced by Utterance Level Prosody Encoder.
      """
      super().__init__()
  
      self.E = n_hidden
      self.d_q = self.d_k = n_hidden
      bottleneck_size = bottleneck_size_u
  
      self.encoder = ReferenceEncoder(
          ref_enc_filters=ref_enc_filters,
          ref_enc_gru_size=ref_enc_gru_size,
          ref_enc_size=ref_enc_size,
          ref_enc_strides=ref_enc_strides,
          num_mels=num_mels,
      )
      self.encoder_prj = nn.Linear(ref_enc_gru_size, self.E // 2)
      self.stl = STL(n_hidden=n_hidden, token_num=token_num)
      self.encoder_bottleneck = nn.Linear(self.E, bottleneck_size)
      self.dropout = nn.Dropout(dropout)
  
imports: from typing import List, Tuple, Union
  import torch
  import torch.nn
  import torch.nn.functional
  from TTS.tts.layers.delightful_tts.conformer import ConformerMultiHeadedSelfAttention
  from TTS.tts.layers.delightful_tts.conv_layers import CoordConv1d
  from TTS.tts.layers.delightful_tts.networks import STL
label_desc: Use image node_id 1 to create a new UtteranceLevelProsodyEncoder object from inherited base classes: nn with example: obj = UtteranceLevelProsodyEncoder(num_mels, ref_enc_filters, ref_enc_size, ref_enc_strides, ref_enc_gru_size, dropout, n_hidden, bottleneck_size_u, token_num)