Skip to content
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

29 lines (19 sloc) 1.85 KB

Local Installation

Check here for examples:

In browser environment, tesseract.js simply provides the API layer. Internally, it opens a WebWorker to handle requests. That worker itself loads code from the Emscripten-built tesseract.js-core which itself is hosted on a CDN. Then it dynamically loads language files hosted on another CDN.

Because of this we recommend loading tesseract.js from a CDN. But if you really need to have all your files local, you can pass extra arguments to TesseractWorker to specify custom paths for workers, languages, and core.

In Node.js environment, the only path you may want to customize is languages/langPath.

const worker = Tesseract.TesseractWorker({
  workerPath: '',
  langPath: '',
  corePath: '',


A string specifying the location of the worker.js file.


A string specifying the location of the tesseract language files, with default value ''. Language file URLs are calculated according to the formula langPath + langCode + '.traineddata.gz'.


A string specifying the location of the tesseract.js-core library, with default value '' (fallback to tesseract-core.asm.js when WebAssembly is not available).

Another WASM option is '' which is a script that loads ''. But it fails to fetch at this moment.

You can’t perform that action at this time.