class_docstr: A class that enables online (streaming) clustering based diarization.
  
  - The instance created from `OnlineClusteringDiarizer` sets aside a certain amount of memory
    to provide the upcoming inference with history information
  
  - There are two major modules involved: `OnlineSegmentor` and `OnlineSpeakerClustering`.
      OnlineSegmentor: Take the VAD-timestamps and generate segments for each scale
      OnlineSpeakerClustering: Update the entire speaker labels of the given online session
                               while updating the speaker labels of the streaming inputs.
  
  - The overall diarization process is done by calling `diarize_step` function.
    `diarize_step` function goes through the following steps:
      (1) Segmentation (`OnlineSegmentor` class)
      (2) Embedding extraction (`_extract_online_embeddings` function call)
      (3) Online speaker counting and speaker clustering (`OnlineClusteringDiarizer` class)
      (4) Label generation (`generate_cluster_labels` function call)
docstr: Incrementally extract speaker embeddings based on `audio_signal` and `segment_ranges` variables.
  Unlike offline speaker diarization, speaker embedding and subsegment ranges are not saved to disk.
  Measures the mismatch between `segment_ranges` and `embeddings` then extract the necessary amount of
  speaker embeddings.
  
  Args:
      audio_signal (Tensor):
          Torch tensor containing time-series audio signal
      embeddings (Tensor):
          Previously existing Torch tensor containing speaker embedding vector
      segment_ranges(Tensor):
          Torch tensor containing the start and end of each segment
  
  Returns:
      embeddings (Tensor):
          Concatenated speaker embedding vectors that match segment range information in `segment_ranges`.
docstr_tok: ["Incrementally","extract","speaker","embeddings","based","on","`","audio_signal","`","and","`","segment_ranges","`","variables",".","Unlike","offline","speaker","diarization",",","speaker","embedding","and","subsegment","ranges","are","not","saved","to","disk",".","Measures","the","mismatch","between","`","segment_ranges","`","and","`","embeddings","`","then","extract","the","necessary","amount","of","speaker","embeddings",".","Args",":","audio_signal","(","Tensor",")",":","Torch","tensor","containing","time-series","audio","signal","embeddings","(","Tensor",")",":","Previously","existing","Torch","tensor","containing","speaker","embedding","vector","segment_ranges","(","Tensor",")",":","Torch","tensor","containing","the","start","and","end","of","each","segment","Returns",":","embeddings","(","Tensor",")",":","Concatenated","speaker","embedding","vectors","that","match","segment","range","information","in","`","segment_ranges","`","."]
code: def _extract_online_embeddings(
      self,
      audio_signal: torch.Tensor,
      segment_ranges: torch.Tensor,
      embeddings,
  ) -> torch.Tensor:
      """
      Incrementally extract speaker embeddings based on `audio_signal` and `segment_ranges` variables.
      Unlike offline speaker diarization, speaker embedding and subsegment ranges are not saved to disk.
      Measures the mismatch between `segment_ranges` and `embeddings` then extract the necessary amount of
      speaker embeddings.
  
      Args:
          audio_signal (Tensor):
              Torch tensor containing time-series audio signal
          embeddings (Tensor):
              Previously existing Torch tensor containing speaker embedding vector
          segment_ranges(Tensor):
              Torch tensor containing the start and end of each segment
  
      Returns:
          embeddings (Tensor):
              Concatenated speaker embedding vectors that match segment range information in `segment_ranges`.
      """
      stt_idx = 0 if embeddings is None else embeddings.shape[0]
      end_idx = len(segment_ranges)
  
      if end_idx > stt_idx:
          torch_embs = self._run_embedding_extractor(
              audio_signal[stt_idx:end_idx]
          )
          if embeddings is None or embeddings.shape[0] == 0:
              embeddings = torch_embs
          else:
              embeddings = torch.vstack(
                  (embeddings[:stt_idx, :], torch_embs)
              )
  
      elif end_idx < stt_idx:
          embeddings = embeddings[: len(segment_ranges)]
  
      if len(segment_ranges) != embeddings.shape[0]:
          raise ValueError(
              "Segment ranges and embeddings shapes do not match."
          )
      return embeddings
  
imports: import os
  import time
  from copy import deepcopy
  from typing import Dict
  import torch
  from omegaconf import DictConfig
  from nemo.collections.asr.models import ClusteringDiarizer
  from nemo.collections.asr.parts.utils.offline_clustering import get_scale_interpolated_embs, split_input_data
  from nemo.collections.asr.parts.utils.online_clustering import OnlineSpeakerClustering
  from nemo.collections.asr.parts.utils.speaker_utils import OnlineSegmentor, audio_rttm_map, generate_cluster_labels, get_embs_and_timestamps
  from nemo.utils import logging, model_utils
label_desc: Use image node_id 14 for calling the OnlineClusteringDiarizer obj's underlying member method code with example usage: obj._extract_online_embeddings(audio_signal, segment_ranges, embeddings) and returns: embeddings