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

write seg ALLIES

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