nithinraok commited on
Commit
acbe421
·
1 Parent(s): 13cf0bf

fix timestamp

Browse files

Signed-off-by: nithinraok <[email protected]>

Files changed (1) hide show
  1. nemo_align.py +3 -2
nemo_align.py CHANGED
@@ -430,8 +430,9 @@ def get_start_end_for_segments(word_timestamps):
430
  word_list = []
431
 
432
 
433
- segment = ' '.join(word_list)
434
- segment_timestamps.append((segment, beginning, end))
 
435
 
436
  return segment_timestamps
437
 
 
430
  word_list = []
431
 
432
 
433
+ if word_list: # Only append if there are remaining words
434
+ segment = ' '.join(word_list)
435
+ segment_timestamps.append((segment, beginning, end))
436
 
437
  return segment_timestamps
438