commit c8c3476800034651b68926b37d7ac72931a0b25b
parent 5fd3a574988f435ab3e5b74f02f999c5c5fde72f
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 11 Nov 2026 01:05:43 -0500
ops: CLI twins for the Speakers lane -- `pnpm ops get speakers` (the readout: line, waiting, freed, rate, days left, per channel, the lane's state), `pnpm ops lane` learns "operations" / "order" / "speakers": "work"|"pause", `pnpm ops diarize {"slug"}` is the Cleanup stage's Diarize speakers (the voiceprint backfill, one channel); OPERATING.md "Work through speakers and free the audio"; COMMANDS.md regenerated
- lane: "operations" ([ids] | null) and "order" are written through
setLaneScopeAction (operations/actions.ts): the stored policy with only
those fields changed, so it works while a channel-priority document compiles
the roots; an operation the lane does not have is refused by name (a lane
narrowed to nothing would hold at zero forever). "speakers" is the deck's one
control (workThroughSpeakersAction / pauseSpeakersAction). Applied before
enabled/held/action.
- get speakers: /api/ops/speakers, read-only, behind the token.
- diarize: /api/ops/diarize -> diarizeChannelAction (a job; --wait follows).
- cleanAfterCapture needs nothing new: `ops settings` merges a block's keys
(`{"patch":{"diarization":{"cleanAfterCapture":true}}}`), now an example.
- Tests: editor app/api/ops/_speakers.test.ts (the lane keys and their 400s,
get speakers); e2e speakers-run.spec.ts (the paused stage's offer, the
voiceprint hold released by Diarize speakers, clean after capture end to end
with get speakers counting it, the readout on the stage, /cleanup and the
deck). `archilyzer docs cli --check` green.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat:
9 files changed, 505 insertions(+), 7 deletions(-)
diff --git a/COMMANDS.md b/COMMANDS.md
@@ -167,8 +167,8 @@ Drives a running editor over HTTP (`/api/ops/*`, the same actions its pages run)
| `check-windows` | check-windows probes cached clip windows (data/<id>/clips/) for a picture that runs off the sound (a Rumble HLS seek) and sets each desynced one aside as <from>-<to>.desynced.<ext> (never deleted; no reader sees it, and evict-clips ages it out): {"slug"?, "video"?, "dryRun"?}. "video" needs "slug"; "dryRun" only lists. A fetch then fills the span again, from the saved video first. | |
| `reports-prepare` | reports-prepare cuts every clip and copies every post capture a site's published reports cite into its report-media cache, before its build: {"siteId"}. The job fails, naming each one, when a citation lacks media. When nothing is missing it then exports the reports, as reports-export. {"articles": true} does it for the published articles (transcripts/ reports/, the homepage's); {"article": "<id>"} adds that one (a draft). | `pnpm ops reports-prepare --json '{"siteId":"demo-site"}' --wait`<br>`pnpm ops reports-prepare --json '{"articles":true}' --wait` |
| `reports-export` | reports-export writes each published report as report.html, report.pdf, report.md, slides.html, slides.pdf and evidence-pack.zip for the site's build to publish: {"siteId", "reportId"?, "formats"?: \["html","pdf","md", "slides","slides-pdf","zip"\]}; {"articles": true, "reportId"?, …} the articles' (reportId: one article, published or a draft). | `pnpm ops reports-export --json '{"siteId":"demo-site","formats":["html","md"]}' --wait` |
-| `lane` | lane takes {"lane": "transcription"\|"download"\|"digest"\|"backfill"\| "publish", "enabled"?, "held"?, "action"?: "start"\|"stop"\|"drain"}, or {"lane": "report-schedule", "held"}: the recurring reports' gate, its only key. | `pnpm ops lane --json '{"lane":"download","held":true}'`<br>`pnpm ops lane --json '{"lane":"publish","action":"drain"}'` |
-| `render-mode` | render-mode gives a render the operator is waiting for the machine: {"on": true, "for"?: "90m" \| <minutes>, "note"?} opens a window (default 2h) in which every other heavy job — e2e suites, next builds, the publish stages, other renders — waits at the heavy slot's door, and holds the transcription and download lanes (only the ones not already held; only those are released). The answer's "join" (RENDER\_PRIORITY\_TOKEN=…) lets a render in, on the floor 4000 MB and the cap 10240 MB; every `umtool take` joins by itself. {"on": false} ends it ("force": true ends a running take's hold, which otherwise ends with the take). `umtool take … --priority` is the same for one take. `get render-mode` says whether it is on, for what, since when, which lanes it holds. Close Firefox and other heavy apps while it renders. | `pnpm ops render-mode --json '{"on":true,"for":"90m","note":"the Ember cut"}'`<br>`pnpm ops render-mode --json '{"on":false}'` |
+| `lane` | lane takes {"lane": "transcription"\|"download"\|"digest"\|"backfill"\| "publish", "enabled"?, "held"?, "action"?: "start"\|"stop"\|"drain"}, or {"lane": "report-schedule", "held"}: the recurring reports' gate, its only key. An auto-queue lane also takes "operations": \[ids\] \| null (dispatch only these — \["diarization"\] is speakers only; null widens it again) and "order" ("space" on backfill: corpus-disk channels first, then the most audio bytes per audio-hour). The backfill (Speakers) lane takes "speakers": "work" (the deck's Work through speakers: arm, lift the hold, start a run) \| "pause" (hold; stays armed). | `pnpm ops lane --json '{"lane":"download","held":true}'`<br>`pnpm ops lane --json '{"lane":"backfill","operations":["diarization"],"order":"space"}'`<br>`pnpm ops lane --json '{"lane":"backfill","speakers":"work"}'`<br>`pnpm ops lane --json '{"lane":"publish","action":"drain"}'` |
+| `render-mode` | render-mode gives a render the operator is waiting for the machine: {"on": true, "for"?: "90m" \| <minutes>, "note"?} opens a window (default 2h) in which every other heavy job — e2e suites, next builds, the publish stages, other renders — waits at the heavy slot's door, and holds the transcription, download and Speakers lanes (only the ones not already held; only those are released). The answer's "join" (RENDER\_PRIORITY\_TOKEN=…) lets a render in, on the floor 4000 MB and the cap 10240 MB; every `umtool take` joins by itself. {"on": false} ends it ("force": true ends a running take's hold, which otherwise ends with the take). `umtool take … --priority` is the same for one take. `get render-mode` says whether it is on, for what, since when, which lanes it holds. Close Firefox and other heavy apps while it renders. | `pnpm ops render-mode --json '{"on":true,"for":"90m","note":"the Ember cut"}'`<br>`pnpm ops render-mode --json '{"on":false}'` |
| `tags` | tags edits the curated-tag vocabulary through its one writer: {"op": "define", "tag": {...}} (the WHOLE definition: id, label, rules and "sites", the sites it exists on, absent = every site) or {"op": "remove", "tag": "<id>"}. `get tags [<id>]` reads it. | `pnpm ops tags --json '{"op":"define","tag":{"id":"eva-collab","label":"Collab"}}'` |
| `tag-videos` | tag-videos pins, unpins, suppresses or unsuppresses one tag on many videos in ONE write: {"tag", "op": "add" \| "remove" \| "suppress" \| "unsuppress", "videos": \[{"slug", "id"}, ...\]}. "remove" unpins only — a rule's hit survives; "suppress" rejects it. The write records who asked (ARCHILYZER\_AGENT); a big list goes in --file. | `pnpm ops tag-videos --file ids.json` |
| `keep-videos` | keep-videos sets the "Do not clean" marker on every held video of a channel whose title or description matches a download-filter pattern: {"slug", "match", "fields"?: \["title" \| "description"\], "note"?, "dryRun"?}. A match not held is reported in "notDownloaded", never created; a fresh channel wants metadata-scan first. Or by id: {"slug", "ids": \[...\], "note"?, "dryRun"?} — a held video is marked now, one not held yet (a live stream, a VOD not fetched) is PENDING and marked when its record is first written (a download, an import, a recording); "pendingAll" lists the channel's pending ids. | `pnpm ops keep-videos --json '{"slug":"demo-rumble","ids":["v1abcde"],"note":"keep"}'` |
@@ -180,7 +180,7 @@ Drives a running editor over HTTP (`/api/ops/*`, the same actions its pages run)
| `tts` | tts speaks a line with a local text-to-speech engine and a STOCK voice, as a job on the `tts` queue: {"text": "..."} or {"file": "/abs/script.txt"} (UTF-8, at most 20,000 characters), "engine" (kokoro \| orpheus \| espeak-ng), "voice" (one of the engine's stock voices; kokoro: af\_heart, bm\_george, ...; orpheus: leah, zac, ...), "speed" (0.5-2; orpheus has none) — defaults from settings.tts (kokoro, af\_heart, 1) — and "out" (an absolute .wav path the result is copied to, never inside the corpus). The expressive tags <laugh> <chuckle> <sigh> <cough> <sniffle> <groan> <yawn> <gasp> are performed by orpheus and stripped for the others; any other <...> is refused. Numbers, years, money and times are spoken (2024: "twenty twenty-four"). The result is {wav, seconds, engine, voice, cached, durationMs, waitedMs, sha, sampleRate, speed, disclosure}: wav is the 48 kHz mono WAV the editor wrote (out, or its cache), disclosure the line a narrated export carries. The same ask again is answered from the cache (cached: true, no engine run). Kokoro and orpheus need `archilyzer tts setup [--engine orpheus]` first; orpheus runs on the GPU (a local llama-server the editor starts and stops) and waits while a transcription holds it. With --wait the result is printed on stdout. | `pnpm ops tts --json '{"text":"In 2024 the archive spoke."}' --wait`<br>`pnpm ops tts --json '{"file":"/abs/script.txt","voice":"bm_george","out":"/abs/line.wav"}' --wait` |
| `voice-enhance` | voice-enhance cleans a speech recording up (denoise, soften the room, level it) as a job on the `voice` queue, behind the heavy slot: {"file": "/abs/take.wav", "out": "/abs/clean.wav"} (never inside the corpus; 48 kHz mono, exactly as long as the input), "engine" (deepfilternet \| rnnoise; settings.voice), "params" (the engine's knobs: lufs, highpass, attenLimDb, postFilter, mix), "parts" (\[{file, out}\], a take recorded part by part). deepfilternet needs `archilyzer voice setup --engine deepfilternet`; rnnoise needs nothing. The result is {op, engine, wav, seconds, samples, sampleRate, engineMs, durationMs, waitedMs, gainDb, params, parts?, synthetic}; with --wait it is printed on stdout. | |
| `voice-convert` | voice-convert keeps a recording's performance (timing, pitch contour) and swaps its timbre for a STOCK synthetic voice, as voice-enhance's job: the same body plus "voice" — "<tts engine>:<stock voice>" (orpheus:zac, orpheus:leah, kokoro:am\_michael, ...; settings.voice.convert.target); a file, a path or a recording is REFUSED as a target (no real person's voice) — and "engine" (openvoice \| seed-vc, each installed by `archilyzer voice setup --engine <id>`). The target's reference is synthesized once through the tts op and kept. The result adds target, voice, synthetic: true and the disclosure line. | |
-| `settings` | settings patches settings.json through the editor's one writer: {"patch": {"<top-level key>": value, …}} (SETTINGS.md). A block's keys merge one level; an array, a scalar or an object nested in a block replaces. Refused before anything is written: an unknown key; a key another writer owns (channelPriority, autoQueue, workers, storage — the refusal names it); a value the schema would not keep as sent (clamped, dropped), named with what would be saved. Answers the saved values. | `pnpm ops settings --json '{"patch":{"minFreeDiskGB":20}}'` |
+| `settings` | settings patches settings.json through the editor's one writer: {"patch": {"<top-level key>": value, …}} (SETTINGS.md). A block's keys merge one level; an array, a scalar or an object nested in a block replaces. Refused before anything is written: an unknown key; a key another writer owns (channelPriority, autoQueue, workers, storage — the refusal names it); a value the schema would not keep as sent (clamped, dropped), named with what would be saved. Answers the saved values. | `pnpm ops settings --json '{"patch":{"diarization":{"cleanAfterCapture":true}}}'`<br>`pnpm ops settings --json '{"patch":{"minFreeDiskGB":20}}'` |
| `clear-platform-hold` | clear-platform-hold clears a platform's rate-limit hold, backoff and raised pace, as the lane strip's Clear hold: {"platform"}. Answers the sentence. | |
| `recheck-service` | recheck-service asks a service whose cookie refresh alert is up ONE request through its own path, as the dashboard banner's Recheck: {"service"} ("rumble", "youtube", "odysee", "archive.today", "x" or a forum host). Waits for it: {jobId, result: "clean" \| "stale" \| "failed", message}; "clean" clears the alert (and a yt-dlp service's backoff, as any clean request). For "x" it sends X NO request: clean when the login on disk was renewed after the alert (Refresh cookies on /settings) — for a jar-age alert, when the jar is within social.x.maxCookieAgeMinutes. The editor also rechecks by itself on a timer (settings.serviceCookies.recheckIntervalMinutes, default 180, 0 = off; `pnpm ops settings --json '{"patch":{"serviceCookies":{"recheckIntervalMinutes":0}}}'`). dismiss-service clears a service's cookie alert by hand: {"service"}. rerun-service-jobs retries every job a service's cookie alert stopped, once it is OK again: {"service"} -> {jobIds, skipped}. --wait follows them. | `pnpm ops recheck-service --json '{"service":"rumble"}'`<br>`pnpm ops recheck-service --json '{"service":"x"}'` |
| `dismiss-service` | — | |
@@ -191,6 +191,7 @@ Drives a running editor over HTTP (`/api/ops/*`, the same actions its pages run)
| `do-not-clean` | do-not-clean sets one video's "Do not clean" marker: {"slug", "id", "keep"?: true}; "keep": false removes it. (keep-videos is the bulk form.) | |
| `drop-saved-alternate` | drop-saved-alternate deletes one saved alternate of one video, as its "Drop this alternate" button does: {"slug", "id", "file", "dryRun"?}. "file" is a name `get saved-alternates` lists under "alternates"; the active copy, an unlisted name and any path are refused, and so is a store being moved. The file goes from the store and its entry from saved-video.json (the rest of the pointer is untouched); one already gone is cleaned from the pointer ("existed": false). "dryRun": true answers the same and changes nothing. No undo. | |
| `cleanup` | cleanup runs one of a channel's cleanup sweeps as a job: {"slug", "sweep": "transcribed" (audio of transcribed videos — the /cleanup total) \| "extra-formats" \| "wrong-format" \| "failed-transcriptions" (clears the list; deletes nothing)}. Do-not-clean videos are skipped; `get cleanup <slug>` says what each would reclaim. | `pnpm ops cleanup --json '{"slug":"x","sweep":"transcribed"}' --wait` |
+| `diarize` | diarize runs a channel's "Diarize speakers" as a job: {"slug"}. Every video still holding audio with no current diarization.json is diarized, and a diarized one without voice fingerprints gets them from its own turns — the voiceprint backfill, one channel at a time. Runs while the Speakers lane is paused; nothing is deleted. | `pnpm ops diarize --json '{"slug":"x"}' --wait` |
| `web-search` | web-search searches the web (DuckDuckGo's HTML page) and answers the results: {"query", "n"?: 6 (at most 20)} -> {results: \[{title, url, snippet}\]}. Read only, through the editor's one web queue: one request at a time, 3 s apart, backing off on a 429 or 503. For context; a web page is never cited as what someone said. | `pnpm ops web-search --json '{"query":"second shop opening","n":5}'` |
| `web-fetch` | web-fetch reads one web page as plain text: {"url", "maxChars"?: 12000 (at most 60000)} -> {page: {url, finalUrl, status, contentType, title?, text, truncated}}. http and https only; a private or loopback host (by name, by address, or by what its name resolves to, every redirect checked) is refused before any request, and so is a page that is not text (a PDF, an image). Read only, on the same web queue as web-search. | `pnpm ops web-fetch --json '{"url":"https://example.com/news/item","maxChars":4000}'` |
| `archive-search` | archive-search searches archive.org (its advanced-search syntax) and answers the items: {"query", "limit"?: 50 (at most 500)} -> {found, items: \[{identifier, title?}\]}, in identifier order. One request through the editor's archive.org client, paced and backed off as an import is. Read only; import-archive-org with "query" imports what a search finds. {"youtubeId", "limit"?: 10} looks for mirrors of one YouTube upload instead: items OF it (their identifier, a file name or their original URL names the id; a title or description that mentions it is not enough), each read for its files -> {query, found, items: \[{identifier, title?, file, url, source, size?, seconds?, namedBy}\], skipped: \[{identifier, why}\]}: each mirror's direct video file URL, an original preferred. | `pnpm ops archive-search --json '{"query":"title:(kitchen) AND mediatype:movies","limit":20}'`<br>`pnpm ops archive-search --json '{"youtubeId":"dQw4w9WgXcQ"}'` |
@@ -243,6 +244,7 @@ Usage: pnpm ops <action> [--json '<body>' | --file <path>] [--wait]
pnpm ops get x-session [<slug>]
pnpm ops get x-run [<run id>]
pnpm ops get cleanup <slug>
+ pnpm ops get speakers
pnpm ops get remote-listing <slug> [--wait-timeout <seconds>]
pnpm ops get transcript <videoId> [--slug <slug>]
pnpm ops get coverage <slug>
@@ -326,6 +328,14 @@ get x-run [<run id>] is the X run as /review's X run console shows it:
rank, slug), "jar" (its age, social.x.maxCookieAgeMinutes, staleAt:
when it passes the limit, and whether an X job would start now),
gapSeconds (X's queue gap) and maxPosts. Nothing is asked of X.
+get speakers is the speakers readout the lane deck and /cleanup print
+ ("line": waiting: X GB in N videos · freed this run: Y GB · about D
+ days left) and its numbers: waiting (audio held for the Speakers lane
+ that it will clear), neverClears, freed this run, the measured seconds
+ of engine per audio-hour, audio-hours and days left, voiceprinted and
+ noFingerprintPossible (diarized, audio already gone), per channel with
+ corpus-disk channels first; and the lane: armed, held, the operations
+ it dispatches, its order, cleanAfterCapture and requireVoiceprints.
get cleanup <slug> is one channel's /cleanup row: what each sweep would
reclaim (they overlap — never add them), what holds the rest, and the
failed-transcriptions count. measured: false means unknown, not zero.
diff --git a/OPERATING.md b/OPERATING.md
@@ -604,6 +604,38 @@ pnpm ops transcribe --json '{"path":"/abs/clip.mp4","start":120,"end":150
the pause alone switched off (never one drained, degraded or disabled by hand); the pause stays on. The video
page's Transcribe row says **Transcribe now (workers paused)**.
+## Work through speakers and free the audio
+
+```sh
+pnpm ops get speakers # waiting · freed this run · days left, per channel
+pnpm ops lane --json '{"lane":"backfill","operations":["diarization"],"order":"space"}'
+pnpm ops settings --json '{"patch":{"attribution":{"textOnlyEnabled":false}}}'
+pnpm ops settings --json '{"patch":{"diarization":{"cleanAfterCapture":true}}}'
+pnpm ops lane --json '{"lane":"backfill","speakers":"work"}' # the deck's Work through speakers
+pnpm ops lane --json '{"lane":"backfill","speakers":"pause"}' # Pause: hold; stays armed
+pnpm ops diarize --json '{"slug":"example"}' --wait # one channel now, lane paused or not
+```
+
+- **What a video needs before its audio may go**: a transcript, its speakers (`diarization.json`) and their
+ voice fingerprints (`voiceprints`: one TitaNet centroid per speaker). The fingerprint is the one part that cannot
+ be made again without the audio, so with `diarization.requireVoiceprints` (on by default) Clean audio skips a
+ diarized video without them — "awaiting voice fingerprint" — and the Speakers lane adds them from the existing
+ turns (seconds of work, no re-clustering).
+- **The lane does speakers only** with `operations: ["diarization"]` on the backfill lane (and the text-only naming
+ pass off): diarization for what has none, fingerprints for what has turns but none. `order: "space"` takes
+ channels whose media is on the corpus disk first, then the videos freeing the most bytes per audio-hour. The
+ channel tiers on /channels still come first.
+- **Work through speakers** (the Speakers lane card, `speakers: "work"`) arms the lane, lifts its hold and starts a
+ run; **Pause** holds it (the video in flight finishes). With `cleanAfterCapture` on, each captured video's audio
+ is removed at once through every Clean audio gate (keep-latest, do-not-clean, the availability check: a video
+ gone upstream is pinned, not deleted), and the bytes are counted in "freed this run" (`transcripts/speakers-run.json`).
+ Off, Clean audio on each channel (or `cleanup {"sweep":"transcribed"}`) frees them later.
+- **The readout** (`get speakers`, the lane card, /cleanup): waiting = the audio the lane will clear; days left =
+ the audio-hours left times the seconds per audio-hour the sidecars measured, at one video at a time. Diarized
+ videos whose audio is already gone are `noFingerprintPossible` — listed, never an error. Audio the engine cannot
+ decode is recorded in `audio-integrity.json` and skipped until a different file is there.
+- **A render gets the cores**: render mode holds the Speakers lane with transcription and download.
+
## Record a live stream; import a file
```sh
diff --git a/editor/app/api/ops/_speakers.test.ts b/editor/app/api/ops/_speakers.test.ts
@@ -0,0 +1,62 @@
+// Run with:
+// pnpm -C editor exec tsx --test "app/api/ops/_speakers.test.ts"
+//
+// `pnpm ops lane` for the Speakers lane — its `operations` narrowing, its
+// `order`, its one control (`speakers`: work | pause) — and `pnpm ops get
+// speakers`, against the route handlers over a temp corpus. Never the live
+// editor's settings.
+import { test } from "node:test";
+import assert from "node:assert/strict";
+import { callGet, callPost, setupOpsCorpus } from "./_testCorpus";
+
+const corpus = await setupOpsCorpus(null);
+const { POST } = await import("./lane/route");
+const { GET } = await import("./speakers/route");
+const { getSettings } = await import("yt-dlp-transcript-common/lib/settings");
+test.after(() => corpus.cleanup());
+
+const DIARIZATION = {
+ enabled: true,
+ segModel: "/m/seg.onnx",
+ embModel: "/m/emb.onnx",
+};
+
+test("lane: operations narrows the Speakers lane (and null widens it), order takes \"space\"; bad values are 400s", async () => {
+ await corpus.writeSettings({ minFreeDiskGB: 0, diarization: DIARIZATION, attribution: { enabled: true, textOnlyEnabled: true, diarizedEnabled: true } });
+ const ok = await callPost(POST!, { lane: "backfill", operations: ["diarization"], order: "space" });
+ assert.equal(ok.status, 200, JSON.stringify(ok.body));
+ assert.deepEqual(getSettings().autoQueue.backfill.operations, ["diarization"]);
+ assert.equal(getSettings().autoQueue.backfill.order, "space");
+
+ const unknown = await callPost(POST!, { lane: "backfill", operations: ["no-such-op"] });
+ assert.equal(unknown.status, 400);
+ assert.match(String(unknown.body.error), /Not an enabled operation on the backfill lane: no-such-op/);
+ assert.equal((await callPost(POST!, { lane: "backfill", order: "biggest" })).status, 400);
+ assert.equal((await callPost(POST!, { lane: "backfill", operations: "diarization" })).status, 400);
+ assert.equal((await callPost(POST!, { lane: "digest", speakers: "work" })).status, 400);
+
+ const widened = await callPost(POST!, { lane: "backfill", operations: null });
+ assert.equal(widened.status, 200, JSON.stringify(widened.body));
+ assert.equal(getSettings().autoQueue.backfill.operations, undefined);
+ assert.equal(getSettings().autoQueue.backfill.order, "space", "order untouched by an operations write");
+});
+
+// `speakers: "work" | "pause"` goes through the lane actions, which revalidate
+// pages and so need a request: the e2e suite drives them (speakers-run.spec,
+// backfill.spec). Here: what `get speakers` says about a held lane.
+test("get speakers: the line, the lane's state and the two capture settings", async () => {
+ await corpus.writeSettings({
+ minFreeDiskGB: 0,
+ diarization: { ...DIARIZATION, cleanAfterCapture: true },
+ autoQueue: { ...getSettings().autoQueue, backfill: { ...getSettings().autoQueue.backfill, enabled: false, held: true } },
+ });
+ const got = await callGet(GET!, "http://localhost/api/ops/speakers");
+ assert.equal(got.status, 200, JSON.stringify(got.body));
+ const lane = got.body.lane as { held: boolean; armed: boolean; cleanAfterCapture: boolean; requireVoiceprints: boolean };
+ assert.deepEqual(
+ { held: lane.held, armed: lane.armed, cleanAfterCapture: lane.cleanAfterCapture, requireVoiceprints: lane.requireVoiceprints },
+ { held: true, armed: false, cleanAfterCapture: true, requireVoiceprints: true },
+ );
+ assert.equal(got.body.line, "waiting: 0 B in 0 videos · freed this run: 0 B · nothing left");
+ assert.deepEqual(got.body.channels, []);
+});
diff --git a/editor/app/api/ops/diarize/route.ts b/editor/app/api/ops/diarize/route.ts
@@ -0,0 +1,18 @@
+import { diarizeChannelAction } from "../../../channels/[slug]/whisperActions";
+import { jobResponse, ops, reqSlug } from "../_lib";
+
+export const dynamic = "force-dynamic";
+
+// POST { slug } — the Cleanup stage's "Diarize speakers", as a job on the
+// channel's queue ({ ok, jobId }; --wait follows it): diarize every video of
+// the channel that still holds audio and has no current diarization.json, and
+// give an existing one its voice fingerprints from its own turns (no
+// re-clustering) — the voiceprint backfill, one channel at a time. Runs whether
+// or not the Speakers lane is paused; `lane {"lane":"backfill","speakers":"work"}`
+// is the whole-corpus way.
+export async function POST(request: Request) {
+ return ops(request, ["slug"], async (body) => {
+ const slug = reqSlug(body, "slug");
+ return jobResponse(await diarizeChannelAction(slug));
+ });
+}
diff --git a/editor/app/api/ops/lane/route.ts b/editor/app/api/ops/lane/route.ts
@@ -20,6 +20,13 @@ import {
stopPublishLaneAction,
} from "../../../sites/lib/publishActions";
import { OpsInputError, okResponse, ops, oneOf, optBool } from "../_lib";
+import {
+ pauseSpeakersAction,
+ workThroughSpeakersAction,
+} from "../../../jobs/actions";
+import { setLaneScopeAction } from "../../../operations/actions";
+import { AUTO_QUEUE_ORDERS } from "yt-dlp-transcript-common/lib/autoQueueSchema";
+import type { AutoQueueOrder } from "yt-dlp-transcript-common/lib/autoQueueTypes";
export const dynamic = "force-dynamic";
@@ -37,6 +44,17 @@ export const dynamic = "force-dynamic";
// `action` mirrors /api/auto-queue/control's body — same three verbs, same
// meanings — so a caller that already drives that route needs nothing new.
//
+// THE SPEAKERS LANE'S SCOPE AND ITS ONE CONTROL (the backfill lane):
+// operations: ["diarization"] | null narrow the lane to these operations
+// (null widens it again) — speakers only;
+// order: "listed"|"newest"|"oldest"|"space" its order ("space": corpus-disk
+// channels first, then the most audio
+// bytes per audio-hour);
+// speakers: "work" | "pause" the lane deck's Work through speakers
+// (arm + lift the hold + start a run) and
+// Pause (hold; stays armed).
+// `operations` and `order` apply first, then `speakers`, then the rest.
+//
// THE PUBLISH LANE (release 19, A4) is a pipeline lane, not a LANES entry: its
// switch is `settings.publish.enabled` (the /operations/publish form's, saved
// through that form's own action with every other field as stored), its gate
@@ -63,7 +81,7 @@ function publishForm(enabled: boolean): FormData {
}
export async function POST(request: Request) {
- return ops(request, ["lane", "held", "enabled", "action"], async (body) => {
+ return ops(request, ["lane", "held", "enabled", "action", "operations", "order", "speakers"], async (body) => {
const lane = oneOf(body, "lane", ALL_LANES);
const enabled = optBool(body, "enabled");
const held = optBool(body, "held");
@@ -76,9 +94,39 @@ export async function POST(request: Request) {
) {
throw new OpsInputError('"action" must be "start", "stop" or "drain"');
}
- if (enabled === undefined && held === undefined && action === undefined) {
+ const speakers = body.speakers;
+ if (speakers !== undefined && speakers !== "work" && speakers !== "pause") {
+ throw new OpsInputError('"speakers" must be "work" or "pause"');
+ }
+ const operations = body.operations;
+ if (
+ operations !== undefined &&
+ operations !== null &&
+ !(Array.isArray(operations) && operations.every((o) => typeof o === "string"))
+ ) {
+ throw new OpsInputError('"operations" must be an array of operation ids, or null');
+ }
+ const order = body.order;
+ if (order !== undefined && !AUTO_QUEUE_ORDERS.includes(order as AutoQueueOrder)) {
+ throw new OpsInputError(`"order" must be one of ${AUTO_QUEUE_ORDERS.join(", ")}`);
+ }
+ if ((speakers !== undefined || operations !== undefined || order !== undefined) &&
+ !(LANES as readonly string[]).includes(lane)) {
+ throw new OpsInputError('"speakers", "operations" and "order" are for an auto-queue lane');
+ }
+ if (speakers !== undefined && lane !== "backfill") {
+ throw new OpsInputError('"speakers" is the backfill (Speakers) lane\'s');
+ }
+ if (
+ enabled === undefined &&
+ held === undefined &&
+ action === undefined &&
+ speakers === undefined &&
+ operations === undefined &&
+ order === undefined
+ ) {
throw new OpsInputError(
- 'nothing to do — send at least one of "enabled", "held" or "action"',
+ 'nothing to do — send at least one of "enabled", "held", "action", "speakers", "operations" or "order"',
);
}
// THE RECURRING REPORTS' LANE (umtool R5) has a gate and nothing else: its
@@ -87,6 +135,17 @@ export async function POST(request: Request) {
if (lane === "report-schedule" && (enabled !== undefined || action !== undefined)) {
throw new OpsInputError('the report-schedule lane takes only "held" — pause a schedule with report-schedule {"action":"pause"}');
}
+ if (operations !== undefined || order !== undefined) {
+ const scoped = await setLaneScopeAction(lane as AutoQueueKind, {
+ ...(operations !== undefined ? { operations: operations as string[] | null } : {}),
+ ...(order !== undefined ? { order: order as AutoQueueOrder } : {}),
+ });
+ if (!scoped.ok) return okResponse(scoped);
+ }
+ if (speakers !== undefined) {
+ const done = speakers === "work" ? await workThroughSpeakersAction() : await pauseSpeakersAction();
+ if (!done.ok) return okResponse(done);
+ }
if (enabled !== undefined) {
if (lane === "publish") {
const saved = await savePublishSettingsAction(undefined, publishForm(enabled));
diff --git a/editor/app/api/ops/speakers/route.ts b/editor/app/api/ops/speakers/route.ts
@@ -0,0 +1,42 @@
+import { getPaths } from "yt-dlp-transcript-common/lib/paths";
+import { getSettings } from "yt-dlp-transcript-common/lib/settings";
+import { isGateHeld } from "yt-dlp-transcript-common/lib/pauseGates";
+import { operationsForLane } from "yt-dlp-transcript-common/lib/operations";
+import { loadSpeakersReadout } from "yt-dlp-transcript-common/controller/speakersReadout";
+import { speakersReadoutLine } from "yt-dlp-transcript-common/lib/speakersReadout";
+import { readRoute } from "../_read";
+
+export const dynamic = "force-dynamic";
+
+// GET /api/ops/speakers — `pnpm ops get speakers`
+//
+// The speakers readout, as the lane deck and /cleanup print it: `line`
+// ("waiting: X GB in N videos · freed this run: Y GB · about D days left"),
+// then the numbers it is made of — waiting (the audio held for the Speakers
+// lane that it WILL clear), neverClears (held there and never cleared by it),
+// freed this run (speakers-run.json), the measured rate (seconds of engine per
+// audio-hour, from the sidecars' durationMs/audioSeconds), the audio-hours
+// left and the days at concurrency 1, voiceprinted and noFingerprintPossible
+// (diarized, the audio already gone) — and per channel, corpus disk first.
+// `lane` is the backfill lane's state: armed, held, the operations it
+// dispatches, its order, and the two capture settings.
+export async function GET(request: Request) {
+ return readRoute(request, [], async () => {
+ const settings = getSettings();
+ const readout = await loadSpeakersReadout(getPaths());
+ const policy = settings.autoQueue.backfill;
+ return {
+ line: speakersReadoutLine(readout),
+ lane: {
+ armed: policy.enabled,
+ held: isGateHeld(settings, "backfill"),
+ operations: operationsForLane("backfill", settings).map((o) => o.id),
+ narrowedTo: policy.operations ?? null,
+ order: policy.order ?? "listed",
+ cleanAfterCapture: settings.diarization.cleanAfterCapture,
+ requireVoiceprints: settings.diarization.requireVoiceprints,
+ },
+ ...readout,
+ };
+ });
+}
diff --git a/editor/app/operations/actions.ts b/editor/app/operations/actions.ts
@@ -23,6 +23,7 @@ import {
type AutoQueueOrder,
} from "yt-dlp-transcript-common/jobs/autoQueuePolicy";
import { isDefaultChannelPriority } from "yt-dlp-transcript-common/lib/channelPriority";
+import { operationsForLane } from "yt-dlp-transcript-common/lib/operations";
import { prioritizeChannelDownloadPriorityAction } from "../channels/actions";
// EVERY OPERATIONS SURFACE, not just the board. The console is a board plus one
@@ -282,3 +283,62 @@ export async function prioritizeChannelDownloadAction(
revalidateOperations();
return { ok: true };
}
+
+// A lane's DISPATCH SCOPE outside its tree: the operation narrowing
+// (`autoQueue.<lane>.operations`, null clears it) and the `order`. Written
+// through the stored policy, every other field as stored — the tree is not
+// touched, so this works while a channel-priority document compiles the roots.
+// The narrowing names operations this lane dispatches, or it is refused: a
+// lane narrowed to nothing would hold at zero forever.
+export async function setLaneScopeAction(
+ kind: AutoQueueKind,
+ input: { operations?: string[] | null; order?: AutoQueueOrder },
+): Promise<{ ok: boolean; error?: string }> {
+ try {
+ const current = getSettings();
+ const policy = current.autoQueue[kind];
+ let operations = policy.operations;
+ if (input.operations !== undefined) {
+ if (input.operations === null || input.operations.length === 0) {
+ operations = undefined;
+ } else {
+ // Against the lane's operations WITHOUT the stored narrowing, so a
+ // narrowed lane can be widened again.
+ const known = new Set(
+ operationsForLane(kind, {
+ ...current,
+ autoQueue: { ...current.autoQueue, [kind]: { ...policy, operations: undefined } },
+ }).map((o) => o.id),
+ );
+ const unknown = input.operations.filter((id) => !known.has(id));
+ if (unknown.length > 0) {
+ return {
+ ok: false,
+ error: `Not an enabled operation on the ${kind} lane: ${unknown.join(", ")} (it has ${[...known].join(", ") || "none"}).`,
+ };
+ }
+ operations = [...new Set(input.operations)];
+ }
+ }
+ const { operations: _drop, ...rest } = policy;
+ void _drop;
+ await saveSettings({
+ autoQueue: {
+ ...current.autoQueue,
+ [kind]: {
+ ...rest,
+ ...(operations ? { operations } : {}),
+ ...(input.order !== undefined ? { order: input.order } : {}),
+ },
+ },
+ });
+ try {
+ revalidateOperations();
+ } catch {
+ /* outside a request (a unit test of the ops route): nothing to revalidate */
+ }
+ return { ok: true };
+ } catch (e) {
+ return { ok: false, error: (e as Error).message };
+ }
+}
diff --git a/editor/e2e/speakers-run.spec.ts b/editor/e2e/speakers-run.spec.ts
@@ -0,0 +1,183 @@
+import { writeFile } from "node:fs/promises";
+import { test, expect } from "@playwright/test";
+import {
+ channelStage,
+ generateReport,
+ pathExists,
+ readJson,
+ resetData,
+ resolvePath,
+ writeSettings,
+ testPaths,
+} from "./helpers";
+import { baseUrl } from "./baseUrl";
+
+// "Work through speakers" (lane/speakers-run): the Speakers lane's one
+// control, the voice fingerprints a sidecar must carry before its audio may go,
+// clean-after-capture, and the readout on the lane card, the Cleanup stage and
+// /cleanup. The engine is the fake DIARIZE_BIN (e2e/fixtures/bin/
+// fake-diarize.mjs): voiceprints by default, `--voiceprints-only` as the
+// wrapper's voiceprint step.
+
+const SLUG = "test-transcribe";
+const AUTH = { authorization: "Bearer test-worker-token" };
+const SLOW = 120_000;
+
+function dataRel(videoId: string, file: string): string {
+ return `${testPaths().transcriptsDir}/channels/${SLUG}/data/${videoId}/${file}`;
+}
+
+async function seedTranscript(videoId: string): Promise<void> {
+ await writeFile(resolvePath(dataRel(videoId, "transcript.json")), '{"transcription":[{"text":"hi"}]}\n');
+}
+
+// A FRESH sidecar (the identity the settings below produce) from before
+// voiceprints existed.
+async function seedPlainDiarization(videoId: string): Promise<void> {
+ await writeFile(
+ resolvePath(dataRel(videoId, "diarization.json")),
+ JSON.stringify({
+ videoId,
+ generatedAt: "2026-08-07T00:00:00.000Z",
+ audioSeconds: 10,
+ durationMs: 1000,
+ speakers: 1,
+ turns: [{ start: 0, end: 10, speaker: 0 }],
+ engine: { engine: "fake-diarize", segmentationModel: "null", embeddingModel: "null", threshold: 0.5 },
+ }) + "\n",
+ );
+}
+
+function settings(over: { held?: boolean; diarization?: Record<string, unknown> } = {}) {
+ return {
+ adminTitle: "Test Admin",
+ maxTranscriptPageBytes: 8388608,
+ sleepBetweenDownloadsSeconds: 0,
+ minFreeDiskGB: 0,
+ verifyAvailabilityBeforeClean: false,
+ syncScheduler: { fullSweepIntervalMinutes: 0 },
+ diarization: {
+ enabled: true,
+ inlineAfterTranscribe: false,
+ threshold: 0.5,
+ threads: 1,
+ python: "python3",
+ segModel: "/dev/null",
+ embModel: "/dev/null",
+ concurrency: 1,
+ ...over.diarization,
+ },
+ backfill: { concurrency: 1, allowRedownload: false },
+ autoQueue: { backfill: { held: over.held ?? false } },
+ };
+}
+
+type Lane = { enabled?: boolean; held?: boolean };
+async function lane(): Promise<Lane> {
+ const s = await readJson<{ autoQueue?: { backfill?: Lane } }>(testPaths().settingsFile).catch(
+ () => ({}) as { autoQueue?: { backfill?: Lane } },
+ );
+ return s.autoQueue?.backfill ?? {};
+}
+
+test.afterEach(async ({ request }) => {
+ // Never leave an armed lane for the next spec.
+ await request.post(`${baseUrl}/api/ops/lane`, { headers: AUTH, data: { lane: "backfill", enabled: false } });
+});
+
+test("a paused Speakers lane: the stage says Run speaker work waits for it, and offers the lane's one control", async ({ page }) => {
+ test.setTimeout(SLOW);
+ await resetData("one-transcribe-channel-with-audio");
+ await writeSettings(settings({ held: true }));
+ await seedTranscript("vidA");
+ await generateReport(page, SLUG);
+
+ await page.goto(channelStage(SLUG, "speakers"));
+ const paused = page.getByLabel("speakers lane paused");
+ await expect(paused).toContainText("The Speakers lane is paused, so Run speaker work waits for it.", { timeout: 30_000 });
+ const work = paused.getByRole("button", { name: "work through speakers" });
+ await expect(work).toBeEnabled({ timeout: 30_000 });
+ await work.click();
+ await expect.poll(async () => ({ held: (await lane()).held, armed: (await lane()).enabled }), { timeout: 30_000 }).toEqual({ held: false, armed: true });
+});
+
+test("a sidecar without voice fingerprints keeps its audio until Diarize speakers adds them from its own turns", async ({ page }) => {
+ test.setTimeout(SLOW);
+ await resetData("one-transcribe-channel-with-audio");
+ await writeSettings(settings());
+ await seedTranscript("vidA");
+ await seedPlainDiarization("vidA");
+ await fetch(`${baseUrl}/api/test/invalidate-cache`).catch(() => {});
+ await generateReport(page, SLUG);
+
+ await page.goto(channelStage(SLUG, "cleanup"));
+ await page.getByRole("button", { name: "Clean audio", exact: true }).click();
+ await expect(page.getByLabel("Clean audio output")).toContainText("awaiting voice fingerprint", { timeout: 30_000 });
+ expect(await pathExists(dataRel("vidA", "audio.m4a"))).toBe(true);
+
+ await page.getByRole("button", { name: "Diarize speakers", exact: true }).click();
+ await expect
+ .poll(
+ async () => {
+ const r = await readJson<{ generatedAt: string; voiceprints?: unknown[] }>(dataRel("vidA", "diarization.json")).catch(() => null);
+ return r ? { generatedAt: r.generatedAt, voiceprints: r.voiceprints?.length ?? 0 } : null;
+ },
+ { timeout: 60_000 },
+ )
+ // The same turns' sidecar — generatedAt kept — now with its fingerprint.
+ .toEqual({ generatedAt: "2026-08-07T00:00:00.000Z", voiceprints: 1 });
+
+ await page.goto(channelStage(SLUG, "cleanup"));
+ await page.getByRole("button", { name: "Clean audio", exact: true }).click();
+ await expect(page.getByLabel("Clean audio output")).toContainText("Cleaned 1 audio file", { timeout: 30_000 });
+ expect(await pathExists(dataRel("vidA", "audio.m4a"))).toBe(false);
+});
+
+test("clean after capture: Run speaker work removes a captured video's audio at once, and the readout counts it", async ({ page, request }) => {
+ test.setTimeout(SLOW);
+ await resetData("one-transcribe-channel-with-audio");
+ await writeSettings(settings({ diarization: { cleanAfterCapture: true } }));
+ await seedTranscript("vidA");
+ await fetch(`${baseUrl}/api/test/invalidate-cache`).catch(() => {});
+ await generateReport(page, SLUG);
+
+ const before = await request.get(`${baseUrl}/api/ops/speakers`, { headers: AUTH });
+ expect(before.status()).toBe(200);
+ const freedBefore = ((await before.json()) as { freedVideos: number }).freedVideos;
+
+ await page.goto(channelStage(SLUG, "speakers"));
+ await page.getByRole("button", { name: "Run speaker work", exact: true }).click();
+ await expect.poll(async () => pathExists(dataRel("vidA", "diarization.json")), { timeout: 60_000 }).toBe(true);
+ await expect.poll(async () => pathExists(dataRel("vidA", "audio.m4a")), { timeout: 60_000 }).toBe(false);
+ await expect(page.getByLabel("Run speaker work output")).toContainText("after capture", { timeout: 30_000 });
+
+ const after = await request.get(`${baseUrl}/api/ops/speakers`, { headers: AUTH });
+ const body = (await after.json()) as { freedVideos: number; line: string; lane: { cleanAfterCapture: boolean } };
+ expect(body.freedVideos).toBe(freedBefore + 1);
+ expect(body.lane.cleanAfterCapture).toBe(true);
+ expect(body.line).toMatch(/^waiting: .* · freed this run: .* · /);
+});
+
+test("the readout: the Cleanup stage names the audio held for speakers; /cleanup and the lane card print the line", async ({ page }) => {
+ test.setTimeout(SLOW);
+ await resetData("one-transcribe-channel-with-audio");
+ // Held: nothing is dispatched, and the paused lane is what /cleanup's gate 4
+ // must call a hold that will not clear on its own.
+ await writeSettings(settings({ held: true }));
+ await seedTranscript("vidA");
+ await fetch(`${baseUrl}/api/test/invalidate-cache`).catch(() => {});
+ await generateReport(page, SLUG);
+
+ await page.goto(`/channels/${SLUG}`);
+ await expect(page.getByText(/held for speakers \(1 video\)/).first()).toBeVisible({ timeout: 30_000 });
+
+ await page.goto("/cleanup");
+ const readout = page.getByLabel("speakers readout");
+ await expect(readout).toContainText("waiting:", { timeout: 30_000 });
+ await expect(readout).toContainText("in 1 video");
+ await expect(readout.getByRole("button", { name: "work through speakers" })).toBeVisible();
+ await expect(page.getByLabel("audio hold sieve").locator('li[data-gate="4"]')).toContainText("will not clear on its own");
+
+ await page.goto("/");
+ await expect(page.getByLabel("speakers readout")).toContainText("waiting:", { timeout: 30_000 });
+});
diff --git a/scripts/archilyzer-ops.mjs b/scripts/archilyzer-ops.mjs
@@ -94,6 +94,11 @@
// pnpm ops channel-rank --json '{"slug":"x","after":"other-channel"}'
// pnpm ops channel-rank --json '{"slug":"x","rank":null}'
// pnpm ops lane --json '{"lane":"download","held":true}'
+// pnpm ops lane --json '{"lane":"backfill","operations":["diarization"],"order":"space"}'
+// pnpm ops lane --json '{"lane":"backfill","speakers":"work"}'
+// pnpm ops get speakers
+// pnpm ops diarize --json '{"slug":"x"}' --wait
+// pnpm ops settings --json '{"patch":{"diarization":{"cleanAfterCapture":true}}}'
// pnpm ops render-mode --json '{"on":true,"for":"90m","note":"the Ember cut"}'
// pnpm ops render-mode --json '{"on":false}'
// pnpm ops get render-mode
@@ -301,6 +306,8 @@ const GETTERS = {
"x-run": (run) => (run ? `/api/ops/x-run?run=${encodeURIComponent(run)}` : "/api/ops/x-run"),
// One channel's cleanup row: what each sweep would reclaim, what holds the rest.
cleanup: (slug) => `/api/ops/cleanup/${encodeURIComponent(slug)}`,
+ // The speakers readout: waiting, freed this run, rate, days left, per channel.
+ speakers: () => "/api/ops/speakers",
// What a channel holds, by date, and its gaps (release 19 A9): each video
// dated by its recorded date when the channel has a title rule, else upload.
coverage: (slug) => `/api/ops/coverage?slug=${encodeURIComponent(slug)}`,
@@ -352,6 +359,7 @@ const GET_ARG_OPTIONAL = new Set([
"x-run",
"generation-usage",
"render-mode",
+ "speakers",
]);
// The flags each noun takes beyond the shared ones; any other is refused.
@@ -561,6 +569,9 @@ const ACTIONS = [
"do-not-clean",
"drop-saved-alternate",
"cleanup",
+ // The Cleanup stage's "Diarize speakers" for one channel: diarization and
+ // voice fingerprints for the videos still holding audio.
+ "diarize",
// WEB READS (release 27 S3): a DuckDuckGo search ({query, n?}) and one
// page as text ({url, maxChars?}), read only, through the editor's one
// paced web queue. Synchronous; no job.
@@ -1057,6 +1068,7 @@ export function usage() {
" pnpm ops get x-session [<slug>]",
" pnpm ops get x-run [<run id>]",
" pnpm ops get cleanup <slug>",
+ " pnpm ops get speakers",
" pnpm ops get remote-listing <slug> [--wait-timeout <seconds>]",
" pnpm ops get transcript <videoId> [--slug <slug>]",
" pnpm ops get coverage <slug>",
@@ -1142,6 +1154,14 @@ export function usage() {
" rank, slug), \"jar\" (its age, social.x.maxCookieAgeMinutes, staleAt:",
" when it passes the limit, and whether an X job would start now),",
" gapSeconds (X's queue gap) and maxPosts. Nothing is asked of X.",
+ "get speakers is the speakers readout the lane deck and /cleanup print",
+ " (\"line\": waiting: X GB in N videos · freed this run: Y GB · about D",
+ " days left) and its numbers: waiting (audio held for the Speakers lane",
+ " that it will clear), neverClears, freed this run, the measured seconds",
+ " of engine per audio-hour, audio-hours and days left, voiceprinted and",
+ " noFingerprintPossible (diarized, audio already gone), per channel with",
+ " corpus-disk channels first; and the lane: armed, held, the operations",
+ " it dispatches, its order, cleanAfterCapture and requireVoiceprints.",
"get cleanup <slug> is one channel's /cleanup row: what each sweep would",
" reclaim (they overlap — never add them), what holds the rest, and the",
" failed-transcriptions count. measured: false means unknown, not zero.",
@@ -1220,12 +1240,18 @@ export function usage() {
'lane takes {"lane": "transcription"|"download"|"digest"|"backfill"|',
' "publish", "enabled"?, "held"?, "action"?: "start"|"stop"|"drain"}, or',
' {"lane": "report-schedule", "held"}: the recurring reports\' gate, its only key.',
+ ' An auto-queue lane also takes "operations": [ids] | null (dispatch only',
+ ' these — ["diarization"] is speakers only; null widens it again) and',
+ ' "order" ("space" on backfill: corpus-disk channels first, then the most',
+ ' audio bytes per audio-hour). The backfill (Speakers) lane takes',
+ ' "speakers": "work" (the deck\'s Work through speakers: arm, lift the hold,',
+ ' start a run) | "pause" (hold; stays armed).',
"",
'render-mode gives a render the operator is waiting for the machine:',
' {"on": true, "for"?: "90m" | <minutes>, "note"?} opens a window (default',
' 2h) in which every other heavy job — e2e suites, next builds, the publish',
' stages, other renders — waits at the heavy slot\'s door, and holds the',
- ' transcription and download lanes (only the ones not already held; only',
+ ' transcription, download and Speakers lanes (only the ones not already held; only',
' those are released). The answer\'s "join" (RENDER_PRIORITY_TOKEN=…) lets a',
' render in, on the floor 4000 MB and the cap 10240 MB; every `umtool take`',
' joins by itself. {"on": false} ends it ("force": true ends a running',
@@ -1308,6 +1334,12 @@ export function usage() {
' gone is cleaned from the pointer ("existed": false). "dryRun": true',
' answers the same and changes nothing. No undo.',
"",
+ 'diarize runs a channel\'s "Diarize speakers" as a job: {"slug"}. Every video',
+ ' still holding audio with no current diarization.json is diarized, and a',
+ ' diarized one without voice fingerprints gets them from its own turns — the',
+ ' voiceprint backfill, one channel at a time. Runs while the Speakers lane',
+ ' is paused; nothing is deleted.',
+ "",
'cleanup runs one of a channel\'s cleanup sweeps as a job: {"slug", "sweep":',
' "transcribed" (audio of transcribed videos — the /cleanup total) |',
' "extra-formats" | "wrong-format" | "failed-transcriptions" (clears the',