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

[Error Update]:Correcting read_rttm and write_rttm methods from diar.py.

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__ = "0.0.4.1"
__version__ = "0.0.4.3"
......@@ -952,7 +952,7 @@ class Diar():
if line.startswith('#') or line.startswith(';;'):
continue
# 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:
dur=i.duration()/100
start=i['start']/100
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")
fic.close()
@classmethod
......
Markdown is supported
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