replit-tesseract-ocr
v1.0.3
Published
using node-tesseract-ocr didn't work for me on replit
Downloads
2
Readme
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-ocr
Usage
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()