docstr: Set the speaker conditioning input based on the multi-speaker mode.
docstr_tok: ["Set","the","speaker","conditioning","input","based","on","the","multi-speaker","mode","."]
code: def _set_cond_input(aux_input: Dict):
      """Set the speaker conditioning input based on the multi-speaker mode."""
      sid, g, lid, durations = None, None, None, None
      if (
          "speaker_ids" in aux_input
          and aux_input["speaker_ids"] is not None
      ):
          sid = aux_input["speaker_ids"]
          if sid.ndim == 0:
              sid = sid.unsqueeze_(0)
      if (
          "d_vectors" in aux_input
          and aux_input["d_vectors"] is not None
      ):
          g = F.normalize(aux_input["d_vectors"])  # .unsqueeze_(-1)
          if g.ndim == 2:
              g = g  #  .unsqueeze_(0) # pylint: disable=self-assigning-variable
  
      if (
          "durations" in aux_input
          and aux_input["durations"] is not None
      ):
          durations = aux_input["durations"]
  
      return sid, g, lid, durations
  
imports: from typing import Callable, Dict, Tuple
  import torch
  import torch.nn.functional
  from coqpit import Coqpit
  from torch import nn
  from TTS.tts.layers.delightful_tts.conformer import Conformer
  from TTS.tts.layers.delightful_tts.encoders import PhonemeLevelProsodyEncoder, UtteranceLevelProsodyEncoder, get_mask_from_lengths
  from TTS.tts.layers.delightful_tts.energy_adaptor import EnergyAdaptor
  from TTS.tts.layers.delightful_tts.networks import EmbeddingPadded, positional_encoding
  from TTS.tts.layers.delightful_tts.phoneme_prosody_predictor import PhonemeProsodyPredictor
  from TTS.tts.layers.delightful_tts.pitch_adaptor import PitchAdaptor
  from TTS.tts.layers.delightful_tts.variance_predictor import VariancePredictor
  from TTS.tts.layers.generic.aligner import AlignmentNetwork
  from TTS.tts.utils.helpers import generate_path, maximum_path, sequence_mask
label_desc: Use image node_id 3 for calling the AcousticModel obj's underlying member method code with example usage: obj._set_cond_input(aux_input) and returns: sid,  g,  lid,  durations