class_docstr: Base `Embedding` Manager class. Every new `Embedding` manager must inherit this.
  It defines common `Embedding` manager specific functions.
  
  It expects embeddings files in the following format:
  
  ::
  
      {
          'audio_file_key':{
              'name': 'category_name',
              'embedding'[<embedding_values>]
          },
          ...
      }
  
  `audio_file_key` is a unique key to the audio file in the dataset. It can be the path to the file or any other unique key.
  `embedding` is the embedding vector of the audio file.
  `name` can be name of the speaker of the audio file.
class_docstr_tok: ["Base","`","Embedding","`","Manager","class",".","Every","new","`","Embedding","`","manager","must","inherit","this",".","It","defines","common","`","Embedding","`","manager","specific","functions",".","It","expects","embeddings","files","in","the","following","format",":",":",":","{","'audio_file_key","'",":","{","'name","'",":","'category_name","'",",","'embedding","'","[","<","embedding_values",">","]","}",",","...","}","`","audio_file_key","`","is","a","unique","key","to","the","audio","file","in","the","dataset",".","It","can","be","the","path","to","the","file","or","any","other","unique","key",".","`","embedding","`","is","the","embedding","vector","of","the","audio","file",".","`","name","`","can","be","name","of","the","speaker","of","the","audio","file","."]
docstr: Initialize a speaker encoder model.
  
  Args:
      model_path (str): Model file path.
      config_path (str): Model config file path.
      use_cuda (bool, optional): Use CUDA. Defaults to False.
docstr_tok: ["Initialize","a","speaker","encoder","model",".","Args",":","model_path","(","str",")",":","Model","file","path",".","config_path","(","str",")",":","Model","config","file","path",".","use_cuda","(","bool",",","optional",")",":","Use","CUDA",".","Defaults","to","False","."]
code: def init_encoder(
      self, model_path: str, config_path: str, use_cuda=False
  ) -> None:
      """Initialize a speaker encoder model.
  
      Args:
          model_path (str): Model file path.
          config_path (str): Model config file path.
          use_cuda (bool, optional): Use CUDA. Defaults to False.
      """
      self.use_cuda = use_cuda
      self.encoder_config = load_config(config_path)
      self.encoder = setup_encoder_model(self.encoder_config)
      self.encoder_criterion = self.encoder.load_checkpoint(
          self.encoder_config,
          model_path,
          eval=True,
          use_cuda=use_cuda,
          cache=True,
      )
      self.encoder_ap = AudioProcessor(**self.encoder_config.audio)
  
imports: import json
  import random
  from typing import Any, Dict, List, Tuple, Union
  import fsspec
  import numpy
  import torch
  from TTS.config import load_config
  from TTS.encoder.utils.generic_utils import setup_encoder_model
  from TTS.utils.audio import AudioProcessor
label_desc: Use image node_id 16 for calling the EmbeddingManager obj's underlying member method code with example usage: obj.init_encoder(model_path, config_path, use_cuda) without return types