Spaces:
Runtime error
Runtime error
liuyang
commited on
Commit
·
5d0a1ef
1
Parent(s):
d45c437
add fields
Browse files
app.py
CHANGED
|
@@ -343,6 +343,7 @@ def _process_single_chunk(task: dict, out_dir: str) -> dict:
|
|
| 343 |
"effective_start_ms": 0,
|
| 344 |
"effective_dur_ms": 0,
|
| 345 |
"abs_start_ms": ck["global_offset_ms"],
|
|
|
|
| 346 |
"chunk_idx": idx,
|
| 347 |
"channel": ch,
|
| 348 |
"skip": True,
|
|
@@ -1123,6 +1124,9 @@ class WhisperTranscriber:
|
|
| 1123 |
"num_speakers": detected_num_speakers,
|
| 1124 |
"speaker_embeddings": speaker_embeddings,
|
| 1125 |
"diarization_segments": diarization_segments,
|
|
|
|
|
|
|
|
|
|
| 1126 |
|
| 1127 |
}
|
| 1128 |
if pre_meta.get("channel", None):
|
|
|
|
| 343 |
"effective_start_ms": 0,
|
| 344 |
"effective_dur_ms": 0,
|
| 345 |
"abs_start_ms": ck["global_offset_ms"],
|
| 346 |
+
"dur_ms": ck["dur_ms"],
|
| 347 |
"chunk_idx": idx,
|
| 348 |
"channel": ch,
|
| 349 |
"skip": True,
|
|
|
|
| 1124 |
"num_speakers": detected_num_speakers,
|
| 1125 |
"speaker_embeddings": speaker_embeddings,
|
| 1126 |
"diarization_segments": diarization_segments,
|
| 1127 |
+
"idx": pre_meta["chunk"]["idx"],
|
| 1128 |
+
"abs_start_ms": pre_meta["chunk"]["abs_start_ms"],
|
| 1129 |
+
"dur_ms": pre_meta["chunk"]["dur_ms"],
|
| 1130 |
|
| 1131 |
}
|
| 1132 |
if pre_meta.get("channel", None):
|