Use OCR in Deno
import { TextToAnything } from "@texttoanything/deno";
const TTA = new TextToAnything(/*API token here*/);
const ocrText = await TTA.OCR(file, "eng", "image/jpeg", "text");
Use TTA's OCR functionality in Deno to extract text from images. You can specify the language and MIME type of the image.
There are 3 modes available:
- Text - will return plain text
- HOCR - will return a (HTML like structure)
- Blocks - will return a detailed JSON object