Winstis

How to call native OCR APIs in Winstis plugins for screen text recognition?

I'm building a plugin that extracts tabular data from screen regions into CSV files, and want to leverage the built-in OCR service.

The design documentation specifies:

OCR: Built into the platform; plugins invoke it directly without bundling models.

Questions regarding current SDK:

  1. Does it accept image Base64 or a temp file path?
  2. Can we specify language hints (e.g., zh, en)?
  3. What is the callback/promise pattern for long-running recognition?
6 days ago
1.2k

3 Replies

AL

Regarding OCR APIs:

  1. The SDK provides winstis.ai.ocr(imageSource), accepting both absolute file paths and Uint8Array buffers.
  2. It uses OS-native hardware-accelerated OCR models with auto-detect for Chinese and English.
  3. Full docs will be published with Plugin SDK v0.2.0 this week!
6 days agoReplied by:
DA

@Alex Got it. Is there any discrepancy in recognition accuracy between macOS and Windows offline?

6 days agoReplied by:
AL

macOS leverages VisionKit while Windows 11 uses Windows.Media.Ocr; both achieve over 98% accuracy on standard typography.

6 days ago