Introduction¶
When using Cortex within DeepSeek Harness (DSH) to handle screenshots, scanned pages, or local audio/video, the host itself does not take responsibility for installing models or running recognition engines for you. If you wish to integrate Windows built-in OCR, local Tesseract, optional PaddleOCR, or whisper.cpp into the Cortex pipeline, and require that inputs be strictly local file://, with explicit failure when no command is configured, you need a bridge layer separate from the main dsh-cortex package. Below, I introduce the positioning, capabilities, and configuration methods of the community plugin dsh-cortex-extractors (maintainer: Lh1314-China, Skillhub category: Model Inference).
What is this¶
dsh-cortex-extractors is an optional OCR/ASR adapter for Cortex, packaged separately and not merged into dsh-cortex. It only calls local commands explicitly defined in your configuration, does not automatically download models, and does not accept HTTP input; it fails closed when no available command is configured. The current package.json version is 0.3.5, license MIT, and requires Node.js >= 24, DSH >= 0.2.1-rc.2 and < 0.4.0. The README emphasizes using version 0.2.1 or newer to avoid issues where DSH cannot start due to Config = null in scenarios like link: installation with older versions.
Source code and documentation: GitHub — Lh1314-China/dsh-cortex-extractors; Community directory: Skillhub Plugin Page.
Core Features¶
OCR Providers¶
Uses Windows OCR by default (no model download). For small images, it zooms in first (up to approx. 1600px wide) before recognition, falling back to the original image if preprocessing fails; can be disabled with ocrPreprocess: false. Windows OCR supports word-level bounding boxes and follows ocrLayout / UI Layout: auto detects double columns, two-column splits by the page centerline, while single and handwriting maintain top-to-bottom order.
Tesseract must be specified explicitly; it is not the default. Supports ocrLayout (auto / single / two-column / handwriting); in two-column mode, it processes the left column first, then the right column based on TSV coordinates.
PaddleOCR is an optional bridge: you must install paddleocr and paddlepaddle yourself, and point to a local root path containing detection/recognition model directories; it will refuse to run if the directory is missing, and DSH will not implicitly download models. The bridge script is lib/paddleocr_bridge.py, which is not executed by default during installation.
You can also override to any command-line OCR/ASR using the command mode, where placeholders {file} and {language} are replaced by the plugin.
ASR Providers¶
whisper.cpp is an explicit ASR provider; model files must be placed manually. Supports whisperLanguage, whisperPrompt, asrReplacements, and an optional tmpDir.
Tool Interface¶
Exposes the tool cortex_extract_text. The request body is JSON; for example, performing OCR on a local image:
{"uri":"file:///C:/tmp/frame.png","mode":"ocr","language":"chi_sim"}
If traceId is passed, the extracted result is written as a derived trace and associated via metadata, without modifying the target trace:
{"uri":"file:///C:/tmp/frame.png","mode":"ocr","traceId":"trc_target"}
Installation and Enablement¶
The README states: Installation is completed by pointing the Harness Plugin Manager to this plugin’s directory, then specifying the engine path and provider in the configuration. The documentation does not provide a fixed single-line command like dsh plugin add github:…. Installation steps should be based on the Skillhub page or the plugin management documentation for your current DSH version; do not construct commands by concatenating the repository name.
After installation, select OCR/ASR configuration based on your environment, for example Tesseract:
ocrProvider: tesseract
tesseractLanguage: chi_sim+eng
tesseractPath: 'C:/Program Files/Tesseract-OCR/tesseract.exe'
tessdataPath: 'C:/Users/<you>/AppData/Local/cortex-extractors/tessdata'
ocrLayout: auto # auto / single / two-column / handwriting
PaddleOCR example:
ocrProvider: paddleocr
paddleocrPython: 'python'
paddleocrModelDir: 'C:/Users/<you>/.paddlex/official_models'
ocrLayout: handwriting # or auto / two-column
whisper.cpp example:
asrProvider: whisper-cpp
whisperPath: 'C:/tools/whisper/whisper-cli.exe'
whisperModel: 'C:/models/ggml-small.bin'
whisperLanguage: zh
whisperPrompt: '本鲸 白饭 主人'
asrReplacements: ['本金=本鲸']
# Optional: output temp directory; defaults to <cwd>/.cortex-extractors-tmp
tmpDir: 'C:/path/to/writable/tmp'
Custom command example:
ocrProvider: 'command'
ocrCommand: 'C:/tools/tesseract/tesseract.exe'
ocrArgs: ['{file}', 'stdout', '-l', '{language}']
asrCommand: 'C:/tools/whisper/whisper-cli.exe'
asrArgs: ['-f', '{file}', '-otxt']
For more detailed engines, layouts, and failure modes, see docs/engines.md in the repository.
Typical Usage and Self-Testing¶
Call cortex_extract_text from the agent or Cortex side; uri must be a file:// local path, and mode must be ocr or the corresponding ASR mode. Recognition quality depends entirely on the engine and local models you have configured; the plugin does not guarantee quality.
The repository includes tests that use a fake engine, without downloading or running real OCR/ASR:
node --test test/*.test.js
Applicable Scenarios and Notes¶
Suitable for developers who have already installed OCR/ASR on Windows or their local environment and wish for Cortex to only handle “scheduling + layout-aware extraction”. Boundaries are clear: no model downloads, no automatic engine installation, no HTTP input, no hard dependency on main-cortex.
The plugin executes your configured local commands with the current DSH process permissions; before installation, you should read the source code and the MIT license to ensure the paths and binary sources are trustworthy. The community directory Skillhub is an independent site with no official affiliation with DeepSeek / Huafan; it should not be understood as an official app store.
Conclusion¶
dsh-cortex-extractors connects Cortex with various local OCR/ASR engines via explicit configuration, and supports layout options such as double columns and handwriting; it is suitable for pipelines where “local files in, text trace out”. For further installation instructions and issues, see the Skillhub directory page and the GitHub repository.