Skip to main content

OCR Orchestrator Parameters

The OCR orchestrator accepts the following parameters:
ParameterTypeDefaultDescription
layer_1_ocr_engineEngine instanceThe configured Layer 1 engine instance
layer_1_timeoutfloat | NoneNoneTimeout in seconds for Layer 1 processing. Raises OCRTimeoutError on expiry

Engine Configuration

Each engine is instantiated with its own parameters. Common parameters shared across most engines:
ParameterTypeDefaultDescription
languagesList[str]['en']Languages to detect
confidence_thresholdfloat0.0Minimum confidence threshold (0.0-1.0) for accepting OCR results
rotation_fixboolFalseEnable automatic rotation correction for skewed images
enhance_contrastboolFalseEnhance image contrast before OCR processing
remove_noiseboolFalseApply noise reduction filter to improve text clarity
pdf_dpiint300DPI resolution for PDF rendering (higher = better quality, slower)
preserve_formattingboolTrueTry to preserve text formatting (line breaks, spacing)
Each engine may have additional provider-specific parameters. See the individual engine pages for details.

Configuration Example

Async Usage