1.0.3 • Published 2 years ago
replit-tesseract-ocr v1.0.3
Tesseract OCR for Node.js (Replit)
Installation
First, you need to install Tesseract After you've installed Tesseract, you can go installing the npm-package:
npm install replit-tesseract-ocrUsage
const tesseract = require("replit-tesseract-ocr")
const config = {
  lang: "eng", // default
  oem: 0,
  psm: 3,
}
async function main() {
  try {
    const text = await tesseract.recognize("image.jpg", config)
    console.log("Result:", text)
  } catch (error) {
    console.log(error.message)
  }
}
main()