Skip to main content

Module subprocess

Module subprocess 

Source
Expand description

Subprocess adapters: converters that run behind the sandboxed runner instead of in this process.

Each adapter speaks the framed stdin/stdout protocol to a worker mode and renders the response to the outcome shape every converter emits. The PDF adapter is the production occupant: it carries the same outcome, warnings, and failure reasons as the in-process PDF path did, so its manifest records differ only in converter id. The image and audio converters decode in-jail and drive their pinned engines behind hash-verified inventories. The OCR and video adapters are the protocol half of their conversions: their engines are not pinned yet, so the registry routes their formats to unsupported with reason engine-unpinned until a rules bump pins an engine, and the adapters are exercised against fake engines under test.

Structs§

OcrAdapter
The OCR protocol adapter. Engine-unpinned: reachable only through an explicit runner until a rules bump pins an engine.
PdfSubprocess
The production PDF conversion behind the sandbox runner.
RecordsSubprocess
The records worker adapter: parquet, avro, and sqlite behind the sandbox runner.
VideoAdapter
The video protocol adapter. Engine-unpinned.

Constants§

ASR_ADAPTER_ID
Registry id of the speech transcription adapter.
ASR_ADAPTER_VERSION
Version of the speech transcription adapter. 2.0.0 because the pinned in-jail decode-and-transcribe path replaced the engine-unpinned protocol scaffold: a total behavior change under the shared id, so every prior record under it reconverts.
ASR_DECODE_POLICY
The pinned decode policy, serialized exactly as the engine child receives it: one line, single spaces, no trailing newline. The engine argv embeds these tokens verbatim between the input selection and the output selection, and the rules pin this serialization’s BLAKE3 under the asr-decode-policy role, so the rules, the code, and the child invocation cannot drift apart.
ASR_FILE_ROLE_LABELS
The speech runtime roles that are files a deployment supplies and the cold worker re-hashes: everything except the decode policy.
ASR_ROLE_CLI
The pinned speech runtime roles. Generic labels only: the identities behind them are deployment data bound by hash.
ASR_ROLE_DECODE_POLICY
The serialized decode policy role. Not a file: it pins ASR_DECODE_POLICY itself.
ASR_ROLE_PROBE
The backend probe role: the pinned executable whose clean exit proves an accelerator-class device is enumerable by type.
ASR_ROLE_WEIGHTS
The transcription weights role.
IMAGE_PIXEL_OCR_ID
Registry id of the in-jail pixel-OCR converter for raster images.
IMAGE_PIXEL_OCR_VERSION
Version of the in-jail pixel-OCR converter. 1.1.0 because the same converter gained the svg input route through the external provider and the child-specific segment source: additive behavior under the shared id, so every prior direct-raster record reconverts once.
OCR_ADAPTER_ID
Registry id of the OCR adapter.
OCR_ADAPTER_VERSION
Version of the OCR adapter.
OCR_CONFIDENCE_WARNING
OCR spans below this confidence carry a warning.
OCR_SEGMENT_SOURCE_DOCUMENT
The segment source the direct raster path labels its spans with.
OCR_SEGMENT_SOURCE_OCR
The segment source the svg provider child labels its spans with, so a consumer can tell recognized text lifted from a vector source’s rendering from the source’s own markup.
PDF_RECOVERED_ID
Manifest converter id for the direct-extraction recovery path: a PDF whose text was recovered after the markdown path declined the page as image-based. It names the actual extraction path so a recovered document is never recorded under the markdown path’s id.
PDF_RECOVERED_VERSION
Version of the PDF recovery path. It shares the adapter version deliberately: both paths ship in the same adapter, and the checkpoint key compares converter version, so an unchanged recovered PDF skips on a later run only because this equals the adapter version.
PDF_SUBPROCESS_ID
Registry id of the subprocess PDF adapter.
PDF_SUBPROCESS_VERSION
Version of the subprocess PDF adapter.
RECORDS_SUBPROCESS_ID
Registry id of the jailed records worker adapter.
RECORDS_SUBPROCESS_VERSION
Version of the jailed records worker adapter.
VIDEO_ADAPTER_ID
Registry id of the video adapter.
VIDEO_ADAPTER_VERSION
Version of the video adapter.

Functions§

format_timecode
Renders whole seconds as HH:MM:SS for transcript timecodes. The input must be finite and non-negative.
render_screen_states
Renders deduplicated screen states to the transcript format: [on-screen @ HH:MM:SS] text, ordered by first appearance, with consecutive identical text collapsed.
render_transcript
Renders speech segments to the transcript format: [HH:MM:SS -> HH:MM:SS] Speaker N: text, one line per segment, ordered by start time.