fix(vtt): strip cue settings from end timestamp in parse_ad_cues
tts_synthesis.parse_ad_cues() was passing "00:00:02.500 line:0%" to _parse_timestamp() — cue settings were not stripped from the end-time part of the timing line. Split on whitespace and take first token only. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
f22d568fc5
commit
3b31012901
1 changed files with 2 additions and 1 deletions
|
|
@ -454,7 +454,8 @@ def parse_ad_cues(vtt_content: str) -> list[dict]:
|
|||
if " --> " in line:
|
||||
timing_parts = line.split(" --> ")
|
||||
start_time = _parse_timestamp(timing_parts[0].strip())
|
||||
end_time = _parse_timestamp(timing_parts[1].strip())
|
||||
# Strip cue settings (e.g. "line:0% align:start") from end timestamp
|
||||
end_time = _parse_timestamp(timing_parts[1].strip().split()[0])
|
||||
|
||||
# Get text from next line(s)
|
||||
i += 1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue