code: def infer(
      self,
      *,
      text,
      pitch=None,
      speaker=None,
      energy=None,
      pace=1.0,
      volume=None,
      reference_spec=None,
      reference_spec_lens=None,
  ):
      # Calculate speaker embedding
      spk_emb = self.get_speaker_embedding(
          batch_size=text.shape[0],
          speaker=speaker,
          reference_spec=reference_spec,
          reference_spec_lens=reference_spec_lens,
      )
  
      # Input FFT
      enc_out, enc_mask = self.encoder(input=text, conditioning=spk_emb)
  
      # Predict duration and pitch
      log_durs_predicted = self.duration_predictor(
          enc_out, enc_mask, conditioning=spk_emb
      )
      durs_predicted = log_to_duration(
          log_dur=log_durs_predicted,
          min_dur=self.min_token_duration,
          max_dur=self.max_token_duration,
          mask=enc_mask,
      )
      pitch_predicted = (
          self.pitch_predictor(enc_out, enc_mask, conditioning=spk_emb)
          + pitch
      )
      pitch_emb = self.pitch_emb(pitch_predicted.unsqueeze(1))
      enc_out = enc_out + pitch_emb.transpose(1, 2)
  
      if self.energy_predictor is not None:
          if energy is not None:
              assert (
                  energy.shape[-1] == text.shape[-1]
              ), f"energy.shape[-1]: {energy.shape[-1]} != len(text)"
              energy_emb = self.energy_emb(energy)
          else:
              energy_pred = self.energy_predictor(
                  enc_out, enc_mask, conditioning=spk_emb
              ).squeeze(-1)
              energy_emb = self.energy_emb(energy_pred.unsqueeze(1))
          enc_out = enc_out + energy_emb.transpose(1, 2)
  
      # Expand to decoder time dimension
      len_regulated, dec_lens = regulate_len(
          durs_predicted, enc_out, pace
      )
      volume_extended = None
      if volume is not None:
          volume_extended, _ = regulate_len(
              durs_predicted, volume.unsqueeze(-1), pace
          )
          volume_extended = volume_extended.squeeze(-1).float()
  
      # Output FFT
      dec_out, _ = self.decoder(
          input=len_regulated, seq_lens=dec_lens, conditioning=spk_emb
      )
      spect = self.proj(dec_out).transpose(1, 2)
      return (
          spect.to(torch.float),
          dec_lens,
          durs_predicted,
          log_durs_predicted,
          pitch_predicted,
          volume_extended,
      )
  
imports: import torch
  from nemo.collections.tts.modules.submodules import ConditionalInput, ConditionalLayerNorm
  from nemo.collections.tts.parts.utils.helpers import binarize_attention_parallel, regulate_len
  from nemo.core.classes import NeuralModule, adapter_mixins, typecheck
  from nemo.core.neural_types.elements import EncodedRepresentation, Index, LengthsType, LogprobsType, MelSpectrogramType, ProbsType, RegressionValuesType, TokenDurationType, TokenIndex, TokenLogDurationType
  from nemo.core.neural_types.neural_type import NeuralType
label_desc: Use image node_id 6 for calling the FastPitchModule obj's underlying member method code with example usage: obj.infer() and returns: spect,  dec_lens,  durs_predicted,  log_durs_predicted,  pitch_predicted,  volume_extended