Commit 2125ab00 authored by Sulfyderz's avatar Sulfyderz
Browse files

[Error Update]:Correcting read_rttm and write_rttm methods from

parent 7431e2e2
......@@ -10,4 +10,4 @@ from s4d.diar import Diar
from s4d.segmentation import sanity_check, bic_linear, div_gauss
from s4d.viterbi import Viterbi
__version__ = ""
__version__ = ""
......@@ -952,7 +952,7 @@ class Diar():
if line.startswith('#') or line.startswith(';;'):
# split line into fields
spk, show, tmp0, start_str, length, tmp1, tmp2, cluster, tmp3 = line.split()
spk, show, tmp0, start_str, length, tmp1, tmp2, cluster, tmp3, tmp4 = line.split()
if spk == "SPEAKER":
start = int(round(float(start_str)*100, 0))
stop = start+int(round(float(length)*100, 0))
......@@ -1033,7 +1033,7 @@ class Diar():
for i in diarization:
fic.write(line+'{:.3f}'.format(start)+" "+'{:.3f}'.format(dur)+" <NA> <NA> "+i['cluster'].replace(' ','_')+" <NA>\n")
fic.write(line+'{:.3f}'.format(start)+" "+'{:.3f}'.format(dur)+" <NA> <NA> "+i['cluster'].replace(' ','_')+" <NA> <NA>\n")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment