Skip to content

Subtitle desync when sentence spans multiple SRT entries #1

@attilabal

Description

@attilabal

When translating subtitles using srt-translate-OpenAI-API, the tool incorrectly merges sentences that are split across multiple indexed SRT entries. This results in desynchronized subtitles, as the output no longer matches the original time segments.

Original (ENG):
101
00:09:19,823 --> 00:09:22,791
You have to remember ...
refugees could be returning from

102
00:09:22,793 --> 00:09:25,043
light-years away.

103
00:09:25,045 --> 00:09:28,246
Movement.
Two contacts at .84.

Translated output (HUN):
101
00:09:19,823 --> 00:09:22,791
Emlékezned kell ... a menekültek akár
fényévekre is visszatérhetnek.

102
00:09:22,793 --> 00:09:25,043
Mozgás. Két kontaktus .84-nél.

103
00:09:25,045 --> 00:09:28,246
Közelíts óvatosan.

Problem: The tool merges lines 101 and 102 into one translated sentence, which shifts the text content from its original timing, causing misalignment and readability issues.
Each subtitle index (e.g., 101, 102, 103) should be translated independently, preserving sentence splits if needed to retain sync with the original timecodes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions