Commit Graph

5 Commits

Author SHA1 Message Date
e7cb92c572 feat(audiobook): span-mode casting - deterministic quote spans, LLM only names speakers
Split the book into narration/dialogue spans from its own quotation marks and ask
the LLM only who speaks each dialogue span (POST /api/attribute-spans), so text can
no longer be fused, dropped or duplicated and a novel takes ~10 min instead of ~4 h.
Book 1 vs the hand-corrected reference: every-word-right 87.0% -> 92.3%, type
agreement 93.6% -> 97.4%; Books 2/3 (not tuned on) 90.8% / 89.9%.

- static/js/audiobook-spans.js (pure, unit-tested) + audiobook-cast-spans.js
- core/attribution_spans.py, route, tests; scripts/score_attribution.py
- default on; localStorage ab-span-mode=0 restores the classic engine
- architecture/audiobook-attribution.md, Manual, CHANGELOG 1.32.0, TODO

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-19 08:30:26 +02:00
2caa417401 fix: preserve audiobook dialogue boundaries 2026-09-04 15:36:26 +02:00
cc4fc4ae2e refactor: scope audiobook state modules 2026-09-04 12:26:21 +02:00
302dbe1279 refactor: scope pure frontend leaves 2026-09-04 12:20:33 +02:00
76421dfe88 refactor: extract audiobook casting pipeline 2026-09-04 12:04:05 +02:00