machinewrapped / gpt-subtrans

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

Gemini refuses to translate sometimes #153

Closed fenixpsicologia closed 1 month ago

fenixpsicologia commented 3 months ago

I've noticed in some situations that Gemini simply doesn't translate and the application simply ignores it and continues translating the other sessions. Then I need to translate from line to line.

However I noticed something in common, the times it stopped translating it was because a sentence above had a word like: "huh?"

Maybe it's a bug and gemini is considering this a question instead of a sentence to be translated.

machinewrapped commented 3 months ago

Haha, interesting theory - if you can provide an example I'll take a look.

Gemini will sometimes leave blank lines in the translation, so if the original line was just "huh?" it might leave the translation blank... I adjusted the parser to handle simple cases, but if Gemini returns something the parser can't handle it might be unable to recover and detect subsequent lines. Splitting the batch at that point would probably help.

I tend to set a small batch size for Gemini (35-40 lines) and I added the "Auto-split batch" button to make it easier to break up batches with persistent errors (the plan is to automate it).

Gemini ends the response quietly if it reaches its token limit compared to GPT - I added extra validation in v0.6.3 to detect incomplete responses so they should get retried - but will probably fail again for the same reason.

machinewrapped commented 3 months ago

It looks like the change to detect blank translations was after the last release... I'll see if I can put together a new release today.

fenixpsicologia commented 2 months ago

The problem still occurs, to reproduce it just have a dialog with a question, for example:

"Huh?", "What"?

The most annoying thing about this is that even clicking to try to translate again, it doesn't translate. From what I've noticed, this happens in Gemini 1.0, but in 1.5 this no longer occurs.

machinewrapped commented 2 months ago

I can't reproduce this one - can you upload an example project where it's happening?

image

fenixpsicologia commented 1 month ago

Apparently, this issue has been resolved.