docstr: This function is a wrapper designed for toggling between long-form and short-form speaker clustering.
  The details of short-form clustering is in `SpeakerClustering` class.
  NOTE: `torch.jit.script` currently does not support `**kwargs` in the function signature therefore,
  we need to use a wrapper function to handle the arguments.
docstr_tok: ["This","function","is","a","wrapper","designed","for","toggling","between","long-form","and","short-form","speaker","clustering",".","The","details","of","short-form","clustering","is","in","`","SpeakerClustering","`","class",".","NOTE",":","`","torch.jit.script","`","currently","does","not","support","`","*","*","kwargs","`","in","the","function","signature","therefore",",","we","need","to","use","a","wrapper","function","to","handle","the","arguments","."]
code: def forward_infer(
      self,
      embeddings_in_scales: torch.Tensor,
      timestamps_in_scales: torch.Tensor,
      multiscale_segment_counts: torch.LongTensor,
      multiscale_weights: torch.Tensor,
      oracle_num_speakers: int = -1,
      max_rp_threshold: float = 0.15,
      max_num_speakers: int = 8,
      enhanced_count_thres: int = 80,
      sparse_search_volume: int = 30,
      fixed_thres: float = -1.0,
      chunk_cluster_count: int = 50,
      embeddings_per_chunk: int = 10000,
  ) -> torch.LongTensor:
      """
      This function is a wrapper designed for toggling between long-form and short-form speaker clustering.
      The details of short-form clustering is in `SpeakerClustering` class.
      NOTE: `torch.jit.script` currently does not support `**kwargs` in the function signature therefore,
      we need to use a wrapper function to handle the arguments.
      """
      if (
          embeddings_per_chunk is not None
          and torch.max(multiscale_segment_counts)
          > embeddings_per_chunk
      ):
          return self.long_forward_infer(
              embeddings_in_scales=embeddings_in_scales,
              timestamps_in_scales=timestamps_in_scales,
              multiscale_segment_counts=multiscale_segment_counts,
              multiscale_weights=multiscale_weights,
              oracle_num_speakers=oracle_num_speakers,
              max_rp_threshold=max_rp_threshold,
              max_num_speakers=max_num_speakers,
              sparse_search_volume=sparse_search_volume,
              fixed_thres=fixed_thres,
              chunk_cluster_count=chunk_cluster_count,
              embeddings_per_chunk=embeddings_per_chunk,
          )
      else:
          cluster_labels = self.speaker_clustering.forward_infer(
              embeddings_in_scales=embeddings_in_scales,
              timestamps_in_scales=timestamps_in_scales,
              multiscale_segment_counts=multiscale_segment_counts,
              multiscale_weights=multiscale_weights,
              oracle_num_speakers=oracle_num_speakers,
              max_rp_threshold=max_rp_threshold,
              max_num_speakers=max_num_speakers,
              enhanced_count_thres=enhanced_count_thres,
              sparse_search_volume=sparse_search_volume,
              fixed_thres=fixed_thres,
          )
          self.timestamps_in_scales = (
              self.speaker_clustering.timestamps_in_scales
          )
          return cluster_labels
  
file_path: NeMo/nemo/collections/asr/parts/utils/longform_clustering.py
imports: from typing import Dict, List, Tuple
  import torch
  from tqdm import tqdm
  from nemo.collections.asr.parts.utils.offline_clustering import SpeakerClustering, get_scale_interpolated_embs, getCosAffinityMatrix, split_input_data
  from nemo.collections.asr.parts.utils.online_clustering import get_merge_quantity, run_reducer
label_desc: Use image node_id 8 for calling the LongFormSpeakerClustering obj's underlying member method code with example usage: obj.forward_infer(embeddings_in_scales, timestamps_in_scales, multiscale_segment_counts, multiscale_weights, oracle_num_speakers, max_rp_threshold, max_num_speakers, enhanced_count_thres, sparse_search_volume, fixed_thres, chunk_cluster_count, embeddings_per_chunk) and returns: self, cluster_labels