morpheus65535 / bazarr

Bazarr is a companion application to Sonarr and Radarr. It manages and downloads subtitles based on your requirements. You define your preferences by TV show or movie and Bazarr takes care of everything for you.
https://www.bazarr.media
GNU General Public License v3.0
2.83k stars 220 forks source link

Translating subs #2684

Open FiyiK opened 3 weeks ago

FiyiK commented 3 weeks ago

Describe the bug Translating 1 subtitle takes 10 minutes (depending on the characters)

To Reproduce Steps to reproduce the behavior: Click translate

Expected behavior Translating happened in a few seconds before

Software (please complete the following information):

LOG added

morpheus65535 commented 3 weeks ago

Please enable debug log in Settings-->General and run the translation again. Disable debug logging then provide the new log file.

FiyiK commented 3 weeks ago

Log added: bazarr (1).log

FiyiK commented 3 weeks ago

I forgot to disable debug logging. I disabled and added new log file; bazarr (2).log

I must say, today was a little faster then yesterday, but still very slow compared to previous bazarr editions.

morpheus65535 commented 3 weeks ago

I forgot to disable debug logging. I disabled and added new log file;

bazarr (2).log

I must say, today was a little faster then yesterday, but still very slow compared to previous bazarr editions.

I'm AFK for the weekend and I'll look into this on Monday.

Unfortunately, we'll never be able to use Google Translate the way we did before since it's corrupting text format on multilines text sent as a whole. We have to send each line as a separate request so it take more time but at least it provide working subtitles.

FiyiK commented 3 weeks ago

Do we have any possibilities of AI translate or Bing translator instead for bazarr?

morpheus65535 commented 3 weeks ago

We use the deep-translator module to interface with Google Translate. It supports other translation solutions but it would require additional code to support them (frontend and backend). https://deep-translator.readthedocs.io/en/latest/

FiyiK commented 3 weeks ago

I would like to support you again if we could add such feature.. What do you think?

morpheus65535 commented 2 weeks ago

We're dependent on the throttling done on Google side. If they ask to slow down, we comply since we do not want your IP to be blocked from further requests. It may be the reason why you get slow results using batch mode. Single element translation seems to works fine.

morpheus65535 commented 2 weeks ago

From your logs, I see 61 seconds to send 988 requests to Google Translate. Of course it's not as good as it was but it's not that bad. All other translations took less than a minute. We're far from the 10 minutes you said earlier.

morpheus65535 commented 2 weeks ago

I would like to support you again if we could add such feature.. What do you think?

I'm taking about this. We surely need to think about an alternative. You're donation will of course be appreciated once we've implemented such feature.

FiyiK commented 2 weeks ago

No true, maybe the last time i put that log, it was a little faster as usual, but it is true that sometimes when i badge translate, over time it gets slower and slower even to 5/10 minutes for one sub. I remember you told me some time ago to make a donation externally. Can you point me in the right direction? I'll donate some funds in advance as a sign of appreciation.

Your awesome as always. Thank you to prioritize and look for alternative options.

morpheus65535 commented 2 weeks ago

You can find the donation link in Bazarr UI at the bottom left (small heart icon).