Archilyzer · Source

archilyzer

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

commit c1ae12fdd0cf16632b83d531456ff6b9c11033fe
parent c519e4e8e1bc3b358a3ac4fc867e3d6dccb0d48d
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Fri,  6 Nov 2026 22:32:58 -0500

umtool cast audition: by default a line of the character's own with enough words to hear (and score) a voice by, else its longest; an unscored candidate says why

Against quartering-diet (a scratch copy, the live editor's Kokoro, TitaNet through the heavy slot):
his first line was "291." -- too little speech to score. The first own line of 8+ words scores
am_michael 0.184, am_onyx 0.142, am_fenrir 0.058, am_adam 0.000 against Jeremy's clips: the
ranking the hand-made score gave tonight.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Mumtool/components/projects/VoicesPanel.tsx | 2+-
Mumtool/e2e/fixtures/voices-fixture.mjs | 4++--
Mumtool/lib/report/castAudition.mjs | 12++++++++++--
Mumtool/lib/report/castCli.mjs | 3++-
4 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/umtool/components/projects/VoicesPanel.tsx b/umtool/components/projects/VoicesPanel.tsx @@ -339,7 +339,7 @@ export default function VoicesPanel({ project, posts, initialWho = null }: { pro <label className="inline-flex items-center gap-1.5"> <span className="text-muted">the line</span> <select data-audition-line="" value={line} onChange={(e) => setLine(e.target.value)} className={cn(input, "max-w-[28rem]")}> - {chosen.lines.length > 0 && <option value="first">its first line here</option>} + {chosen.lines.length > 0 && <option value="first">a line of its own here (8+ words)</option>} {chosen.lines.map((l) => ( <option key={`${l.item}:${l.text}`} value={`item:${l.item}`}> {l.item}: {l.text.slice(0, 70)} diff --git a/umtool/e2e/fixtures/voices-fixture.mjs b/umtool/e2e/fixtures/voices-fixture.mjs @@ -51,9 +51,9 @@ export function makeVoicesFixture({ reports, channels, manifest, ff }) { post("1", "hostman", "Host Man", "Host's first line, read aloud.", { narration: { script: "Host's first line, read aloud.", takes: [{ file: "narration/posts/1/take-1.orpheus-zac.wav", engine: "orpheus", voice: "zac", seconds: 2, script: "Host's first line, read aloud.", at: "2026-11-02T00:00:00.000Z" }], pick: 0 }, }), - post("2", "hostman", "Host Man", "And the host answers the guest.", { + post("2", "hostman", "Host Man", "Host answers the guest.", { parents: [{ id: "20", handle: "guest", author: "The Guest", date: "2026-10-30T09:00:00.000Z", text: "The guest asks a question first." }], - narration: { script: "And the host answers the guest." }, + narration: { script: "Host answers the guest." }, }), post("3", "guest", "The Guest", "The guest's own line.", { narration: { script: "The guest's own line." } }), ); diff --git a/umtool/lib/report/castAudition.mjs b/umtool/lib/report/castAudition.mjs @@ -126,7 +126,7 @@ export async function auditionCharacter(cast, who, { project = null, manifest = /** * THE LINE an audition reads: `text`, else the character's line from `item`, else its `line`-th (1-based), else its - * first in the project, else STOCK_LINE -- cut to one part, and with a project WHAT A VOICE SAYS (its redaction, slur + * first own line of AUDITION_MIN_WORDS words or more (else its longest: defaultLine), else STOCK_LINE -- cut to one part, and with a project WHAT A VOICE SAYS (its redaction, slur * filter -- a slur skipped -- and lexicon). Returns `{ text, from }` (`from`: "text", "item:<id>", "stock"). */ export async function auditionLine(project, manifest, character, { text = null, item = null, line = null } = {}) { @@ -137,7 +137,7 @@ export async function auditionLine(project, manifest, character, { text = null, let e = null; if (!t && manifest) { const lines = characterLines(manifest, character.handles ?? []); - const pick = item ? lines.find((l) => l.item === item) : line ? lines[Number(line) - 1] : lines[0]; + const pick = item ? lines.find((l) => l.item === item) : line ? lines[Number(line) - 1] : defaultLine(lines); if ((item || line) && !pick) throw new AuditionError(`${character.name} has no such line in ${project?.id ?? "the project"} (umtool cast project ${project?.id ?? "<p>"} lists them)`); if (pick) { t = pick.text; @@ -159,6 +159,14 @@ export async function auditionLine(project, manifest, character, { text = null, return { text: t, from }; } +/** Enough words to hear a voice by (and for its closeness to be scored: a two-word line is too little speech). */ +export const AUDITION_MIN_WORDS = 8; +/** The line an audition reads by default: the first of the character's own with enough words, else its longest. */ +export function defaultLine(lines) { + const words = (l) => l.text.split(/\s+/).filter(Boolean).length; + return lines.find((l) => l.own && words(l) >= AUDITION_MIN_WORDS) ?? lines.find((l) => words(l) >= AUDITION_MIN_WORDS) ?? [...lines].sort((a, b) => words(b) - words(a))[0] ?? null; +} + /** The folder an audition is kept in: the project's, else the cast's own. */ export const auditionDirOf = (project, reportsRoot = REPORTS_ROOT) => project ? path.join(project.dir, ...AUDITION_DIR.split("/")) : path.join(/* turbopackIgnore: true */ reportsRoot, ".umtool", "cast", "auditions"); diff --git a/umtool/lib/report/castCli.mjs b/umtool/lib/report/castCli.mjs @@ -358,7 +358,8 @@ async function auditionCommand(rest, p, { reportsRoot, log, err, ask, lanes }) { } log(`${character.name}: "${text}" (${from})`); for (const r of rows) log(` ${r.spec.padEnd(22)} ${r.weight === "heavy" ? "heavy" : "fast "} ${r.seconds ? `${r.seconds.toFixed(1)} s` : "-"} ${r.score !== null ? `closeness ${r.score.toFixed(3)}${speaker ? ` to ${speaker}` : ""}` : ""} ${r.rel}${r.fresh ? "" : " (kept)"}`); - if (score?.why) log(` not scored: ${score.why}`); + const unscored = Object.values(score?.rows ?? {}).find((r) => r?.score === null && r?.why); + if (score?.why || unscored) log(` not scored: ${score?.why ?? unscored.why}${score?.why ? "" : " (the reference's windows: umtool prep, or fetch them)"}`); if (score?.reference) log(` the real voice (a reference, never a target): ${score.reference}`); return 0; }