Cerlancism/chatgpt-subtitle-translator

Number of lines

Closed this issue · 4 comments

I tried it, and it works nicely. Good job!
I have an issue or maybe it's more of a feature request...
Is it possible to use the two lines of the subtitles? I tried using SRT format with two lines, but the output is only in one line.

When a subtitle has more than 37 characters, it's recommended to split it into two lines.
I tested this in ChatGPT, and it worked well, but it's not automated.

Thanks!

It is intended as of now to combine multiple lines of a single SRT timestamp entry as 1. Will be looking into better ways doing this further. Would try the new function call format feature or TypeChat.

I sugest, giving the full format to chatGPT and explain in the prompt that you want. And also you can send like 10 subs in every interaction, this will help chatgpt to understand better the context...

Translate the subtitle text into desiredlanguaje, but keep the subtitle number and timecode line unchanged: \n{text}",

I tried directly in the ChatGPT web client and got good results. Then I found this project that aligns with my idea...
https://github.com/jesselau76/srt-gpt-translator

Finally, I implemented a mix of this code and a watchdog to manage the input files and execute the script with parameters depending on the file location (for example, input_eng, input_fra, input_ita, etc).

Fixed in ce63d7a and 677b586

This issue could also be improved with the newly supported structured mode

Experimental feature:

Try in CLI --experimental-structured-mode