code: def get_speaker_embedding(speaker, device):
      if speaker == "Surprise Me!":
          # load one of the provided speaker embeddings at random
          idx = np.random.randint(len(speaker_embeddings))
          key = list(speaker_embeddings.keys())[idx]
          speaker_embedding = np.load(speaker_embeddings[key])
  
          # randomly shuffle the elements
          np.random.shuffle(speaker_embedding)
  
          # randomly flip half the values
          x = (np.random.rand(512) >= 0.5) * 1.0
          x[x == 0] = -1.0
          speaker_embedding *= x
  
          # speaker_embedding = np.random.rand(512).astype(np.float32) * 0.3 - 0.15
      else:
          speaker_embedding = np.load(speaker_embeddings[speaker[:3]])
  
      speaker_embedding = (
          torch.tensor(speaker_embedding).unsqueeze(0).to(device)
      )
      return speaker_embedding
  
imports: from __future__ import annotations
  import base64
  import io
  import time
  from io import BytesIO
  import numpy
  import scipy
  import wavio
  import soundfile
  import torch
  import librosa
  from src.tts_sentence_parsing import init_sentence_state, get_sentence
  from src.tts_utils import prepare_speech, get_no_audio, chunk_speed_change
label_desc: Use image node_id 10 for calling a global function with example usage: get_speaker_embedding(speaker, device) and returns: speaker_embedding