Update pipeline/postprocess.py
Browse files- pipeline/postprocess.py +2 -3
pipeline/postprocess.py
CHANGED
|
@@ -37,9 +37,8 @@ def merge_segments(segments: list) -> list:
|
|
| 37 |
combined_duration = seg["end"] - current["start"]
|
| 38 |
ends_sentence = current["text"].rstrip().endswith((".", "!", "?"))
|
| 39 |
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
is_short = len(current_words) <= 2 or (current["end"] - current["start"]) < 0.8
|
| 43 |
|
| 44 |
should_merge = (
|
| 45 |
not ends_sentence
|
|
|
|
| 37 |
combined_duration = seg["end"] - current["start"]
|
| 38 |
ends_sentence = current["text"].rstrip().endswith((".", "!", "?"))
|
| 39 |
|
| 40 |
+
current_duration = current["end"] - current["start"]
|
| 41 |
+
is_short = current_duration < 1.5
|
|
|
|
| 42 |
|
| 43 |
should_merge = (
|
| 44 |
not ends_sentence
|