Working pipeline · active development
Theophonia
How we recover the words in Greek recordings, translate their meaning, and check what English listeners actually hear.
My role Pipeline architecture, implementation, retrieval, quality gates, and operation.
Recover the words before trusting the translation
Theophonia works with an archive of 2,000 Greek lectures. A 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 so we can trace an English passage back to the moment it was spoken. Speech recognition maps the Greek, a specialist editor checks possible mishearings, and a bilingual reviewer compares the translation with the corrected source. We check the finished narration against the approved English as well.
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
Map the speech first
Silero marks where speech occurs in the original recording. Whisper large-v3 then transcribes those windows in groups.
Every window needs an outcome. If the decoder recovers no speech, it must record the evidence. Incomplete windows get a limited number of retries against the same map.
Before decoding, Whisper gets a short prompt of theological terms ranked by priority. A later pass catches phrases where the recognizer got stuck in a loop. Liturgical repetition has its own rules, so a prayer such as “Lord, have mercy” can repeat as spoken. Every recovered word keeps its source timing.
Correct only with evidence
A topic primer tells the editor what the lecture is about. To check a possible quotation, it can search 36,437 Scripture and liturgy passages and 7,458 passages from the Church Fathers. Searching overlapping groups of three Greek characters helps find a match despite differences in spelling, accents, or spacing. Distinctive words separate a likely source from a merely familiar phrase.
The editor reads the neighboring speech and looks up short segments one at a time. After “the Lord says,” a strong match can support a correction inside the quotation. The introduction and the lecturer’s commentary stay as spoken. A weak echo stays a hint.
Edit bounds
- 25% edit distance is the normal limit.
- Above 25%, up to 50%, a correction also requires phrase overlap, agreement on distinctive words and a match among the highest ranked references.
If a proposed edit fails those checks, the raw Greek survives for review.
Translation and review check different failure modes
After Greek editing, the system builds a fresh lecture summary for translation. The translator can read the surrounding paragraphs to resolve a pronoun or follow an argument. It returns English only for the assigned passages, with their original IDs.
The translator can reorder Greek syntax so a sentence sounds natural aloud. Names, citations, and doctrinal terms have tighter instructions. The glossary contains 173 entries, including 89 with specific usage rules.
The listener hears the speaker’s technical term and learns its meaning the first time it appears.
Code checks for missing, duplicated, reordered, or stale passage IDs. A failed translation gets up to three isolated retries. Bilingual review then checks each Greek and English pair for omissions, additions, terminology, names, and numbers.
Every passage pairs edited Greek with English. The system adds source evidence as needed.
- Recognition signals For every passage
The reviewer sees edit counts, repetition and any available recognition confidence.
- Changes in context When the Greek wording changes
The reviewer also sees which words changed and their positions in the Greek.
- Original transcript excerpt When source risk is high or the comparison is cut short
The reviewer also receives up to 2,000 characters of raw Greek transcription.
A large unexplained Greek edit or a combination of low decoder confidence and substantial changes can place a passage on hold even if the reviewer overlooks it. An operator can return to the original audio to resolve the finding.
Repair has a defined scope and stopping point
Each finding names the affected passage, its evidence, its severity and the required action. The type of defect decides the route.
- If the English is wrong
- Retranslate the affected passage from the accepted Greek.
- If the Greek is in doubt
- The system can decode the disputed audio window once and send it through the Greek editor. It keeps the raw result as evidence. Only the edited Greek can enter a new revision.
What a repair must pass
The system screens recovered text for empty output, repeated loops, known hallucinations, and implausible word counts for the duration of the clip.
Code checks whether the English adds or drops a negation. A separate verifier reads the whole English passage against the accepted Greek.
“The other day” can preserve the meaning when the exact day is incidental. A dropped “not” or a change in who spoke can reverse it. For a material error, the verifier cites the Greek and English and sends feedback for up to three translation attempts.
When an attempt fails
If translation fails, the system keeps any accepted Greek correction and the prior English. The repair ledger lists the unresolved findings so an operator can retry just those passages.
Where repair stops
Repair ends with a new revision. The operator requests a separate review before it can advance.
That review covers only the repaired passages and their immediate neighbors when every unaffected decision has provably identical evidence. Otherwise the system falls back to a complete review. The lecture can advance once that review passes and the outputs match the reviewed revision.
A repair that can be traced
In one recorded repair, three passages changed. The system reused the accepted transcription and kept the before and after text, source timestamps, and decision for each passage.
What makes a review reusable? Each passage has a stable ID. SHA-256 hashes identify its transcript, glossary, prompts, policies, and evidence. A previous decision carries forward only when its inputs still match.
Before publication, the coordinator checks the current review, revision hashes, passage coverage, and output media. Greek source timestamps stay tied to the recording even if the English audio changes length. The operator makes the final decision.
Checking what listeners hear
The narrator reads a separate, reviewed copy of the English. Connected sentences stay together so the voice carries a thought across a pause. Each clip keeps its source paragraph ID.
Any wording change for spoken delivery goes through review. The approved translation stays available for comparison.
Rendering checks
Each clip uses a pinned voice reference and model configuration. The renderer checks for speech throughout the clip and for a plausible duration given the word count. During assembly, punctuation guides the pauses and a common loudness target keeps the volume consistent.
Checking the words against the script
We transcribe the generated English audio and compare it with the approved words for that passage. A missing phrase, repeated speech or an unexpectedly long passage can trigger a second decode with shifted audio windows.
If the words reappear, the first checker may have clipped the phrase at a window boundary.
If the mismatch persists, we can inspect and regenerate the affected passage while keeping the accepted audio around it.
The final English captions follow the timing of the rendered passages. A reviewer can use the passage ID to find the corresponding moment in the original Greek.
How readers find a lecture by phrase or subject
A remembered phrase can match the indexed transcript and bring back a passage excerpt. A subject search can also find lectures through BGE-M3 embeddings of lecture metadata. The search page labels a result drawn from a summary, so readers can tell where the match came from. Keyword search remains available if the semantic lookup fails.
Engineering at archive scale
Bringing older transcripts into review
The importer verifies that the recording matches its stored hash and checks the imported passage timestamps against the recording. It looks for speech in the gaps, decodes eligible windows, and translates the recovered words. The restored passages go back in source order for a full bilingual review.
Sharing a speech model
One lecture can enter review while the next is being transcribed. When the reviewer flags audio for another decode, the repair worker uses the same loaded Whisper model as transcription. When both need it, each has four of eight decoding slots by default. Either can borrow idle slots.
Independent repairs can run together. A passage that depends on an earlier edit waits until that edit is saved.
Picking up after an interruption
- Reuse a result. The worker checks the passage, model, prompt policy, and inputs against a saved response, then verifies its hash. A changed input requires a fresh result.
- Protect the newer attempt. SQLite records who owns each task. Renewable leases and fencing tokens prevent a worker returning late from overwriting a newer result.
- Retry the affected task. An idempotency key derived from the stage version, inputs, and configuration lets completed tasks survive a restart. A finished task can still leave a passage on hold for review.
Transcription and narration can run on remote GPU workers. The coordinator decides which results advance and records call durations and known queue waits. The timing record also flags retries and cache hits.