Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit cef1b7e007b301f3a27a5f9ece83e5a2816ed2c5
parent 347e7fc1d76a2914e484207945f956218607ce1e
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Mon, 16 Nov 2026 07:41:03 -0500

plans: S1 rulings (one word, "reading") and S1's findings for S3

S1's text names `reading` end to end (ruled 16 Nov), its ranges, the
seed scheme and the CLI flags. Under S3, "Findings from S1": where each
synthesized read's spoken and shown text live, with file:line, including
the layout coupling through followParts / partRoles, the screen line's
missing saidAs, and playableAsWritten dropping a refused read.

Co-Authored-By: Claude <noreply@anthropic.com>

Diffstat:
Mplans/orpheus-retune.md | 93++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------
1 file changed, 76 insertions(+), 17 deletions(-)

diff --git a/plans/orpheus-retune.md b/plans/orpheus-retune.md @@ -65,19 +65,26 @@ not a new model. ### S1. The engine takes a tuning and a seed (`lane/orpheus-tuning`; plumbing, no UI) -- A synthesis may carry `tuning: { temperature?, top_p?, repeat_penalty?, min_p?, takes? }` and - `variant?: integer` (the seed is `ORPHEUS_SEED_BASE + 9973 × variant`, or an explicit `seed`; implementer - proposes). Each value is range-checked and refused in words when out of range. A missing value falls back to - `ORPHEUS_SAMPLER` and the settings, so **an ask without them is byte-identical to today's, cache hit - included** (pin that in a test). -- Tuning and seed go INTO the cache key: the same ask again is still free; "another reading" is a new key. -- The result JSON (and so a take's record) says the tuning and seed it was made with, so a reading can be - made again exactly, and its numbers can be copied into a character. +- A synthesis may carry `tuning: { temperature?, top_p?, top_k?, min_p?, repeat_penalty?, takes? }` and + `reading?: integer` (ruled 16 Nov: ONE word end to end — the ops body, the result, the sidecar, the cache + key, a card's `narration.reading`, a post take's `reading`, the CLI's `--reading N`; "variant" already + means a cut and a forked take in umtool). The seed base is `ORPHEUS_SEED_BASE + 9973 × reading`; there is + no explicit `seed`. Ranges (`common/lib/ttsTuning.mjs`): temperature 0.1–1.5, top_p 0.05–1, top_k 0–200 + (whole), min_p 0–0.5, repeat_penalty 1–2, takes 1–6 (whole), reading 0–99,999 (whole); each refused in a + sentence naming the field and its range. A missing value falls back to `ORPHEUS_SAMPLER` and + `tts.orpheus.takes` (no new setting), so **an ask without them is byte-identical to today's, cache hit + included**; a tuning equal to the defaults and reading 0 normalise to none (pinned against main's sha and + input.json literally). +- Tuning and reading go INTO the cache key only when non-default (no CACHE_KEY_VERSION bump): the same ask + again is still free; "another reading" is a new key. +- The result JSON, the cache sidecar and a post take's record say the effective tuning, the reading and the + seed base, so a reading can be made again exactly, and its numbers can be copied into a character. - Through every layer: `ttsApps.ts` → `ttsFile.ts` → `scripts/tts.mjs` → `tts_orpheus.py` (already reads them from input.json), the ops route, `pnpm ops tts`, `narrate-via-editor.mjs`, the post-narration - `take` op. Kokoro and eSpeak NG ignore a tuning and say so (a note, not an error). -- Docs: COMMANDS.md regenerated (`pnpm archilyzer docs cli`), SETTINGS.md if a settings default is added - (a site-wide `tts.orpheus.sampler` default is optional; the constant can stay the default). + `take` op and `umtool posts narrate <p> <item> --take [--reading N] [--temperature t] [--top-p p] + [--top-k k] [--min-p m] [--repeat-penalty r] [--chunk-takes n]` (refused with `--thread` / `--all` in S1). + Kokoro and eSpeak NG ignore a tuning and say so (a note, not an error). +- Docs: COMMANDS.md and umtool's docs/cli.md regenerated. ### S2. A character carries its tuning (`lane/character-tuning`; UI on the character preset + Voices page) @@ -87,12 +94,12 @@ not a new model. implementer's proposal for the operator to judge by ear; the numbers are always visible and editable. - **Try it, in the preset:** a text box (prefilled with a line this character actually reads in the project, or any line typed), **Read it** → a job → plays when done; **Another reading** = the same text - and tuning, the next variant; every audition stays in a short list (text, tuning, variant, Play), so + and tuning, the next reading (`reading` + 1); every audition stays in a short list (text, tuning, reading, Play), so two readings can be compared at one loudness (reuse the Voices page's audition player and its loudness match). - **Keep these settings** saves the tuning to the character (the cast's, or this video's own), through the CLI's own command: `umtool cast set <character> --temperature … --top-p … --repeat-penalty … - --takes …` (and the `cast project` twin). A kept reading's variant may be kept too ("use this voice's + --takes …` (and the `cast project` twin). A kept reading's number may be kept too ("use this voice's reading as the character's sample"). - Changing a character's tuning makes its existing reads stale, not re-made: the bench lists "N reads by this character were made with other settings · Re-read them" (one button, S4's queue). @@ -101,12 +108,12 @@ not a new model. - For every synthesized read (a post's script, a screen line, a card's narration, a thread read): the text is editable in place; the buttons are - - **Read again**: the same text, the next variant (a new reading, not the cache); + - **Read again**: the same text, the next reading (`reading` + 1, not the cache); - **Read edited text**: saves the text (the draft, as Save script does now) and reads it; - **Tune ▾**: this line's own tuning, prefilled from the character; "use for this line only" or "keep for the character" (→ S2's command). - When the job ends the new take **plays by itself** (a toggle, on by default) and joins the take list - with its text, tuning and variant; **Pick** makes it the one the cut plays. The previous pick stays one + with its text, tuning and reading; **Pick** makes it the one the cut plays. The previous pick stays one press away (no reading is ever deleted by re-running). - **One sentence only (S3b, optional within the lane or a follow-up):** a take's `parts` already carry each sentence's file, start and length. **Re-read this sentence** makes a new reading of one part and @@ -115,6 +122,58 @@ not a new model. - Recording is untouched: a recorded take, its enhance and convert chain, and the operator's `*.recorded-operator.*` files are not changed by any of this. +#### Findings from S1 (16 Nov): where each read's spoken and shown text live + +Paths under `umtool/`, line numbers at main 976efc77e. **No drawn character ever comes from spoken text** — +but for a post's script and a thread read the spoken text steers the LAYOUT, so S3's "byte-identical card" +test must pin the drawn structure (blocks, hidden paragraphs, tile modes), not only the characters. + +- **A post's script.** Spoken: `narration.script` → `spokenRead` (lib/report/postNarrationCli.mjs:356, + 379–381; app/api/report/post-narration/route.ts:302, 325; report-to-video/post-redact.mjs:389–418: anon + names, lexicon, redaction, slurs); the take keeps `script` and, when an anonymous handle changed it, `said` + (postNarrationCli.mjs:417–429). Shown: `cardText(entry)` = `entry.text` (report-to-video/post-item.mjs:111–114), + drawn by `wordsHtml` (:1141) in `postCardHtml` (:1372 plain card, :1461 thread tile) after `redactEntry` (:1301). + **Layout coupling:** read-follow `followParts` builds its blocks from the picked take's `parts[].text`, else + `take.script`, else `narration.script` (report-to-video/read-follow.mjs:203–213); `followBlocks` (:227–283) + matches them to the card's words and wraps them as `data-post-block` (post-item.mjs:1159) — the lit/dim + highlight and the pan. In an excerpt thread tile, blocks no part reads are `display:none` + (post-item.mjs:1385, 1428, 1447, 1496), so an edited script can HIDE drawn paragraphs. `partRoles` falls + back to the script (report-to-video/post-thread.mjs:221–223) and `threadLayout` uses the roles for tile + modes, quoted above/inside and which screens are drawn (:296–298, 319–353, 368); the script counts as a + form of the "post" text when roles are matched (:167). Captions: the chip text is `fx.text` + (post-caption.mjs:9), matched against the card text (:74, :165); only its timing comes from `take.words` + (:131–135) or a script estimate (:137–147). +- **A screen line.** Stored: `timeline[i].screens[j].lines[n].text`, with `read` (all / none / spans), + `who`, `lineTakes` (report-to-video/post-screens.mjs:13–16). Spoken AND shown come from the same `viewOf` + span: `said` and `shown: cut` (post-screens.mjs:264–266) → `screenLineSaid` (:287), `screenPieces` + (:610–617), `chronoPieces` (post-thread.mjs:1343), `draftScript` + `spokenRead` + (lib/report/postThreadRead.mjs:234–235); `lineToRecord` the same (lib/report/screenLineRecord.mjs:60–64); + drawn by `screenRows` (:342) → `screenTileHtml` (:683–740). **There is no per-line "said as" override + today** — only the lexicon (`red.say`, item-scopable; post-redact.mjs:235–236, 397–399), applied to speech + only. Editing `lines[n].text` changes both sides, and the old take is then refused (`screenLineChanged`, + post-thread.mjs:710–727, :573). **S3 needs `saidAs.<n>`**, defaulting to the shown line. +- **A card's narration.** Spoken only: `narration.text` (report-to-video/narration.mjs:88, 101–110; + `narrationsOf` :125–131). Never drawn: render-cards.mjs never reads it; `buildNarratedCardSegment` + (build-video.mjs:2949–2969) uses only its measured seconds (:2956, 7255–7257); burned captions come from + the clip transcript (build-video.mjs:2193–2206, `lookWordsFor` :2276–2280); the disclosure line + (narration.mjs:319–343) goes to the description. Editing it changes only the card's length. +- **A thread read.** Spoken pieces: `chronoPieces` (post-thread.mjs:1330–1345) — parents and quoted posts + their `contextText` (the paraphrase, else the text; post-item.mjs:224–226), linked posts `contextText` + + transcript, his post `narration.script` else `draftScript(cardText)` (postThreadRead.mjs:180–181, 268), + screens their lines; each through `spokenRead` (:273), parts storing the spoken text (:401–403). An + attachment is never read by itself ("media:<i>" is only inferred when a part matches no card text, + post-thread.mjs:259–260). Shown: the tiles draw the same `contextText` / `cardText` (post-item.mjs:1420–1438 + parents/linked, :1449 quoted, :1455–1461 post, :1484–1490 screens). Same structural coupling as a post's + script (parts drive blocks, excerpt hiding and inferred roles). +- **"A read may not say what a screen masks"** lives in post-thread.mjs, not post-redact.mjs: + `readSaysHiddenErrors` (:624–660) checks `take.parts[].text`, else `take.said || take.script` (:647), against + the screens' `shapeSpans` (:640–643) and lines marked `redact`; `screenPartErrors` (:577–579); both gathered + in `itemReadRefusals` (:599–609), called by lib/report/postScreensCli.mjs:260 and the build's lint (:588). + It already judges the SPOKEN text. +- **Surprise:** when a read is refused, `playableAsWritten` drops `narration` (post-thread.mjs:695–699), so + the item previews un-narrated and un-threaded and its drawn layout changes — a bad spoken edit on an item + with screens changes the preview. + ### S4. Find and replace over the whole video, and the re-read queue (`lane/reads-find`) - A **Reads** view per project (a tab of the workspace, or a section of the Voices page; implementer @@ -164,10 +223,10 @@ All four answered 15 Nov (see "Operator rulings" above). None is open. ## Done means -- From the post bench, a line can be re-typed, re-read with a new variant or a new tuning, heard on +- From the post bench, a line can be re-typed, re-read with a new reading or a new tuning, heard on arrival, and picked, with no agent. - A character's tuning can be auditioned and kept from its preset. - A word can be found across every read of a video, replaced (words or pronunciation), the changed lines re-read in one press and listened through. -- Asks with no tuning and no variant still produce byte-identical audio and cache hits. +- Asks with no tuning and no reading still produce byte-identical audio and cache hits. - No edit to a read ever changes what is shown on screen.