Sharrnah / whispering-ui

Native UI for the Whispering Tiger project - https://github.com/Sharrnah/whispering (live transcription / translation)
https://whispering-tiger.github.io/
MIT License
187 stars 11 forks source link

OCR Char Map codec cant encode #6

Closed fznx922 closed 1 year ago

fznx922 commented 1 year ago

hey Sharrnah

Love the application, works amazing in real time, on the OCR side of things im trying to get it to work but come across the issues when i try to start it

it says its dowloading detection model, then freezes on 2% and is saying cant encode character u2588 in pos. but then it gets cut off and cant read the rest

are you able to help or know of a solution?

thanks so much!

Sharrnah commented 1 year ago

Hello. and thanks for the kind words.

It sounds as if the language detection fails.

Can you tell me your source and target language? I would guess Source is "Auto" in your case because otherwise it should not try to load the language detection model.

Not sure though what that has to do with char encoding, 🤔

Also does it work if you set the source language to the actual language of the scanned text?

My guess is that it might fail because of a character encoding of the scanned text. So maybe it would also be helpful if you could provide me with an example text it fails with so i can reproduce it?

thank you in advance

fznx922 commented 1 year ago

thank you so much for the quick reply! so currently i have the source lang as Japanese, and source of translation is Japanese, target English

when i configure and press process window with ocr. i get the prompt saying its loading, then when i go to the log window it shows me the same 2% progress and the error, attached a screenshot as i couldn't see an openable log file?

thank you so much for your time!

and for additional information the translation function and also the speech to text and caption is all working well, absolutely amazing ! just the ocr component im having difficulty with :(

Capture

fznx922 commented 1 year ago

little bit of an update, i was able to bypass the error by manually downloading craft_mlt_25k.pth and japanese_g2.pth so now it gets past the error, but now im recieving an error on the log saying "charmap: codec cant encode characters in position 26-30: character maps to

hopefully this helps to find a solution, not sure if its just unique to what im doing, but all im trying to currently do is run a bit of a dirty translation on a switch game.

Sharrnah commented 1 year ago

Thank you. i was able to reproduce it. It happened when the window title contained unicode characters. 🙈 Will be fixed in the next version.

Sharrnah commented 1 year ago

Should be solved in the new update i just released.

I close this issue. If you still have any issue or a question, feel free to open a new one.