B.D. Murphy b63bc5bd0a Fix language selector being invisible; correct sample utterance types
The dropdown was in the HTML all along and still could not be seen. Three
separate causes, found by measuring the rendered element rather than
trusting that the markup existed:

1. Clipped off-screen. The h1 is a flex row with no wrap. Measured at an
   800px viewport: the language span started at x=620 and ended at x=810,
   past the viewport edge, so only its first few pixels were painted. The
   project badge alone took 309px. Adding flex-shrink and truncating the
   badge did not fix it - there is genuinely no room in that row. The
   selector now gets its own bar directly under the header, and the
   project name ellipsises. Verified visible: x=181, right=341 in an
   800px viewport, 34px tall.

2. Empty on every other page. base.html rendered the select from a
   `languages` variable that almost no page supplies, so the login page
   and the rest of the app showed a 38px-wide dropdown with zero options -
   effectively invisible, and a dead control. Pages now opt in by
   overriding a header_bar block. Verified /, /speakers, /chapters-audio
   and /login all still render.

3. Browser cache made my own screenshot lie. It showed a stale Japanese
   string containing the word "decisiveness" that is in no file on disk.
   A cache-busted fetch confirmed the server is clean. Worth remembering:
   a screenshot taken through a warm cache is not evidence.

The screenshot also exposed a data bug. All 12 sample utterances carried
type "narration" - including Kainda, Duchess Victoria, Deal Hunter, Nanny
and Trader Romano, who are all speaking. Every row rendered a narration
badge and the file told UmbraTrans that six characters were not speaking.
SHAPE in build_sample_translations.py now marks 6 dialogue / 6 narration,
and the generated JSONs are regenerated to match.

Also removed a misleading issue. It reported "12 rendered clips have no
staleness marker" as a translation problem; the markers are absent because
render_lang_test.py does not write them, so it was sending the reader after
a defect that does not exist. Replaced with the honest one: only 12 of
4,319 translated and none confirmed - sample only, not publishable.

Suite: 721 passed, 8 pre-existing. ruff clean on changed regions.
2026-10-14 08:06:38 -07:00

UmbraAudio

Quality-first multi-pass audiobook generation from English manuscripts.

Features

  • 5-pass pipeline: Analysis → Voice Design → Mapping → Test → Generate
  • Multi-engine TTS: Chatterbox (primary), Qwen3-TTS (secondary)
  • LLM-enhanced: BookNLP for NLP, LLM for profiling/emotion/pronunciation
  • Web review: FastAPI + HTMX at checkpoints for human approval

Quick Start

python -m umbraaudio.cli init <manuscript.epub> --name 'My Book'
python -m umbraaudio.cli analyze
python -m umbraaudio.cli voices
python -m umbraaudio.cli review

Requirements

  • Python 3.11+
  • NVIDIA GPU with CUDA support (RTX 3060 or better recommended)
  • ffmpeg

Development

pip install -e ".[dev]"
ruff check umbraaudio/
pytest tests/ -v

Commit cadence: commit at least once every Sunday. Never leave a week (let alone a month) of work uncommitted — a single accidental git checkout on 2026-09-20 wiped out a month of changes to umbraaudio/web/routes.py. See AGENTS.md → Commit Cadence.

scripts/commit_check.sh enforces the nudge: it exits non-zero once the tree has been dirty longer than a week. The LaunchAgent com.umbraaudio.commitcheck runs it every Sunday at 18:00 and posts a macOS notification when there is uncommitted work.

scripts/commit_check.sh            # warn if dirty > 7 days
scripts/commit_check.sh --days 3   # tighter threshold
scripts/commit_check.sh --any      # warn on any uncommitted change

Rebuilding from source

The repo tracks source only; large runtime data is reconstructed as needed.

  1. Models: weights are not committed (see .gitignore). Download them:

    bash scripts/download_models.sh   # ~9 GB, targets ./models
    
  2. Qwen3-TTS is a git submodule pinned to upstream commit 022e286:

    git submodule update --init --recursive
    

    The tts_server/web-demo backend includes a local UI customization to qwen_tts/cli/demo.py. It is preserved as a patch — reapply it after checking out the submodule:

    cd Qwen3-TTS && git apply ../scripts/qwen3_tts_demo_umbra_patch.patch
    
  3. Environment: copy/keep .env (contains secrets) and set UMBRA_TTS__* model paths under models/.

Book projects (e.g. DealHunterShip_...) are committed separately under their own project directories and are not part of this program repository.

Description
Quality-first multi-pass audiobook generation pipeline (5-pass: Analysis -> Voice Design -> Mapping -> Test -> Generate). FastAPI+HTMX review UI, Edge-TTS/Qwen3-TTS multi-engine voice, SQLite state.
Readme Apache-2.0 37 MiB
Languages
Python 84.8%
HTML 11.4%
Shell 3%
PLpgSQL 0.7%