0

I started working with LIUM tool recently. For my audio file I was able to get the segment file.

Please help me in breaking the input audio file with the help of the segmentation file.

Below is the segment file I got for the below command

D:\Jar_files>java -Xmx1024m -jar ./LIUM_SpkDiarization-8.4.1.jar --fInputMask=Amala.wav 
--sOutputMask=gsd.seg  --doCEClustering  GSD


;; cluster S0 [ merge HCLR 2 = S0 in S12 with 1.5410836397413505 ] [ merge HCLR 3 = S0 in S1 with 1.6226113910564284 ] [ score:FS = -33.252216872332376 ] [ score:FT = -33.621459953603306 ] [ score:MS = -33.524596374083096 ] [ score:MT = -34.046138016418915 ] 

GSD 1 0 229 F S U S0

GSD 1 229 443 F S U S0

GSD 1 672 620 F S U S0

GSD 1 1292 1117 F S U S0

GSD 1 2409 1183 F S U S0

GSD 1 3592 501 F S U S0

GSD 1 4093 1026 F S U S0

GSD 1 5119 1410 F S U S0

GSD 1 6529 785 F S U S0

GSD 1 7315 180 F S U S0

GSD 1 7495 193 F S U S0

GSD 1 7701 338 F S U S0

GSD 1 8039 824 F S U S0

GSD 1 8863 1185 F S U S0

GSD 1 10250 647 F S U S0

GSD 1 10897 174 F S U S0

GSD 1 11480 1435 F S U S0

GSD 1 13529 206 F S U S0

GSD 1 13939 1230 F S U S0

GSD 1 16192 618 F S U S0

GSD 1 16810 1022 F S U S0

GSD 1 18240 411 F S U S0

GSD 1 19265 717 F S U S0

GSD 1 19982 718 F S U S0

GSD 1 21518 411 F S U S0

GSD 1 23363 616 F S U S0

GSD 1 24387 1940 F S U S0

GSD 1 26327 595 F S U S0

GSD 1 26922 994 F S U S0

GSD 1 27916 424 F S U S0

GSD 1 28340 1997 F S U S0

GSD 1 30337 961 F S U S0
Howli
  • 12,291
  • 19
  • 47
  • 72

1 Answers1

0

Read file line by line, split lines on words. Third word is start in frames (1/100 second), next column is length. Last column is the speaker id. Given you know the start and the end of the chunk you can cut corresponding audio. You can find the code to cut audio file here:

cutting a wave file

If you want to use programming languages other than java, you can also search for code to cut the file on here on SO.

Community
  • 1
  • 1
Nikolay Shmyrev
  • 24,897
  • 5
  • 43
  • 87