Files
UmbraAudio/specs
Umbra Tools c476cfea1d Ingest the translation delivery, and stop mis-reporting locale codes
UmbraTrans delivers one row per utterance per target language, in the shape
translations.import_translations already accepts. There was no script to run
that ingest, so the delivery side of the contract existed only as a function.

scripts/import_translations.py runs it: report-only by default, --write to
store, --confirm to store as confirmed rather than draft. It prints the
coverage before and after, so a delivery can be checked without writing it.

Two bugs in the ingest, both found by running a real delivery:

* import_translations folded the target language with lang.normalize, which
  does not know script subtags. A delivery labelled "zh-Hans" - which is
  what UmbraTrans writes - matched nothing, so every row was dropped and
  reported as a problem. It now folds with canonical_code, and an unknown
  language is still stored: the text is reviewable even when the render
  will be refused.

* coverage and not_voiced_rows compared the stored code to the requested
  code as strings, so a row stored as "zh-Hans" read as "nothing delivered"
  when the reviewer asked about "zh". The coverage report was wrong in the
  direction that makes a reviewer distrust it.

Measured on the real Deal Hunter Chinese delivery: 4,300 rows ingested, the
review UI's resolver then renders Chinese for 12/12 utterances of chapter 1
and 415/416 of chapter 6 - the missing one being the spoken chapter
announcement, which is deliberately not part of the reading edition.

spec 27 records what the shipped samples actually are: single-pass drafts
made against a hand-cleaned paraphrase of the English, matching the
speaker-verified database text in 0 of 12 utterances. The production Chinese
edition on oldbox does use the intent-based process; what it lacked was the
alignment back onto the utterances, which is now implemented in UmbraTrans.

7 new tests. Suite: 890 passed, 8 failed (the same 8 pre-existing failures).
2026-11-06 19:14:38 -08:00
..

UmbraAudio Specifications

Index of all specification documents for the UmbraAudio audiobook generation system.

Specifications

File Topic Description
00-project-overview.md Architecture Pipeline overview, tech stack, data layout
01-parsing.md Pass 1a EPUB, PDF, TXT, MD manuscript parsing
02-analysis.md Pass 1b BookNLP, character profiling, pronunciation
03-voice-design.md Pass 2 Per-character voice reference generation
04-mapping.md Pass 3 Text segmentation, speaker attribution, manifests
05-generation.md Pass 5 Audio generation, caching, retry, CUDA management
06-normalization-watermarking.md Post-gen Audio normalization, ACX compliance, Perth watermark
07-assembly-export.md Export M4B, MP3, WAV export via FFmpeg
08-database.md Database SQLite schema, entity relationships, CRUD API
09-web-review-ui.md Web UI FastAPI + HTMX review interface
10-cli-orchestrator.md CLI Click commands, full pipeline orchestration
11-configuration-dependencies.md Config Pydantic settings, dependencies, build system
12-quality.md Quality MOS, WER, consistency, ACX compliance
18-UmbraTrans.md Multilingual Meaning-preserving translation, target voices, and multilingual audiobook production
19-enterprise-control-plane.md Enterprise Multi-tenant projects, access control, artifact lineage, and commercial voice library
20-enterprise-database-integration.md Enterprise DB Shared-PostgreSQL contract, blockers, cutover phases P1-P4
21-umbra-system-nodes-tasks-and-changes.md System Worker nodes, task assignment, cross-product change management, UI topology
22-releases-and-the-publish-flag.md Release The publish flag, pinned artifact sets, post-publication change, and the Deal Hunter lesson
23-speaker-duplicate-detection.md Speakers Duplicate-speaker scan, approval-safe merging, and the crowd veto
24-analysis-quality-plan.md Analysis Why the ch6 speakers were missed, and a ranked plan to improve attribution

Quick Reference

Pipeline Passes

1a: Parse    → chapters table
1b: Analyze  → characters, pronunciation_guide
2:  Voices   → voice_ref WAVs
3:  Map      → manifests/*.json
4:  Test     → sample audio (optional)
5:  Generate → audio/*.wav, audio_normalized/*.wav
    Export   → export/*.m4b, *.mp3

Key Entry Points

Component File Class/Function
CLI cli.py main Click group
Pipeline orchestrator.py run_pipeline()
TTS voices/chatterbox.py ChatterboxEngine
Segmenter mapping/segmenter.py Segmenter
Generator generation/chapter.py ChapterGenerator
Normalizer assembly/normalize.py AudioNormalizer
Web UI web/__init__.py create_app()
Database database.py Database