@mnapoli/ocr
v2.0.1
Published
CLI to transcribe text from images using Google Gemini Vision
Maintainers
Readme
Minimal CLI to transcribe text from images using Google Gemini.
npx @mnapoli/ocr image.jpg
npx @mnapoli/ocr page1.jpg page2.png > output.txt
npx @mnapoli/ocr *.jpg | lessMultiple images are transcribed in order, separated by a blank line on stdout.
The transcription is exact (spelling and grammar are not corrected). Words that are hard to read are output as bracketed alternatives ([Giovanni/Gioanni]), and completely illegible words as __.
Requirements
A Google Gemini API key, set as the GEMINI_API_KEY environment variable:
export GEMINI_API_KEY=your_key_hereGet a key at aistudio.google.com.
Supported formats
JPEG, PNG
Options
| Flag | Description |
|-------------------|---------------|
| --version, -v | Print version |
| --help, -h | Show usage |
