code: def __init__(self, threshold=0.25):
      super(SpeakerRecognition, self).__init__()
      global_stats_path = os.path.join(
          self.directory, "assets", "global_embedding_stats.npy"
      )
      ckpt_path = os.path.join(
          self.directory, "assets", "model.pdparams"
      )
  
      self.sr = 16000
      self.threshold = threshold
      model_conf = {
          "input_size": 80,
          "channels": [1024, 1024, 1024, 1024, 3072],
          "kernel_sizes": [5, 3, 3, 3, 1],
          "dilations": [1, 2, 3, 4, 1],
          "attention_channels": 128,
          "lin_neurons": 192,
      }
      self.model = ECAPA_TDNN(**model_conf)
      self.model.set_state_dict(paddle.load(ckpt_path))
      self.model.eval()
  
      global_embedding_stats = np.load(
          global_stats_path, allow_pickle=True
      )
      self.global_emb_mean = paddle.to_tensor(
          global_embedding_stats.item().get("global_emb_mean")
      )
      self.global_emb_std = paddle.to_tensor(
          global_embedding_stats.item().get("global_emb_std")
      )
  
      self.similarity = paddle.nn.CosineSimilarity(axis=-1, eps=1e-6)
  
file_path: PaddleHub/modules/audio/speaker_recognition/ecapa_tdnn_voxceleb/module.py
imports: import os
  import re
  from typing import List
  from typing import Union
  import numpy
  import paddle
  import paddleaudio
  from .ecapa_tdnn import ECAPA_TDNN
  from .feature import compute_log_fbank
  from .feature import normalize
  from paddlehub.module.module import moduleinfo
  from paddlehub.utils.log import logger
label_desc: Use image node_id 1 to create a new SpeakerRecognition object from inherited base classes: paddle.nn with example: obj = SpeakerRecognition(threshold)