class_docstr: Target Speaker Extraction Frontend model
class_docstr_tok: ["Target","Speaker","Extraction","Frontend","model"]
code: def __init__(
      self,
      encoder: AbsEncoder,
      diffusion: AbsDiffusion,
      decoder: AbsDecoder,
      # loss_wrappers: List[AbsLossWrapper],
      num_spk: int = 1,
      normalize: bool = False,
      **kwargs,
  ):
      assert check_argument_types()
  
      super().__init__(
          encoder=encoder,
          separator=None,
          decoder=decoder,
          mask_module=None,
          loss_wrappers=None,
          **kwargs,
      )
  
      self.encoder = encoder
      self.diffusion = diffusion
      self.decoder = decoder
  
      # TODO: Extending the model to separation tasks.
      assert (
          num_spk == 1
      ), "only enhancement models are supported now, num_spk must be 1"
      self.num_spk = num_spk
      self.normalize = normalize
  
imports: import contextlib
  from typing import Dict, List, Optional, OrderedDict, Tuple
  import torch
  from typeguard import check_argument_types
  from espnet2.enh.decoder.abs_decoder import AbsDecoder
  from espnet2.enh.diffusion.abs_diffusion import AbsDiffusion
  from espnet2.enh.encoder.abs_encoder import AbsEncoder
  from espnet2.enh.espnet_model import ESPnetEnhancementModel
  from espnet2.enh.extractor.abs_extractor import AbsExtractor
  from espnet2.enh.loss.criterions.tf_domain import FrequencyDomainLoss
  from espnet2.enh.loss.criterions.time_domain import TimeDomainLoss
  from espnet2.enh.loss.wrappers.abs_wrapper import AbsLossWrapper
  from espnet2.torch_utils.device_funcs import force_gatherable
  from espnet2.train.abs_espnet_model import AbsESPnetModel
label_desc: Use image node_id 1 to create a new ESPnetDiffusionModel object from inherited base classes: ESPnetEnhancementModel with example: obj = ESPnetDiffusionModel(encoder, diffusion, decoder, num_spk, normalize)