docstr: Generate embeddings for a batch of utterances
  x: 1xTxD
docstr_tok: ["Generate","embeddings","for","a","batch","of","utterances","x",":","1xTxD"]
code: def compute_embedding(self, x, num_frames=160, overlap=0.5):
      """
      Generate embeddings for a batch of utterances
      x: 1xTxD
      """
      num_overlap = int(num_frames * overlap)
      max_len = x.shape[1]
      embed = None
      cur_iter = 0
      for offset in range(0, max_len, num_frames - num_overlap):
          cur_iter += 1
          end_offset = min(x.shape[1], offset + num_frames)
          frames = x[:, offset:end_offset]
          if embed is None:
              embed = self.inference(frames)
          else:
              embed += self.inference(frames)
      return embed / cur_iter
  
file_path: TTS/TTS/speaker_encoder/model.py
imports: import torch
  from torch import nn
label_desc: Use image node_id 5 for calling the SpeakerEncoder obj's underlying member method code with example usage: obj.compute_embedding(x, num_frames, overlap) and returns: unknown