code: def get_speaker_embeddings(cls, args):
      embed_speaker = None
      if args.speaker_to_id is not None:
          if args.speaker_emb_path is None:
              embed_speaker = torch.nn.Embedding(
                  len(args.speaker_to_id), args.speaker_embed_dim
              )
          else:
              speaker_emb_mat = np.load(args.speaker_emb_path)
              assert speaker_emb_mat.shape[1] == args.speaker_embed_dim
              embed_speaker = torch.nn.Embedding.from_pretrained(
                  torch.from_numpy(speaker_emb_mat),
                  freeze=True,
              )
              logger.info(
                  f"load speaker embeddings from {args.speaker_emb_path}. "
                  f"train embedding? {embed_speaker.weight.requires_grad}\n"
                  f"embeddings:\n{speaker_emb_mat}"
              )
      return embed_speaker
  
imports: import logging
  import os
  import os.path
  import torch
  import torch.nn.functional
  import numpy
  from fairseq.data.audio.text_to_speech_dataset import TextToSpeechDatasetCreator
  from fairseq.tasks import register_task
  from fairseq.tasks.speech_to_text import SpeechToTextTask
  from fairseq.speech_generator import AutoRegressiveSpeechGenerator, NonAutoregressiveSpeechGenerator, TeacherForcingAutoRegressiveSpeechGenerator
label_desc: Use image node_id 7 for calling the TextToSpeechTask obj's underlying member method code with example usage: obj.get_speaker_embeddings(cls, args) and returns: embed_speaker