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

Abierto
#379 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
56/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
TypeScript
Estrellas
1
Forks
4
Merge medio
8 h 17 min
PR fusionados (30 d)
46

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de TMHSDigital/screencast-mcp

Todos los issues de TMHSDigital/screencast-mcp

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.