OCR: choose the recognizer language per call (find_text, index_recording, wait_for_change)

オープン
#379 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
56/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
backend

調査の方向性

Start with src/utils/ocr.ts and trace how OCR is created and how language handling is reported; then follow the callers in src/tools/findText.ts, src/tools/doctor.ts, and src/utils/recordingIndex.ts. Check how index_recording builds its cache key and how caller options are documented. Done means the selected language is used, unsupported languages report installed options, doctor lists them, and changing language invalidates the index cache.

索引モデルが issue の本文から書いたものです。

説明

effort: medium enhancement help wanted priority: medium

Summary

OCR always uses the Windows user-profile languages. A recording of a Japanese or German app on an English-profile machine is read with the English recognizer, even when that language pack is installed. There is no way to choose the language per call.

Where

  • src/utils/ocr.ts:309 (OcrEngine::TryCreateFromUserProfileLanguages())
  • src/utils/ocr.ts:72-75 (the only language handling is an error hint)
  • Callers: find_text, index_recording, wait_for_change (mode text), bug_report, pipeline redact.secrets

Suggested fix

  • Add an optional language (BCP-47, such as ja, de-DE) to the OCR helper. Use OcrEngine::TryCreateFromLanguage([Windows.Globalization.Language]::new($lang)) and fail clearly when IsLanguageSupported is false, listing OcrEngine.AvailableRecognizerLanguages.
  • Expose it on the callers above (or as one SCREENCAST_OCR_LANGUAGE default plus a per-call override).
  • doctor lists the installed OCR languages.
  • Include the language in the index_recording cache key, so switching languages re-indexes.

Acceptance criteria

  • find_text { language: "de-DE" } uses the German recognizer when installed
  • An uninstalled language returns an error naming the installed ones
  • doctor reports available OCR languages
  • Index cache is invalidated on language change

Getting started

  • Relevant files: src/utils/ocr.ts, src/tools/findText.ts, src/tools/doctor.ts, src/utils/recordingIndex.ts
  • Run npm run docs after adding the parameter

Filed by repo-audit/feature-ideas at 1ac339f. Severity: medium. Effort: M. audit-key: enhancement|src/utils/ocr.ts|language

主要言語
TypeScript
スター
1
フォーク
4
平均マージ
8時間 17分
マージ済み PR(30日)
46

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TMHSDigital/screencast-mcp のほかの issue

TMHSDigital/screencast-mcp の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。