>EMACSPEAK --Complete Audio Desktop

Next: , Previous: emacspeak-man, Up: Emacspeak Commands


11.42 emacspeak-ocr

Commentary: This module defines Emacspeak front-end to OCR. This module assumes that sane is installed and working for image acquisition, and that there is an OCR engine that can take acquired images and produce text. Prerequisites: Sane installed and working. scanimage to generate tiff files from scanner. tiffcp to compress the tiff file. working ocr executable by default this module assumes that the OCR executable is named "ocr"

Automatically generated documentation for commands defined in module emacspeak-ocr.

— Interactive Command: emacspeak-ocr ()

control e control o

An OCR front-end for the Emacspeak desktop.

Page image is acquired using tools from the SANE package. The acquired image is run through the OCR engine if one is available, and the results placed in a buffer that is suitable for browsing the results.

For detailed help, invoke command emacspeak-ocr bound to C-e C-o to launch emacspeak-ocr-mode, and press `?' to display mode-specific help for emacspeak-ocr-mode.

— Interactive Command: emacspeak-ocr-backward-page (&optional COUNT-IGNORED)

Like backward page, but tracks page number of current document.

— Interactive Command: emacspeak-ocr-customize ()

Customize OCR settings.

— Interactive Command: emacspeak-ocr-forward-page (&optional COUNT-IGNORED)

Like forward page, but tracks page number of current document.

— Interactive Command: emacspeak-ocr-mode ()

An OCR front-end for the Emacspeak desktop.

Pre-requisites:

1) A working scanner back-end like SANE on Linux.

2) An OCR engine.

1: Make sure your scanner back-end works, and that you have the utilities to scan a document and acquire an image as a tiff file. Then set variable emacspeak-ocr-scan-image-program to point at this utility. By default, this is set to `scanimage' which is the image scanning utility provided by SANE.

By default, this front-end attempts to compress the acquired tiff image; make sure you have a utility like tiffcp. Variable emacspeak-ocr-compress-image is set to `tiffcp' by default; if you use something else, you should customize this variable.

2: Next, make sure you have an OCR engine installed and working. By default this front-end assumes that OCR is available as /usr/bin/ocr.

Once you have ensured that acquiring an image and applying OCR to it work independently of Emacs, you can use this Emacspeak front-end to enable easy OCR access from within Emacspeak.

The Emacspeak OCR front-end is launched by command emacspeak-ocr bound to C-e C-o.

This command switches to a special buffer that has OCR commands bounds to single keystrokes– see the ke-binding list at the end of this description. Use Emacs online help facility to look up help on these commands.

emacspeak-ocr-mode provides the necessary functionality to scan, OCR, read and save documents. By default, scanned images and the resulting text are saved under directory ~/ocr; see variable emacspeak-ocr-working-directory. Invoking command emacspeak-ocr-open-working-directory bound to M-x emacspeak-ocr-open-working-directory will open this directory.

By default, the document being scanned is named `untitled'. You can name the document by using command emacspeak-ocr-name-document bound to M-x emacspeak-ocr-name-document. The document name is used in constructing the name of the image and text files.

Key Bindings:

See key binding — ———

RET emacspeak-ocr-scan-and-recognize SPC emacspeak-ocr-read-current-page 1 .. 9 emacspeak-ocr-page ? describe-mode C emacspeak-ocr-set-compress-image-options I emacspeak-ocr-set-scan-image-options [ emacspeak-ocr-backward-page ] emacspeak-ocr-forward-page c emacspeak-ocr-customize d emacspeak-ocr-open-working-directory i emacspeak-ocr-scan-image j emacspeak-ocr-scan-photo n emacspeak-ocr-name-document o emacspeak-ocr-recognize-image p emacspeak-ocr-page q bury-buffer s emacspeak-ocr-save-current-page w emacspeak-ocr-write-document

.

In addition to any hooks its parent mode `text-mode' might have run, this mode runs the hook `emacspeak-ocr-mode-hook', as the final step during initialization.

— Interactive Command: emacspeak-ocr-name-document (NAME)

Name document being scanned in the current OCR buffer. Pick a short but meaningful name.

— Interactive Command: emacspeak-ocr-open-working-directory ()

Launch dired on OCR working directory.

— Interactive Command: emacspeak-ocr-page ()

Move to specified page.

— Interactive Command: emacspeak-ocr-read-current-page ()

Speaks current page.

— Interactive Command: emacspeak-ocr-recognize-image ()

Run OCR engine on current image. Prompts for image file if file corresponding to the expected `current page' is not found.

— Interactive Command: emacspeak-ocr-save-current-page ()

Writes out recognized text from current page to an appropriately named file.

— Interactive Command: emacspeak-ocr-scan-and-recognize ()

Scan in a page and run OCR engine on it. Use this command once you've verified that the separate steps of acquiring an image and running the OCR engine work correctly by themselves.

— Interactive Command: emacspeak-ocr-scan-image ()

Acquire page image.

— Interactive Command: emacspeak-ocr-scan-photo (&optional METADATA)

Scan in a photograph. The scanned image is converted to JPEG.

— Interactive Command: emacspeak-ocr-set-compress-image-options (SETTING)

Interactively update image compression options. Prompts with current setting in the minibuffer. Setting persists for current Emacs session.

— Interactive Command: emacspeak-ocr-set-scan-image-options (SETTING)

Interactively update scan image options. Prompts with current setting in the minibuffer. Setting persists for current Emacs session.

— Interactive Command: emacspeak-ocr-write-document ()

Writes out recognized text from all pages in current document.