Capstone04 commited on
Commit
639e330
·
verified ·
1 Parent(s): 37111fb

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. asr_diarization/pipeline.py +4 -4
asr_diarization/pipeline.py CHANGED
@@ -66,16 +66,16 @@ class ASR_Diarization:
66
  for word_info in result["chunks"]:
67
  start_ts, end_ts = word_info.get("timestamp", (None, None)) or (None, None)
68
  tokens.append({
 
69
  "start": start_ts,
70
  "end": end_ts,
71
- "text": word_info["text"],
72
- "tag": "w"
73
  })
74
 
75
  seg_dict = {
76
  "speaker": spk,
77
- "start": start,
78
- "end": end,
79
  "tokens": tokens
80
  }
81
  merged_segments.append(seg_dict)
 
66
  for word_info in result["chunks"]:
67
  start_ts, end_ts = word_info.get("timestamp", (None, None)) or (None, None)
68
  tokens.append({
69
+ "tag": "w",
70
  "start": start_ts,
71
  "end": end_ts,
72
+ "text": word_info["text"]
 
73
  })
74
 
75
  seg_dict = {
76
  "speaker": spk,
77
+ "segment_start": start,
78
+ "segment_end": end,
79
  "tokens": tokens
80
  }
81
  merged_segments.append(seg_dict)