Skip to content

index ​

Functions ​

readText ​

ts
readText(filepath: string, language: string = "eng"): string

Recognize the text in an image locally with Tesseract. Nothing is uploaded. Slower and less accurate than macOS Vision, but runs on any platform.

@param filepath - Path to a PNG or JPEG image @param language - Tesseract language code; only "eng" ships today

Parameters:

NameTypeDefault
filepathstring
languagestring"eng"

Returns: string

(source)