Commit Graph

163 Commits

Author SHA1 Message Date
4c8022e8aa refactor: extract audiobook stylesheet 2026-09-04 11:44:55 +02:00
065445a20a refactor: extract rehearser stylesheet 2026-09-04 11:42:43 +02:00
eb008475ed refactor: extract rehearser cast renderer 2026-09-04 11:39:45 +02:00
ae9df4f7f0 feat: distinguish provider configuration and health 2026-09-04 11:35:52 +02:00
7c14f41cb9 refactor: extract audiobook speaker normalization 2026-09-04 11:32:20 +02:00
0d1299b19c refactor: extract audiobook cast cleanup 2026-09-04 11:30:12 +02:00
1951ce0646 refactor: extract audiobook dialogue merging 2026-09-04 11:27:49 +02:00
41349867a1 refactor: extract audiobook cast normalization 2026-09-04 11:25:52 +02:00
0876527554 refactor: extract audiobook quote segmentation 2026-09-04 11:22:15 +02:00
2fde0a176d refactor: extract rehearser voice design 2026-09-04 11:19:01 +02:00
d43959728d refactor: split voice design styles 2026-09-04 11:16:05 +02:00
de099d30c5 refactor: split background job styles 2026-09-04 11:13:36 +02:00
8d9a172993 refactor: split resource diagnostics styles 2026-09-04 11:10:43 +02:00
c0ac5dd775 refactor: extract audiobook cast serialization 2026-09-04 11:08:49 +02:00
d3bc806f33 refactor: extract rehearser training comparison 2026-09-04 11:06:23 +02:00
d613591526 refactor: extract rehearser cast controls 2026-09-04 11:04:13 +02:00
ed3b2d42cd refactor: publish feature APIs through TTVC 2026-09-04 11:00:22 +02:00
e2e20fa89f feat: add request correlation diagnostics 2026-09-04 10:58:46 +02:00
66ebd1a8b8 refactor: extract audiobook parsing primitives 2026-09-04 10:56:31 +02:00
0bfb6d694b refactor: extract rehearser voice picker 2026-09-04 10:54:21 +02:00
e98c5ffe33 refactor: extract rehearser stage controls 2026-09-04 10:52:05 +02:00
b1374c50a0 fix: synchronize frontend release cache version 2026-09-04 10:36:44 +02:00
fe807d1682 Release v1.22.2 2026-09-03 16:12:02 +02:00
2d5ecea53a Release completed voice preview blob URLs 2026-08-19 22:05:31 +02:00
25264517a9 Clean up converted upload sources 2026-08-19 18:41:31 +02:00
e452b0f000 Write voice metadata atomically 2026-08-19 18:39:11 +02:00
d3fc2d44ae Add configurable web container memory limits 2026-08-19 18:35:34 +02:00
fd8f545d16 Optimize offscreen character table rendering 2026-08-19 18:35:10 +02:00
08a6544661 Lazy load character artwork 2026-08-19 17:12:45 +02:00
aa15265021 Show generated voice file and preview in character profiles 2026-08-19 17:12:02 +02:00
8cc92ca02b Add low-memory client concurrency guard 2026-08-19 17:01:06 +02:00
388fd601ab Release v1.20.38 2026-08-19 16:36:26 +02:00
189ca51e47 Release v1.20.37 2026-08-19 16:04:30 +02:00
62274a17fc Improve Studio casting and character voice design (v1.20.36) 2026-08-15 13:20:38 +02:00
35cb21ad70 Reject phantom speakers invented from German noun phrases (v1.20.35)
The caster emits fragments of noun phrases as characters — "in seinem Inneren"
-> Inneren, "die Hand" -> Hand, "mein Geliebter" -> Geliebten, "der Wind" ->
Wind. Each became a cast entry with its own voice while the real speaker's line
was lost to a phantom; measured against a hand-corrected book this was a large
part of why a fresh cast produced 73 speakers where the human had 62.

Such lines are now reset to Unknown — visibly unresolved and still recoverable
by the repair passes, rather than silently wrong. Applied to a real cast:
5 phantoms removed, 73 -> 68 speakers.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 16:52:27 +02:00
4d3e4f8e7c Consolidate speaker labels after recast passes too, not only after casting (v1.20.34)
Consolidation ran only at cast completion, but recast/repair passes assign
speakers of their own and can re-introduce the variants just removed —
confirmed live: a freshly cast book gained "Alrik" alongside "Alrik von
Blautann" during auto-repair, splitting one character across two voices again.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 14:57:56 +02:00
cd5c325265 Consolidate speaker label variants after casting (v1.20.33)
One character is referred to by several labels across a book — bare vs full
name, a title on its own, a stray fragment — and each variant became its own
cast entry with its own voice, so the character audibly changed voice
mid-scene. Measured against a hand-corrected book this accounted for more of
the disagreements than genuine misattributions.

Variants are folded together only when one label's words are a strict subset
of another's after stripping articles and titles, so "Weber" and "Alter Weber"
stay separate and unrelated names never merge. Applied to a real cast:
Sharraz -> Sharraz Garthai, Baronin -> Baronin Ira von Seewiesen,
Von -> Oberst Alrik von Blautann (40 lines, 58 -> 54 speakers).

Also moves the quotation-mark toggle into the A- / A+ toolbar row.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 13:34:40 +02:00
f837ba1a4f Toggle quotation marks with CSS instead of rewriting text (v1.20.31)
CSS cannot target a character inside a text node, so the marks are now wrapped
in their own .ab-q element at render time and hidden with a single class on
body. Toggling is instant regardless of segment count, and the stored text is
never modified.

Also fixes the toggle looking inert on a freshly cast book: it previously only
added missing marks and never hid the ones the book already carried. Button
moved bottom-right as a larger labelled pill, clear of the search controls.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 13:14:35 +02:00
55f634e626 Show quotation marks in the casting script, with a toggle (v1.20.29)
German prose never quotes narration, so displaying the guillemets makes a
mislabeled line obvious at a glance. Extraction strips them from ~80% of
segments, so they are rendered rather than stored: dialogue rows display
wrapped in » «, lines that kept their own marks are left as-is, and the saved
text is untouched so synthesis and exports are unaffected. A toolbar button
toggles visibility and the choice persists.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 10:51:46 +02:00
ca654608ac Never merge adjacent Unknown dialogue lines into one segment (v1.20.27)
Adjacent segments merge when they share a speaker, but an unattributed line
carries the speaker "Unknown", so two consecutive Unknown lines compared as
equal and were fused into a single block joined by a blank line. Confirmed
against the source text: Lysandra's line and Perdia's interruption — two
separate paragraphs in the book — became one segment, after which no
attribution pass could separate them and one voice would read both sides of
the exchange.

"Unknown" means the speaker is not known, never that two lines share one.
Narration and lines with a real speaker name merge exactly as before.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 10:46:55 +02:00
14ed0c89e7 Do not auto-attribute segments that fuse several speakers' turns (v1.20.26)
A trailing inquit names only the last speaker, so applying it to a block
holding multiple turns silently mis-credited the earlier one — a wrong
attribution is invisible where an Unknown is not. Such blocks are now skipped
by the grammar rules and left for the LLM pass or a manual split.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 10:44:34 +02:00
4d6eb7bd78 Attribute quotes from a following "X's Stimme" narration (v1.20.25)
"Darrags Stimme klang tonlos." after a quote names who just spoke, but the
voice-announcement rule only looked at the narration before a line, so this
mirror image stayed Unknown. Verified on the book (-> Darrag).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 10:43:12 +02:00
d3b162f81f Extend German inquit attribution: missing verbs, subject choice, mistyped inquits (v1.20.24)
Driven by unresolved lines in a real German novel:

- AB_SPEECH_VERBS was missing many common inquit verbs (grunzte, versetzte,
  unterbrach, drängte, herrschte, keuchte, erklärte, widersprach, warf ein …)
  and had no thought verbs at all, so inner monologue ("dachte Lysandra") was
  never attributed.
- A trailing inquit naming two people ("unterbrach die blonde Perdia Lysandra")
  resolved to the wrong one; the grammatical subject speaks, so articles and
  adjectives are skipped and the first name after the verb wins.
- A quote whose own inquit had been mistyped as dialogue could never resolve,
  because the rule required the following segment to be narration. A segment
  opening with a lower-case speech verb is an inquit whatever its type; it is
  now accepted and its type corrected.

Verified on the book: resolves further lines with no LLM call.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 10:41:06 +02:00
3434293375 Prefer the newest casting draft instead of always trusting localStorage (v1.20.22)
Opening a book always restored the localStorage draft and then pushed it to the
server as a backfill, so a tab holding an older copy silently overwrote newer
work saved from anywhere else — confirmed live: a cast improved from 79 Unknown
lines to 25 was destroyed by opening the book in a stale tab. Local and server
drafts are now compared by savedAt, the newest wins and is cached locally, and
the server is only backfilled when the local copy is actually newer.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 10:29:53 +02:00
63ec69ad89 Resolve pronoun-inquit split quotes, use verification prompt for repair pass (v1.20.21)
Two gaps found by validating the repair chain against a real German novel:

Split quotes whose inquit uses a pronoun rather than a name (»Ja, ungewöhnlich«
+ ", antwortete er knapp.") stayed Unknown, because every existing rule
requires a literal name after the speech verb. The antecedent is unambiguous,
so it now resolves the same way the colon rule does — to the last character
named in the narration immediately before the quote. Verified on the book: 2
further lines resolved with no LLM call, including the reported case.

The repairNarration pass also only received the verification prompt when
launched from the menu button; called from auto-repair or programmatically it
fell back to the general casting prompt, which is not written for the "is this
narration actually speech?" question. It now defaults to the verification
prompt in every entry path.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 10:23:15 +02:00
30bac15b6e Open toolbar flyout menus downwards when there is room (v1.20.18)
The Identify/Cast flyouts were hard-anchored to open above their trigger,
which suited the casting panel's bottom footer but clipped them off the top of
the screen in Studio, where the same toolbar sits near the top — the first two
entries were unreachable. They now pick the side with space, prefer opening
downwards, stay clamped inside the viewport and scroll if taller than it.

Also reorders the Identify menu to the sequence the passes should run in, with
the one-click Auto-repair cast first.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 08:47:17 +02:00
4c686165b3 Add targeted dialogue-repair pass and auto-repair chain, fix rollback on stopped runs (v1.20.16)
Spoken lines that PDF extraction typed as narration were invisible to
"Identify unknown characters" (it only scans type==='dialogue'), so no number
of re-runs could fix them, while the pass that could re-sent all ~1000
narration segments to the LLM. Adds a detector that scores narration for
direct-speech signals and re-checks only those: 36 candidates instead of 1036
on a real novel. Adds "Auto-repair cast" to chain the passes in the right
order automatically after casting.

Also fixes a rollback gap where stopping a run skipped the safety net that
undoes a pass which increased Unknown speakers (confirmed live: 80 -> 159
with no warning), corrects an attribution rule that taught the model the
listener is the speaker, and stops the threshold loop from re-verifying every
narration segment each round.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 08:40:38 +02:00
193cbb202d Fix Fish-Speech 0-voices bug, add inline emotion-tag reference to Try It Out (v1.20.8)
Fish-Speech clones from the app's own saved WAV library but was missing from
the set of backends populated with those voices, so the UI probed the Fish
server for a voice-listing endpoint it does not have, showed "Fetched 0
voices" and left the engine unusable despite being healthy. It now reports
the full library (218 voices).

Also adds a Fish-only panel listing all 49 documented emotion tags with
click-to-insert and a multi-emotion example, and corrects the backend's
advertised capabilities: it was flagged style_aware with "emotion markers are
honoured per request", but measurement shows a reference clip's in-context
prosody overwhelms inline tags (10x loudness spread across emotions without a
reference, 1.2x with one). It is now described by what it does well:
deterministic, byte-reproducible cloning.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 00:08:36 +02:00
003e4f9f46 Fix bundle-breaking TDZ throw, use English emotion instructs, forward Fish gen params (v1.20.6)
The emotion quick-pickers added in 1.20.5 guarded with
`typeof REH_EMOTIONS === 'undefined'`, but REH_EMOTIONS is a const declared
later in the bundle's single shared scope — `typeof` on a const in its
temporal dead zone throws instead of returning "undefined", which aborted
top-level initialization for every module bundled after tts-preview.js.
The pickers now read window.REH_EMOTIONS on a deferred macrotask.

Also: emotion instructions are now always built in English (spoken text and
the native-accent clause stay in the book's language), which controlled A/B
testing showed produces a far cleaner prosodic gradient from Qwen3-TTS; and
Fish-Speech now receives temperature/top_p/repetition_penalty, which it was
the only backend never to have forwarded.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-11 22:00:56 +02:00
5fecbf06d4 Fix Fish-Speech emotion tags, wire book context into portraits, add emotion controls app-wide (v1.20.5)
Fish-Speech emotion tags were silently ignored on non-English books: per-line
emotions are LLM-generated in the book's own language, but Fish-Speech only
recognizes English [tag] markers, and a double-tagging bug was stacking a
broken server-derived tag on top of the client's own. Added a DE->EN
translation table and removed the double-tagging. Also wires the existing
book-profile context and race_species field into character portrait prompts
(previously only used for voice design), adds a recast-until-threshold loop
for casting, and adds backend-aware emotion quick-picks to Read Aloud, Try a
Voice, and Conversation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-11 18:02:41 +02:00