# Phone conversation diarization with LIUM

I am trying split call-center recording by speakers. LIUM seems to fit great. But results look random to me (green is etalon, gray is what I get): So I think I am doing something wrong. Maybe features are not extracted correctly? Command I am running is

java -cp lium_spkdiarization-8.4.1.jar fr.lium.spkDiarization.system.Telephone \
--saveAllStep --doCEClustering \
--sOutputFormat=seg.xml,UTF8 sound


sound.wav is RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 48000 Hz. One can download it here https://yadi.sk/d/w0doqi7QhcjJj . Please, help!

• I am also doing something similar. But LIUM toolkit gives me more than 2 speakers. I would like to clarify on your statement that you joined all other clusters and represented it as 2nd speaker. how did you do that? Can you explain more on that? Thanks – codingPanda Feb 13 '17 at 9:13

system.Telephone is just for detection of speech, that's why you get only init clusters. You can use default fr.lium.spkDiarization.system.Diarization it will do proper steps as described in LIUM docs, result will be like this:

;; cluster S0
file 1 0 1135 M S U S0
file 1 5722 300 M S U S0
file 1 9266 359 M S U S0
file 1 12670 370 M S U S0
;; cluster S1
file 1 1135 832 F S U S1
file 1 5372 350 F S U S1
file 1 6022 572 F S U S1
file 1 10167 1550 F S U S1
file 1 13040 466 F S U S1
file 1 13623 352 F S U S1
;; cluster S10 [ merge HCLR 0 = S10 in S11 with 1.208107727685253 ]
file 1 1967 693 F S U S10
file 1 2660 1644 F S U S10
file 1 4304 1068 F S U S10
file 1 6594 937 F S U S10
;; cluster S12
file 1 7531 429 F S U S12
file 1 8692 574 F S U S12
;; cluster S13
file 1 7960 732 M T U S13
;; cluster S16
file 1 9625 542 F S U S16
file 1 11717 953 F S U S16


LIUM models included into jar are trained for 16khz, so the input should be better 16khz, you need to resample your 48khz file to 16khz before you feed into LIUM.

If you want to run on telephone speech, you might need to retrain mail/female/ubm models for that. It is also worth to note that LIUM models are trained for French, for other languages they should be better retrained.

Overall, LIUM is not expected to work out of box, you might need to spend some time to make it work properly.

• Thank you. Sure, first of all I tried command described in docs and got results that you showed. But they also look pretty random to me (maybe a bit better) yadi.sk/i/_fW4BDxChdMgx . You think this is the best I can get without retraining? – alexanderkuk Jul 2 '15 at 15:53
• On second picture you have s0 and s1 swapped in the reference, actually its the other way around and it was able to catch quite many things properly. It does not handle quick turns of the speakers though, it was not designed to do that. It works best on TV shows where you have one turn in a minute. The default setting for small initial segmentation (MSeg step) is set to 2.5s, so it did not detect the turn of speakers in the fist 11 seconds. Silence model also did not work properly and instead of silence you got speaker S10. So it needs some work of course. – Nikolay Shmyrev Jul 2 '15 at 16:35
• For example if you add in MSeg step in above script --sModelWindowSize=100 --sMinimumWindowSize=100 it will be able to catch initial segments properly ;; cluster S0 file 1 0 204 F S U S0 file 1 1350 175 F S U S0 ;; cluster S1 file 1 204 943 M S U S1 – Nikolay Shmyrev Jul 2 '15 at 16:45
• Yes, it is much better yadi.sk/i/0WrwRQEvhdSAf . Now I need to make it detect silence and produce just two clusters. Thank you – alexanderkuk Jul 2 '15 at 16:57
• Ok, I gave up trying to detect silence using LIUM, I think I'll do it manually in python. But I have to cluster my segments in two speakers any way. So the best segmentation that I have is yadi.sk/i/V8v_aSZphexBm . But there are too many speakers. – alexanderkuk Jul 3 '15 at 20:43