class_docstr: FastPitch based model that can synthesize mel spectrograms from content and speaker embeddings
  obtained from SSLDisentangler. This model can be used for voice conversion by swapping the speaker embedding 
  of a given source utterance, with the speaker embedding of a target speaker.
class_docstr_tok: ["FastPitch","based","model","that","can","synthesize","mel","spectrograms","from","content","and","speaker","embeddings","obtained","from","SSLDisentangler",".","This","model","can","be","used","for","voice","conversion","by","swapping","the","speaker","embedding","of","a","given","source","utterance",",","with","the","speaker","embedding","of","a","target","speaker","."]
code: def compute_encoding(
      self, content_embedding, speaker_embedding, dataset_id=None
  ):
      # content embedding is (B, C, T)
      # speaker embedding is (B, C)
      # pitch_contour is (B, T)
      content_embedding = content_embedding.permute(
          0, 2, 1
      )  # (B, C, T) -> (B, T, C)
      content_embedding_projected = self.content_projection_layer(
          content_embedding
      )
      content_embedding_projected = content_embedding_projected.permute(
          0, 2, 1
      )  # (B, T, C) -> (B, C, T)
      speaker_embedding_projected = self.speaker_projection_layer(
          speaker_embedding
      )
      speaker_embedding_repeated = speaker_embedding_projected[
          :, :, None
      ].repeat(1, 1, content_embedding_projected.shape[2])
  
      encoded = torch.cat(
          [content_embedding_projected, speaker_embedding_repeated],
          dim=1,
      )
  
      encoded = encoded.permute(0, 2, 1)  # (B, C, T) -> (B, T, C)
  
      if self.num_datasets > 1:
          dataset_embedding = self.dataset_embedding_layer(
              dataset_id
          )  # (B, C)
          dataset_embedding_repeated = dataset_embedding[
              :, None, :
          ].repeat(1, encoded.shape[1], 1)
          encoded = encoded + dataset_embedding_repeated
  
      return encoded
  
imports: import random
  from typing import Iterable
  import torch
  from hydra.utils import instantiate
  from omegaconf import DictConfig
  from pytorch_lightning import Trainer
  from pytorch_lightning.loggers import TensorBoardLogger
  from nemo.collections.tts.losses.fastpitchloss import DurationLoss, MelLoss, PitchLoss
  from nemo.collections.tts.modules.fastpitch import FastPitchSSLModule, average_features
  from nemo.collections.tts.modules.transformer import mask_from_lens
  from nemo.collections.tts.parts.utils.helpers import plot_multipitch_to_numpy, plot_spectrogram_to_numpy
  from nemo.core.classes import ModelPT
  from nemo.core.classes.common import PretrainedModelInfo
  from nemo.utils import logging, model_utils
  from nemo.utils.decorators import experimental
label_desc: Use image node_id 5 for calling the FastPitchModel_SSL obj's underlying member method code with example usage: obj.compute_encoding(content_embedding, speaker_embedding, dataset_id) and returns: encoded