/* auto-generated by NAPI-RS */ /* eslint-disable */ export declare enum OcrAccuracy { Fast = 0, Accurate = 1 } export interface OcrBoundingBox { /** Horizontal position relative to the input image, normalized to `0.0..=1.0`. */ x: number /** Vertical position from the top of the input image, normalized to `0.0..=1.0`. */ y: number /** Width relative to the input image, normalized to `0.0..=1.0`. */ width: number /** Height relative to the input image, normalized to `0.0..=1.0`. */ height: number } export interface OcrLine { /** Recognized text content of the line. */ text: string /** Always 1.0 on Windows. */ confidence: number /** Axis-aligned line bounds in normalized, top-left-origin image coordinates. */ boundingBox: OcrBoundingBox } export interface OcrResult { text: string /** * Always 1.0 on Windows. On macOS, the averaged per-observation confidence * returned by the Vision recognizer (either `RecognizeDocumentsRequest` on * macOS 26+ or the legacy `VNRecognizeTextRequest` path). */ confidence: number /** * Recognized lines in reading order. The formatted `text` is not guaranteed * to equal these lines joined together. */ lines: Array } /** * @param image - The image file path or Buffer * @param accuracy - The accuracy of the OCR. Default is `Accurate`. Ignored on Windows. * @param preferredLangs - The preferred languages for the OCR. Default is `["en-US"]`. On Windows, only the first language is used. * @param signal - The signal to abort the OCR. */ export declare function recognize(image: string | Uint8Array, accuracy?: OcrAccuracy | undefined | null, preferredLangs?: Array | undefined | null, signal?: AbortSignal | undefined | null): Promise