Documentation

tesseract_functions.php

Table of Contents

Functions

tesseract_process_unprocessed()  : int|false
Processes all unprocessed audio/video resources supported by tesseract.
tesseract_process()  : bool
Extracts text from an image or scanned document using tesseract OCR.

Functions

tesseract_process_unprocessed()

Processes all unprocessed audio/video resources supported by tesseract.

tesseract_process_unprocessed() : int|false

This function:

  • Prevents concurrent execution via process locking.
  • Selects resources with supported file extensions that have not yet been transcribed.
  • Invokes tesseract_process() for each selected resource.
Return values
int|false

Returns the number of resources processed, or false if a process lock is active.

tesseract_process()

Extracts text from an image or scanned document using tesseract OCR.

tesseract_process(int $resource) : bool

Marks the resource as processed by setting tesseract_processed = 1.

Parameters
$resource : int

The resource ID to process.

Return values
bool

True on successful processing, false if any step fails.

On this page

Search results