We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 74bf823 + 229e155 commit 872e649Copy full SHA for 872e649
CHANGELOG.md
@@ -4,6 +4,10 @@ Changelog
4
Unreleased
5
----------
6
7
+### Fixed
8
+
9
+- Fix JSON serialization of segments due to Faster Whisper v1.1.0 changes
10
11
[1.7.0] (2024-12-17)
12
--------------------
13
app/utils.py
@@ -1,5 +1,6 @@
1
import json
2
import os
3
+from dataclasses import asdict
from typing import TextIO, BinaryIO
import ffmpeg
@@ -88,6 +89,8 @@ class WriteJSON(ResultWriter):
88
89
extension: str = "json"
90
91
def write_result(self, result: dict, file: TextIO):
92
+ if "segments" in result:
93
+ result["segments"] = [asdict(segment) for segment in result["segments"]]
94
json.dump(result, file)
95
96
0 commit comments