* Fix #839 Changed the code from updating the TranscriptionOptions class instead of the options object which likely was the cause of unexpected behaviour
This commit is contained in:
@@ -490,7 +490,8 @@ class WhisperModel:
|
|||||||
content_duration = float(content_frames * self.feature_extractor.time_per_frame)
|
content_duration = float(content_frames * self.feature_extractor.time_per_frame)
|
||||||
|
|
||||||
if isinstance(options.clip_timestamps, str):
|
if isinstance(options.clip_timestamps, str):
|
||||||
TranscriptionOptions.clip_timestamps = [
|
options = options._replace(
|
||||||
|
clip_timestamps=[
|
||||||
float(ts)
|
float(ts)
|
||||||
for ts in (
|
for ts in (
|
||||||
options.clip_timestamps.split(",")
|
options.clip_timestamps.split(",")
|
||||||
@@ -498,6 +499,7 @@ class WhisperModel:
|
|||||||
else []
|
else []
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
)
|
||||||
seek_points: List[int] = [
|
seek_points: List[int] = [
|
||||||
round(ts * self.frames_per_second) for ts in options.clip_timestamps
|
round(ts * self.frames_per_second) for ts in options.clip_timestamps
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user