class_docstr: Online Segmentor for online (streaming) diarizer.
  - The class instances created by this class takes time-series signal from the audio buffer and
    creates subsegments for embedding extraction.
  - Since online segmentation is based on a short audio buffer, the methods in this class extracts
    a few subsegments from the given intervals for the raw time-series signal.
  
  Attributes:
      frame_start (float):
          Start of the middle chunk
      buffer_start (float):
          Start of the entire buffer
      buffer_end (float):
          End of the entire buffer
      sample_rate (int):
          Sampling rate of the input time-series signal
      cumulative_speech_labels (Tensor):
          Torch tensor matrix containing culmulative VAD (speech activity) timestamps
class_docstr_tok: ["Online","Segmentor","for","online","(","streaming",")","diarizer",".","-","The","class","instances","created","by","this","class","takes","time-series","signal","from","the","audio","buffer","and","creates","subsegments","for","embedding","extraction",".","-","Since","online","segmentation","is","based","on","a","short","audio","buffer",",","the","methods","in","this","class","extracts","a","few","subsegments","from","the","given","intervals","for","the","raw","time-series","signal",".","Attributes",":","frame_start","(","float",")",":","Start","of","the","middle","chunk","buffer_start","(","float",")",":","Start","of","the","entire","buffer","buffer_end","(","float",")",":","End","of","the","entire","buffer","sample_rate","(","int",")",":","Sampling","rate","of","the","input","time-series","signal","cumulative_speech_labels","(","Tensor",")",":","Torch","tensor","matrix","containing","culmulative","VAD","(","speech","activity",")","timestamps"]
code: def __init__(self, sample_rate: int):
      self.frame_start: float = 0.0
      self.buffer_start: float = 0.0
      self.buffer_end: float = 0.0
      self.sample_rate: int = sample_rate
      self.cumulative_speech_labels: torch.Tensor = torch.tensor([])
  
imports: import gc
  import json
  import math
  import os
  import shutil
  from copy import deepcopy
  from typing import Dict, List, Tuple, Union
  import numpy
  import omegaconf
  import soundfile
  import torch
  from pyannote.core import Annotation, Segment
  from tqdm import tqdm
  from nemo.collections.asr.data.audio_to_label import repeat_signal
  from nemo.collections.asr.parts.utils.longform_clustering import LongFormSpeakerClustering
  from nemo.collections.asr.parts.utils.offline_clustering import SpeakerClustering, get_argmin_mat, split_input_data
  from nemo.utils import logging
label_desc: Use image node_id 1 to create a new OnlineSegmentor object  with example: obj = OnlineSegmentor(sample_rate)