1

So I am working on an app that can read text on image files, I considered using tesseract.js but it is extremely slow. I read where someone was saying that node-tesseract-ocr is a bit fast. Though it requires installing tesseract-OCR, which I did successfully and can be accessed via the command-line. I also installed node-tesseract-ocr package and on testing, I get this error:

'tesseract' is not recognized as an internal or external command,
operable program or batch file.

How can I solve this ? Any Idea?

Simon Angatia
  • 688
  • 1
  • 10
  • 16

2 Answers2

0

Add tesseract.exe folder path to your Environmental Variables for your PC.

Michael Seltene
  • 543
  • 1
  • 5
  • 17
  • That doesn't work. I had done that before if you read the description – Simon Angatia Apr 30 '20 at 18:36
  • Sorry to hear that, are you using Visual Studio Code? If so change the default terminal from Powershell to CMD. Source currently open issue with the developer https://github.com/zapolnoch/node-tesseract-ocr/issues/6 – Michael Seltene May 01 '20 at 09:22
0

It unfortunately looks like CMD and Powershell have different environmental variables to set the path of. Following: Setting Windows PowerShell environment variables:

Have you tried executing $env:Path += ";<tesseractPath>" to add the tesseract path of Powershell?

Copper
  • 121
  • 1
  • 2