Updated config.py to include diarization configurations
Added diarize.py to perform diarization on input audio files
Scripts:
Added _setupdiarizer.sh which downloads and configures pre-trained diarizer model files (Chime6)
Added _splitwav.py which contains a method for extracting segments from a large audio file
Added _utt2spk_tospk2utt.pl which generates spk2utt file form utt2spk file
Added xvectors.py which contains methods for extracting x-vectors
Added plda.py which contains methods for PLDA scoring
Added cluster.py which contains methods for clustering speakers using PLDA scores
Added _makerttm.py whcih produces an rttm file
Added vad.py which contains a method for computing vad energy using a features read specifier
Test Usage
Run the following scripts to download the pre-trained model's files and place them to the corresponding paths
cd server/scripts
./setup_chime6.sh
./setup_SAD.sh
./setup_diarizer.sh
Build server
make build-server kaldi_model=<Your full path>/kaldi-grpc-server/server/chime6_model/ image_tag=kaldigrpc:chime6-latest
Run server by mounting your local directory which contains the .wav to be processed
docker run -p 50051:50051 -ti -v <local dir>:/tmp kaldigrpc:chime6-latest --port=50051 --max-workers=3
In another terminal list all running container ids
docker ps
Copy the target container id and run an interactive shell to access the container's environment
docker exec -it <container-id> bash
Run segmentation process
cd /kaldigrpc
python segment.py --wav=/tmp/<your wav file>
Or run the diarization process
python diarize.py --wav=/tmp/<your wav file>
SAD results
You can find them in:
_/kaldigrpc/SADmodel/data/segments
The format of the "segments" file is:
\<utterance-id> \<recording-id> \<segment-begin> \<segment-end>
Diarization results
You can find them in:
_/kaldigrpc/diarizermodel/data/rttm
The format of the "rttm" file is:
SPEAKER \<recording-id> 1 \<start time> \<duration> NA NA \<speaker-id> NA NA
Notes
If you want to perform only diarization there is no need to run separately SAD as it's already executed in it's initial stage. In case you want to inspect the SAD results for the diarization process, they can be found in:
_/kaldigrpc/diarizermodel/data/segments
TODO
General cleanup and restructuring of the config file for the diarization class
Changes
Kaldigrpc:
Scripts:
Test Usage
Run the following scripts to download the pre-trained model's files and place them to the corresponding paths
Build server
make build-server kaldi_model=<Your full path>/kaldi-grpc-server/server/chime6_model/ image_tag=kaldigrpc:chime6-latest
Run server by mounting your local directory which contains the .wav to be processed
docker run -p 50051:50051 -ti -v <local dir>:/tmp kaldigrpc:chime6-latest --port=50051 --max-workers=3
In another terminal list all running container ids
docker ps
Copy the target container id and run an interactive shell to access the container's environment
docker exec -it <container-id> bash
Run segmentation process
Or run the diarization process
python diarize.py --wav=/tmp/<your wav file>
SAD results
You can find them in: _/kaldigrpc/SADmodel/data/segments The format of the "segments" file is: \<utterance-id> \<recording-id> \<segment-begin> \<segment-end>
Diarization results
You can find them in: _/kaldigrpc/diarizermodel/data/rttm The format of the "rttm" file is: SPEAKER \<recording-id> 1 \<start time> \<duration> NA NA \<speaker-id> NA NA
Notes
If you want to perform only diarization there is no need to run separately SAD as it's already executed in it's initial stage. In case you want to inspect the SAD results for the diarization process, they can be found in: _/kaldigrpc/diarizermodel/data/segments
TODO