<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Document-Processing on ErrorZap</title><link>https://errorzap.com/tags/document-processing/</link><description>Recent content in Document-Processing on ErrorZap</description><image><title>ErrorZap</title><url>https://errorzap.com/og.png</url><link>https://errorzap.com/og.png</link></image><generator>Hugo</generator><language>en-US</language><copyright>ErrorZap</copyright><lastBuildDate>Sat, 21 Nov 2026 09:00:00 -0700</lastBuildDate><atom:link href="https://errorzap.com/tags/document-processing/index.xml" rel="self" type="application/rss+xml"/><item><title>The OCR Tax Nobody Includes in the Demo</title><link>https://errorzap.com/posts/the-ocr-tax-nobody-includes-in-the-demo/</link><pubDate>Sat, 21 Nov 2026 09:00:00 -0700</pubDate><guid>https://errorzap.com/posts/the-ocr-tax-nobody-includes-in-the-demo/</guid><description>Turning a stack of documents into audio looked like a voice problem until image-only PDFs made text extraction the real bottleneck.</description><content:encoded><![CDATA[<p>The demo is always beautiful.</p>
<p>Drop a document into a folder. A pleasant voice reads it aloud. Chapters appear. Metadata fills itself in. The finished audiobook arrives on your phone before the coffee cools.</p>
<p>Then someone drops in a scanned magazine from 1998.</p>
<p>There is no text layer. Every page is a photograph. Columns wander. Ads interrupt articles. Captions live sideways. A decorative headline uses letters that look like they were cut from chrome. The &ldquo;document-to-audio&rdquo; project stops being a voice project and becomes an optical-character-recognition project wearing headphones.</p>
<h2 id="pdfs-are-containers-not-promises">PDFs are containers, not promises</h2>
<p>Two files ending in <code>.pdf</code> can require completely different pipelines.</p>
<p>One contains clean embedded text. Extraction takes seconds. The other contains hundreds of page images. Before a voice model can read a sentence, software has to render each page, detect orientation, recognize characters, reconstruct reading order, and decide what is article versus furniture.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>PDF
</span></span><span style="display:flex;"><span> |
</span></span><span style="display:flex;"><span> +-- text-rich ------&gt; extract -&gt; clean -&gt; segment -&gt; narrate
</span></span><span style="display:flex;"><span> |
</span></span><span style="display:flex;"><span> +-- image-only -----&gt; render -&gt; OCR -&gt; layout -&gt; clean -&gt; segment -&gt; narrate
</span></span></code></pre></div><p>Treating both as the same input creates bad audio and misleading progress bars.</p>
<h2 id="classification-comes-first">Classification comes first</h2>
<p>The first useful stage is not OCR. It is classification.</p>
<p>Inspect a bounded sample of pages. Count extractable characters. Detect whether the pages are mostly images. Look for repeated headers, multiple columns, and unusual page sizes. Record the confidence. Then choose the lane.</p>
<p>A mixed document may need both. Some pages have text; others are scanned inserts. A good pipeline keeps page-level provenance so a listener can trace a strange sentence back to the page and method that produced it.</p>
<h2 id="recognition-is-not-understanding">Recognition is not understanding</h2>
<p>OCR can return perfectly valid words in the wrong order.</p>
<p>On a two-column page it may read across both columns, splice an advertisement into a paragraph, then append the footer in the middle of a sentence. A language model can make that output sound smooth, which is dangerous: fluency can conceal structural damage.</p>
<p>The pipeline needs checks that survive the voice layer:</p>
<ul>
<li>preserve page and block boundaries;</li>
<li>flag low-confidence regions;</li>
<li>detect repeated headers and footers;</li>
<li>keep captions adjacent to their images or omit them explicitly;</li>
<li>compare extracted word counts against page coverage;</li>
<li>review representative pages before processing hundreds more.</li>
</ul>
<p>The goal is not pretty text. It is faithful reading order.</p>
<h2 id="copyright-does-not-disappear-when-the-voice-changes">Copyright does not disappear when the voice changes</h2>
<p>Accessibility does not turn every source into publishable audio. Personal conversion, licensed material, public-domain sources, and original documents have different rights boundaries. A technical pipeline still needs a content-policy gate before it distributes anything.</p>
<p>That gate belongs near the beginning, not after hours of paid narration.</p>
<h2 id="the-hidden-work-is-the-product">The hidden work is the product</h2>
<p>Voice quality gets the applause because it is what people hear. The reliability of the text pipeline determines whether they hear the right thing.</p>
<p>The real system is classification, extraction, OCR, layout repair, provenance, rights handling, chapter segmentation, partial-file safety, narration, joining, and delivery. Skip any one of those and the magical audiobook farm becomes a confident machine for reading scrambled pages aloud.</p>
<p>The OCR tax is not an edge case. For historical archives, it is the entrance fee.</p>
]]></content:encoded></item></channel></rss>