Commit c447ff2b authored by Anthony Larcher's avatar Anthony Larcher
Browse files

write seg ALLIES

parent ee1ca9b7
......@@ -967,7 +967,7 @@ class Diar():
return diarization
@classmethod
def to_string_seg(cls, diar):
def to_string_seg(cls, diar, time_float=False):
"""
transform a diarization into a string
:param diar: a diarization
......@@ -984,9 +984,15 @@ class Diar():
channel = 'U'
if diar._attributes.exist('channel'):
channel = segment['channel']
if time_float:
lst.append('{:s} 1 {:d} {:d} {:s} {:s} {:s} {:s}\n'.format(
segment['show'], segment['start'], segment['stop'] - segment['start'], gender,
channel, env, segment['cluster']))
else:
lst.append('{:s} 1 {:.2f} {:.2f} {:s} {:s} {:s} {:s}\n'.format(
segment['show'], segment['start'], segment['stop'] - segment['start'], gender,
channel, env, segment['cluster']))
return lst
@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