yuka-friends / Windrecorder

Windrecorder is a memory search app by records everything on your screen in small size, to let you rewind what you have seen, query through OCR text or image description, and get activity statistics.
GNU General Public License v2.0
2.7k stars 110 forks source link

OCR Support for more languages #158

Closed Eikosa closed 2 months ago

Eikosa commented 2 months ago

As far as I can see at the moment the program only supports OCR in 3 languages, I think this is too few, it would be nice if we could add any OCR language we want (maybe two languages at the same time). At the moment it gives a not found error in the asset folder.


The system language is tr, which has been applied as the main language for OCR detection.
(Not the language you want? Please check whether the input method/language pack of the selected language is installed on the system.
(https: //learn.microsoft.com/en-us/uwp/api/windows.media.ocr)

--------------------------------------------------------------------

Press any key to continue . . .
Traceback (most recent call last):
  File "C:\Users\User\Desktop\Windrecorder-main\onboard_setting.py", line 329, in <module>
    set_main()
  File "C:\Users\User\Desktop\Windrecorder-main\onboard_setting.py", line 323, in set_main
    f()
  File "C:\Users\User\Desktop\Windrecorder-main\onboard_setting.py", line 193, in set_ocr_engine
    with open("__assets__\\OCR_test_1080_words_" + config.ocr_lang + ".txt", encoding="utf-8") as f:  # 读取比对参考文本
FileNotFoundError: [Errno 2] No such file or directory: '__assets__\\OCR_test_1080_words_tr.txt'
Press any key to continue . . .
Antonoko commented 2 months ago

Got it, thanks for the feedback! That's a blind spot omission ... It should support any existing language installed on Windows, but the detection here lacks a fallback measure to handle, causing the setup process to be blocked.

The currently supported languages are only for UI copywriting, which does not affect actual recognition, indexing and search. We are writing an i18n guide so that volunteers can add support for more languages. (If you are interested later, you are welcome to participate in editing :)