Working pipeline · active development
Theophonia
Repairs Greek speech recognition errors with source audio and reference evidence, translates to English, and holds uncertain work behind explicit quality gates.
My role Pipeline architecture, implementation, retrieval, quality gates, and operation.
Recover the words before trusting the translation
A Greek lecturer quotes an old text or uses an unfamiliar name. Speech recognition substitutes a plausible word, drops part of a sentence, or repeats a phrase. A translation model can turn that damaged transcript into fluent English, hiding the original mistake.
I built Theophonia to recover those failures and make the result inspectable. It maps speech independently, corrects recognition errors with reference evidence, and returns to the exact audio window when the source needs another decode. Greek and English then face a bilingual review with a defined repair path.
The engineering is in the gates around that work. Each handoff checks its inputs, each failure has a bounded response, and every accepted change keeps its connection to the recording. A successful model call alone cannot authorize release.
Evidence checked September 14, 2026. These are recorded stage totals in the local archive. Completion counts do not certify publication or transcription accuracy.
How a lecture earns readiness
Models interpret language. Deterministic code checks structure, evidence identity, coverage, and permission to advance. Some failures reject a proposed edit while preserving the source; unresolved quality failures hold the affected revision.
-
Source integrity
ChecksExact source audio, ordered timestamps, and verified input hashes.
On failureWrong source, stale inputs, or broken lineage.
NextReject the handoff and rebuild from verified inputs.
-
Speech coverage
ChecksAn explicit outcome for every detected speech window.
On failureUnaccounted speech or an incomplete decode.
NextRecover affected windows and recheck the original speech map.
-
Greek correction
ChecksValid segment IDs, bounded edits, and retrieval evidence for larger changes.
On failureMalformed or excessive edits.
NextReject the edit, preserve raw Greek, and record the fallback for review.
-
Translation integrity
ChecksComplete, ordered passages and no unresolved translation failures.
On failureMissing, duplicated, or stale passages, or failed content markers.
NextRetry affected text and hold an incomplete revision.
-
Meaning and source risk
ChecksEvery Greek and English pair, terminology, references, and source evidence.
On failureMaterial errors, incomplete review, or deterministic high source risk.
NextRecord exact findings for repair. A ready review can advance.
-
Repair and certification
When repair is neededChecksAccepted source recovery, verified English, and current review evidence.
On failureFailed recovery, meaning defects, or unresolved findings.
NextPreserve accepted work, hold unresolved findings, and request fresh review explicitly.
-
Release readiness
ChecksA ready review, matching revisions, complete outputs, and valid media.
On failureOutdated evidence or an inconsistent publication bundle.
NextBlock publication until checks pass. The operator controls release.
How misunderstood speech becomes a supported correction
Recovery starts before language polish. One Silero voice activity detection pass creates an independent map of speech in the canonical recording. Whisper large v3 transcribes bounded groups of those windows. Coverage accounting requires an explicit outcome for every detected window, including an evidenced decision that no valid speech was recovered. Incomplete windows receive capped recovery attempts against the same map.
This exposes speech that could otherwise disappear silently. It also keeps a failed region from forcing another hour of successful transcription to run again. Source timestamps survive recovery, so recovered words return to their correct position.
For misunderstood words, a topic primer supplies lecture context and an indexed reference layer supplies candidate readings. The collections contain 36,437 scripture and liturgy anchors and 7,458 patristic anchors. Greek character trigrams allow approximate matching despite spelling, accent, and spacing differences. Distinctive words help separate a likely source from a merely familiar phrase.
The post editor has a concrete limit on how far it may rewrite a segment. Its normal edit distance cap is 25%. A larger correction, capped at 50%, requires all three retrieval checks: sufficient phrase overlap, distinctive word agreement, and a match among the highest ranked retrieved anchors. Malformed or excessive edits are rejected; the raw Greek remains available and the fallback is recorded.
Those checks constrain a proposed correction. They cannot prove what was spoken. The system therefore preserves the raw transcript, corrected Greek, timing, and decoder evidence for later source risk assessment. The review model reads that evidence; direct audio recovery happens through the speech decoder, with listening adjudication available to the operator.
Translation and review check different failure modes
Translation receives stable Greek passages, lecture context, and glossary guidance. Structural checks catch missing, duplicated, reordered, or stale passage identities. Failed translations receive up to three isolated retries. Successful passages remain reusable while unresolved text stays visible in a failure ledger and prevents translation readiness.
Bilingual review then examines every Greek and English passage together. It checks meaning, terminology, omissions, additions, names, numbers, and unsupported readings. Retrieved references remain evidence bound to that revision. They do not become a second transcript.
The source risk layer also compares raw recognition with corrected Greek and uses decoder uncertainty where available. A deterministic high source risk finding blocks readiness even if the review model overlooks it. Minor findings remain visible without automatically holding an otherwise accepted lecture.
This division matters. Glossary instructions guide the models; they are not a promise that every terminology rule is enforced by code. The blocking controls combine exact structural checks, source risk evidence, and a complete bilingual judgment.
Repair has a defined scope and stopping point
A finding names the affected passage, evidence, severity, and required action. An English defect retranslates that passage. A source defect can trigger one tightly bounded decode from the exact canonical audio, followed by the configured Greek post editor. Raw recovery text is preserved as evidence; only the normalized result can enter a child revision.
Recovery has its own acceptance checks for empty output, pathological repetition, known hallucination patterns, and implausible word density. The resulting English must then pass polarity checks and a separate whole passage semantic verifier against the accepted Greek. Material errors produce structured feedback for up to three translation attempts.
If an attempt fails, already accepted work survives. Any accepted Greek correction remains preserved, prior English is retained where translation failed, and unresolved findings stay held in an exact repair ledger. A later explicit retry can address only those unresolved findings.
Repair completion is not review clearance. The ordinary run stops at the repair boundary. An operator explicitly requests certification of the changed revision. Fresh review covers repaired passages and immediate neighbors only when every unaffected decision has provably identical evidence. Otherwise, the system falls back to a complete review. Release requires a current ready review and matching downstream artifacts.
A repair that can be traced
One recorded lecture repair changed three passages and reused the accepted transcription. Its repair record was marked ready. That demonstrates passage scoped correction and preserved lineage; the repair record alone does not establish final publication approval.
Stable passage identities connect the finding, before and after text, source timing, and repair decision. SHA 256 hashes bind artifacts to the exact transcript, glossary, prompts, policies, and evidence that produced them. An old review cannot silently approve new text. Unchanged passages can remain reusable because their identities and evidence are checked.
The final bundle is checked again for a ready review, consistent revision hashes, complete passage coverage, and valid output media. Source timing and generated media timing remain separate, so a changed rendering cannot rewrite the recording’s evidence clock. The operator controls the publication invocation.
Durable execution behind the quality gates
The coordinator uses SQLite task state, renewable worker leases, and fencing tokens. A recovered worker cannot overwrite the result of a newer lease. Idempotency keys include stage versions, semantic inputs, and configuration, allowing completed work to be reused after an interruption. Retries stay local to the failed task.
Execution status and quality disposition are separate records. A worker can finish successfully and persist a manual hold. That is a useful result: the operator receives a complete repair ledger instead of a crashed job or a falsely approved lecture.
The inspected archive demonstrates batch operation and a traceable repair, while the implementation shows the controls around those outputs. It does not establish a measured accuracy rate. A confident, plausible recognition error can still escape detection, which is why inspectable source evidence and operator judgment remain part of the system.
I built the Python coordination and quality layer around speech recognition, indexed retrieval, language model adapters, and immutable artifacts. The result is a recoverable workflow for specialist recordings: errors can be located, corrections can be challenged, and every release decision can be traced to the version actually reviewed.