class_docstr: Speaker embedding extraction model.
  Core model for diverse speaker-related tasks (e.g., verification, open-set
  identification, diarization)
  
  The model architecture comprises mainly 'encoder', 'pooling', and
  'projector'.
  In common speaker recognition field, the combination of three would be
  usually named as 'speaker_encoder' (or speaker embedding extractor).
  We splitted it into three for flexibility in future extensions:
    - 'encoder'   : extract frame-level speaker embeddings.
    - 'pooling'   : aggregate into single utterance-level embedding.
    - 'projector' : (optional) additional processing (e.g., one fully-
                    connected layer) to derive speaker embedding.
  
  Possibly, in the future, 'pooling' and/or 'projector' can be integrated as
  a 'decoder', depending on the extension for joint usage of different tasks
  (e.g., ASR, SE, target speaker extraction).
code: def extract_feats(
      self, speech: torch.Tensor, speech_lengths: torch.Tensor
  ) -> Tuple[torch.Tensor, torch.Tensor]:
      batch_size = speech.shape[0]
      speech_lengths = (
          speech_lengths
          if speech_lengths is not None
          else torch.ones(batch_size).int() * speech.shape[1]
      )
  
      # 1. extract feats
      if self.frontend is not None:
          feats, feat_lengths = self.frontend(speech, speech_lengths)
      else:
          feats = speech
          feat_lengths = None
  
      # 2. apply augmentations
      if self.specaug is not None and self.training:
          feats, _ = self.specaug(feats, feat_lengths)
  
      # 3. normalize
      if self.normalize is not None:
          feats, _ = self.normalize(feats, feat_lengths)
  
      return feats, feat_lengths
  
imports: from typing import Dict, Optional, Tuple, Union
  import torch
  from typeguard import check_argument_types
  from espnet2.asr.encoder.abs_encoder import AbsEncoder
  from espnet2.asr.frontend.abs_frontend import AbsFrontend
  from espnet2.asr.specaug.abs_specaug import AbsSpecAug
  from espnet2.layers.abs_normalize import AbsNormalize
  from espnet2.spk.loss.aamsoftmax import AAMSoftmax
  from espnet2.spk.loss.abs_loss import AbsLoss
  from espnet2.spk.pooling.abs_pooling import AbsPooling
  from espnet2.spk.projector.abs_projector import AbsProjector
  from espnet2.torch_utils.device_funcs import force_gatherable
  from espnet2.train.abs_espnet_model import AbsESPnetModel
label_desc: Use image node_id 3 for calling the ESPnetSpeakerModel obj's underlying member method code with example usage: obj.extract_feats(speech, speech_lengths) and returns: feats,  feat_lengths