Absolute path to the image file.
Optionaloptions: How to recognize the text, or null for the defaults
OptionalautomaticallyDetectsLanguage?: booleanWhen true, Vision selects recognition languages automatically, overriding languages. Defaults to false
Optionallanguages?: string[]BCP-47 language codes, e.g. ["en-US", "fr-FR"], to hint Vision toward specific languages. Use supportedLanguages() to enumerate the available codes for the current device
OptionalminimumConfidence?: numberFrom 0 to 1, defaulting to 0. Observations whose confidence is below this are excluded from result.observations (and therefore from result.text)
OptionalrecognitionLevel?: "accurate" | "fast""accurate" (the default) uses a larger neural network for better results; "fast" trades accuracy for speed
Resolves with the recognition result.
Recognize text in the image at the given file path.
Returns a Promise that resolves with an
HSOCRResultcontaining all recognized text and per-region observations. The image must exist on disk; URLs and data buffers are not supported.Recognition is performed on a background thread; the main thread is not blocked during the operation.