Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
# speaker-cluster
This code is a simple BIC clusterer for speaker diarisation. Clustering based on Euclidean distances and Arithmetic Harmonic Sphericity is also included. The md-eval.pl script performs scoring and the htkmfc.py script reads in HTK features.
$ python2 speakercluster.py
usage: speakercluster.py [-h] [-d {ahs,bic,euclid,gish}] [-c {diagonal,full}]
[-p PENALTY] [-t THRESHOLD] [-m MAX_CLUSTERS]
[-s SHORT_TIME] [-f FOLDER] [-r REFERENCE] [--trace]
[--collar COLLAR]
scp
Requires an scp file pointing to segments in a HTK feature file:
CORPUS-FILE1_000000_000332.mfc=/path/to/CORPUS-FILE1.mfc[0,332]
CORPUS-FILE1_000554_000599.mfc=/path/to/CORPUS-FILE1.mfc[554,599]
CORPUS-FILE1_000613_000770.mfc=/path/to/CORPUS-FILE1.mfc[613,770]
CORPUS-FILE1_000770_001027.mfc=/path/to/CORPUS-FILE1.mfc[770,1027]
The reference file should be in the NIST format below, and the script outputs a hypothesis file in the same format:
;; SPEAKER FILENAME CHANNEL BEGIN(secs) DUR(secs) <NA> <NA> SPEAKERLABEL <NA>
SPEAKER CORPUS-FILE1 1 0.000000 3.320000 <NA> <NA> SPKR0 <NA>
SPEAKER TBL0101-MIXA1 1 5.540000 0.450000 <NA> <NA> SPKR1 <NA>
SPEAKER TBL0101-MIXA1 1 6.130000 1.570000 <NA> <NA> SPKR0 <NA>
SPEAKER TBL0101-MIXA1 1 7.700000 2.570000 <NA> <NA> SPKR2 <NA>