Add core classes and functions for online clustering diarizer part 1
State: closed | Pull request: yes
Labels: name: ASR

Signed-off-by: Taejin Park <tango4j@gmail.com>


[[NeMo Online Speaker Diarization VIDEO DEMO LINK](
https://drive.google.com/file/d/15ro8HKmzevXh_wx9oTtfRUw9wNtj6LuJ/view?usp=share_link)]


# What does this PR do ?

Add core classes and functions for online clustering diarizer.
Dividing the huge PR into two: 

part 1: online clustering (nmesc_clustering.py) + unit tests
part 2: Segmentation + online diarizer class + unit tests

**Collection**: 

ASR

# Changelog 

#### `OnlineSpeakerClustering` in nmesc_clustering.py (included in this PR)
online version of `SpeakerClustering` class (online speaker counting and permutation matching)


#### `test_diar_utils.py` in NeMo/tests/collections/asr/  (included in this PR)
Tests all clustering and online diarization related functions


-------------
the following will be included in the later PR
#### `OnlineClusteringDiarizer` in online_diarizer.py (inherits ClusteringDiarizer) (will be included in part2)
online version of `ClusteringDiarizer` class in clustering_diarizer.py

#### `OnlineSegmentor` class in speaker_utils.py: (will be included in part2)
online version of speech segmentations


<img width="966" alt="image" src="https://user-images.githubusercontent.com/13211483/204661137-78d0272b-1594-4509-a486-a8720e835bc4.png">



Checkout [Help Slides Link](https://docs.google.com/presentation/d/1LDUTIGRNVuLJsy81V3GaHZlFDUpxZ9rux-fNPfgcLmw/edit?usp=sharing) for better understanding on why online diarizer needs
(1) linear sum assignment (Hungarian alg)
(2) Interval merging
(3) merge_vector function
and data flow of class and functions.

![image](https://user-images.githubusercontent.com/13211483/203663864-2966ad2a-0268-4d5c-9819-cf2ca4d4e8ad.png)


If you are curious about why online diarization needs FIFO-queue, take a look at the most recent paper on online neural diarization
[Online Neural Diarization of Unlimited Numbers of Speakers](https://arxiv.org/pdf/2206.02432.pdf)

# Usage

This is core classes and functions update.
Example script will be pushed in the second round of PR.

# Before your PR is "Ready for review"
**Pre checks**:
- [x] Make sure you read and followed [Contributor guidelines](https://github.com/NVIDIA/NeMo/blob/main/CONTRIBUTING.md)
- [x] Did you write any new necessary tests?
- [ ] Did you add or update any necessary documentation?
- [ ] Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
  - [ ] Reviewer: Does the PR have correct import guards for all optional libraries?
  
**PR Type**:
- [x] New Feature
- [ ] Bugfix
- [ ] Documentation

If you haven't finished some of the above items you can still open "Draft" PR.
[Online Neural Diarization of Unlimited Numbers of Speakers](https://arxiv.org/pdf/2206.02432.pdf)

## Who can review?

Anyone in the community is free to review the PR once the checks have passed. 
[Contributor guidelines](https://github.com/NVIDIA/NeMo/blob/main/CONTRIBUTING.md) contains specific people who can review PRs to various areas.

# Additional Information
* Related to # (issue)