machinewrapped / gpt-subtrans

Open Source project using LLMs to translate SRT subtitles
Other
311 stars 36 forks source link

Consider making the SubtitleFile open to Adapters #90

Closed fenixpsicologia closed 4 months ago

fenixpsicologia commented 7 months ago

Another suggestion I wanted to give was to explore the possibility of making the SubtitleFile class more generic and open to adapters. In my opinion, the SRT format is quite limiting, while the ASS format is much more flexible.

Making the SubtitleFile more open to adapters would allow importing data from subtitles using libraries like PyonFX, which handle subtitles in the ASS format very easily.

Another aspect is that ASS subtitles allow for overlapping dialogues, which is common in anime subtitles. Converting these subtitles to SRT loses the synchronization of dialogues, and lines end up being merged.

machinewrapped commented 7 months ago

It's a good idea, but I lean quite heavily on the srt library for the internal representation and management of subtitles at the moment, so it would involve more than just virtualising the file format. Long term goal :-)