commit 825f4f1e17a577a4edd594fa8ea3cf53f997c30b
parent d06fbe31050155acfcf2e825c2640c6ebbbeddf5
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 11 Nov 2026 20:34:58 -0500
umtool: the heavy slot's wait is read from the gate's own lines (its continuation lines, 'still waiting (memory, …)', the admission); knobs.md's record, filter, preview section and rows, report-video.md, the CLI registry and cli.md, the changelog
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat:
8 files changed, 137 insertions(+), 23 deletions(-)
diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md
@@ -1,6 +1,8 @@
# Changelog
## [Unreleased]
+- **umtool: record, filter and listen before anything is kept.** On the record page a recording became a take the moment its last part was in, and hearing it in the character's voice meant importing it on the Voices page and waiting for three takes (operator, 11 Nov: "run the filter and preview it seamlessly in the record UI"). With **Filter before keeping** (on by itself for a post whose character has a stock voice to convert to) the post now waits. **Filter** (`f`) runs the character's recorded preset as one job: clean, cut, convert. Its result is a preview in `narration/.record-preview/<postId>.<label>/`, not a take. The page shows the three stages and the time it has run, and a wait at the editor's queue or the machine's heavy slot reads "waiting for memory … the gate working, not an error". **▶ Raw** and **▶ Filtered** play at one loudness. **Keep** (`Enter`) makes the recorded, cleaned and converted takes from the preview's files, converts nothing again, picks the last and opens the next post not recorded; **Again** (`Backspace` or `r`) drops the preview and records the part again. Each part's waveform carries two **cut marks** at the auto trim's answer; drag one, or press the arrow keys on it, to cut a keyboard click off the start or the end. **Pitch** and **semitones** (a Seed-VC convert) default to the preset's and re-run the convert alone; **Save to character** writes them back, and a post read as the narrator or as nobody offers **Keep in this video only**. Above the record button: the character, its direction line and **▶ <voice> reads it**, which plays the read kept from before when there is one and asks the editor only when pressed. Opened over http from the LAN the page says the microphone is off (a browser opens it only on localhost or https); **Use a sound file…** takes a recording made elsewhere, and Filter, the preview and Keep work there. From a terminal: `umtool posts narrate <p> <item> --recording <file> --preview [--out <file>] [--trim-span 0.4-3.1]` prints the paths and makes no take, `--keep-preview` keeps it, `--discard-preview` drops it. A "start on speech" trigger was not built: it would lose the start of the first word, and the auto trim already cuts the silence before it. ([knobs.md](../umtool/docs/knobs.md#record-filter-preview-on-the-record-page))
+- **umtool: a convert made from a take uses its character's voice, not the editor's default.** On 11 Nov `umtool posts narrate <p> <item> --derive <n> --op convert` with no flags made a take in the wrong voice: it asked the editor with nothing, and the editor used its own default target. A convert now takes its engine, stock voice, pitch and semitones from the recorded preset of the character the read is made as (`--as`, else the item's own, this video's for the author, the cast's, the narrator); a flag overrides its own key. With no character and no `--voice` it is refused in one sentence. The post bench's **run AI on take** does the same on the server.
- **Lookouts: a saved set of channels and days, and a dry run that lists what it would read.** A lookout (lane/lookout) will read its channels' recent transcripts and answer with video ideas; this first part has no model. `settings.lookouts` holds the lookouts (off and empty by default; nothing in code names a channel), and `pnpm ops lookout-run --json '{"id":"…","dryRun":true}'` lists the week it would read: every video by its AIR date in the lookout's time zone (a stream that starts at 8:20 pm in New York is 3 Nov, not the 4 Nov of its UTC upload date), a recording uploaded twice read once with the other upload named beside it, a stream's cut-downs credited to the stream, the longest 40 read and every one left out listed with why. Over the pilot's week, read-only, it found all 6 of the pilot's duplicate uploads and all 18 of its stream cut-downs. `pnpm ops get lookouts` is the readout. Runs and verdicts will live in `transcripts/.lookouts/`, never published.
- **umtool: a character is a preset, and a video can have characters of its own.** The operator wanted "a preset of voice and other settings" per character, applied to that author's posts, anonymous characters with their own profile per video, a pool reused across videos, and different presets for synthetic and recorded voices. A cast character now carries two presets. `synthetic` is the stock voice and its speed. `recorded` is what a recording of them is made into: the stock voice it is converted to, the engine, the pitch and semitones, whether it is cleaned first, whether its edges are trimmed and how much room is kept, and a one-line direction for the person reading, which is never sent to a model. An existing `cast.json` (`voice`, `convert`) reads as these presets, and the first write makes it version 2; `umtool cast undo` puts the old file back. A video's own characters live in `<project>/narration/characters.json`, for people who must not enter the pool. An anonymous one goes by a shown name, "Anon 1", "Anon 2" by default, on the Voices page, in `umtool cast project` and in a recording's note, and is refused the pool. `narration/voices.json` keeps working and is not rewritten. A post item can name its own character (`umtool posts character <p> <item> <id>`, `--clear`). One read asks, first hit wins: the command's flags, the item's character, the video's character for the author, the cast's, the narrator's, the default. `umtool cast project <p>` prints the answer and its source for each author. A thread read ignored `--speed`: each part is now asked at its character's speed, and `--speed` sets every part. A recording made a read (`posts narrate --recording`) applies its character's clean and trim settings; `--clean`, `--no-clean`, `--trim` and `--no-trim` override them for one read. The Voices page edits both presets, keeps the video's own characters, and has "Add to the pool" and "Keep in this video only"; none of it needs an agent. New: `umtool cast set <id> --speed --enhance --trim --trim-pad --direction`, `umtool cast project <p> add|set|rm|undo|pool|keep`. A convert target is still always a stock synthetic voice, and the disclosure line is unchanged. Not built yet: the on-screen card is not anonymised (a cut still shows the post's author for an anonymous character), and the record page does not show the direction (umtool/docs/knobs.md, "A character is a preset").
- **A converted read can follow your pitch.** Converting a recorded read to a stock voice threw the voice acting away. On 11 Nov, reads with a median pitch of 128, 212, 225 and 237 Hz all came out at 196–199 Hz, and a 152–321 Hz range came out as 165–240 Hz: both converters speak at the stock voice's own pitch. `pnpm ops voice-convert` now takes `"pitch"`: `target` (as before), `source` (the pitch you read at: raise your voice and the result rises) or `contour` (your rises and falls, moved as a whole to the stock voice's register), and `"semitones"` (-12 to 12) moves a followed pitch. The same read that came out at 197 Hz now comes out at 211 Hz with a 148–314 Hz range, against 212 Hz and 152–321 Hz read. `source` and `contour` are seed-vc's, on its f0-conditioned model: optional files, fetched by `archilyzer voice setup --engine seed-vc --with f0` (1.49 GB). An install without them converts as before, and a followed pitch is refused naming that command; openvoice refuses a pitch it cannot follow. It takes about 1.7 times as long, and more memory (5.8 GB at its peak on a take of 20 s or more). `settings.voice.convert.pitch` and `.semitones` are the defaults (`target`, 0). In umtool a character keeps its pitch in the cast (`umtool cast set <id> --convert-pitch contour --convert-semitones 2`, shown on Voices), and `--pitch` / `--semitones` on `posts narrate … --recording` or `--derive <n> --op convert` set it for one read; the post bench's **run AI on take** has the same two controls for a convert on seed-vc, starting from the character's. The disclosure line is unchanged.
diff --git a/umtool/docs/cli.md b/umtool/docs/cli.md
@@ -135,7 +135,7 @@ Inbox cannot disagree about what is wrong with one.
| `posts say <project> [ls] [--item <id>]` · `add <word\|phrase> "<spoken>" [--case] [--item <id>] [--note "…"]` · `remove <word\|n> [--item <id>]` · `try "<text>" [--item <id>]` · `stale` `[--json]` | **THE PRONUNCIATION LEXICON** ([knobs.md](knobs.md#pronunciation-and-voices-the-lexicon-the-voice-map-a-thread-read)): `narration/lexicon.json` in the project, a word or phrase said differently in EVERY synthesized read (a script's `--take`, each piece of a thread read, the bench's re-take); the scripts and cards keep their words. Whole words, without case unless `--case`, a phrase across any spaces, regex characters literal; `--item` for one item's reads (it wins over the project's). A masked slur and a redacted word are never replaced. `add` of a word already listed changes what is said. `try` prints what a voice would be asked to say. `stale` lists every picked read that still says an entry the old way, with the command that re-reads it. A bad entry or an unknown item: **exit 2** |
| `posts character <project> <item> [<character> \| --clear] [--json]` | **THE CHARACTER ONE ITEM's OWN READ IS MADE WITH** (`narration.character`, [knobs.md](knobs.md#this-videos-own-characters-and-an-items-own)): the id of one of this video's own characters, else of the cast's -- its presets answer for that item before its author's handle does (the synthetic one for `--take` and a thread read, the recorded one for `--recording`). No character: the one it names and what its read resolves to now; `--clear`: by its handle again. One undoable write; no take is made. An id nobody has: **exit 2** |
| `posts voices <project> [ls] \| set <handle\|*> <voice> \| remove <handle\|*> [--json]` | **THE VOICE MAP** (`narration/voices.json`): the stock voice a thread read gives each author (`*`: everyone it does not name; default `leo` on Orpheus); `ls` lists the map and every author the cut's items carry with the voice each would get. A bad handle or voice: **exit 2** |
-| `posts narrate <project> <item> --recording <file> [--as <character>] [--no-clean\|--clean] [--no-trim\|--trim] [--no-convert] [--pitch target\|source\|contour] [--semitones n] [--label l]` · `<item> --derive <n> --op convert [--engine e] [--voice v] [--pitch …] [--semitones n]` | **a recording made a character's read**: kept (recorded), cleaned (voice-enhance), converted (voice-convert) to the character's STOCK voice, each a new take, the last picked. The character is `--as` (this video's own first, then the cast's), else the item's own, this video's for the author, the cast's, the narrator; its **recorded preset** says whether it is cleaned and its edges trimmed (and the room kept) -- `--no-clean`/`--clean`, `--no-trim`/`--trim` say otherwise for this read. **`--pitch`** is the pitch the converted read lands on ([knobs.md](knobs.md#the-pitch-a-converted-read-lands-on)): `target` the stock voice's own (the read's intonation flattened to it), `source` the pitch it was read at, `contour` the read's rises and falls moved to the stock voice's register; `--semitones` (-12…12) moves a followed one. Default: the character's `convert` entry, else the editor's `settings.voice.convert`. `source` and `contour` are seed-vc's, with its f0 model (`archilyzer voice setup --engine seed-vc --with f0`); what the editor cannot do it refuses in a sentence (**exit 1**); a value outside these, or a pitch on `--op enhance`: **exit 1** |
+| `posts narrate <project> <item> --recording <file> [--as <character>] [--no-clean\|--clean] [--no-trim\|--trim] [--no-convert] [--pitch target\|source\|contour] [--semitones n] [--label l]` · `<item> [--recording <file>] --preview [--as <character>] [--out <file>] [--trim-span [<part>=]<from>-<to>]… [--engine e] [--voice v] [--events]` · `<item> --keep-preview` · `<item> --discard-preview` · `<item> --derive <n> --op convert [--as <character>] [--engine e] [--voice v] [--pitch …] [--semitones n]` | **a recording made a character's read**: kept (recorded), cleaned (voice-enhance), converted (voice-convert) to the character's STOCK voice, each a new take, the last picked. The character is `--as` (this video's own first, then the cast's), else the item's own, this video's for the author, the cast's, the narrator; its **recorded preset** says whether it is cleaned and its edges trimmed (and the room kept) -- `--no-clean`/`--clean`, `--no-trim`/`--trim` say otherwise for this read. **`--pitch`** is the pitch the converted read lands on ([knobs.md](knobs.md#the-pitch-a-converted-read-lands-on)): `target` the stock voice's own (the read's intonation flattened to it), `source` the pitch it was read at, `contour` the read's rises and falls moved to the stock voice's register; `--semitones` (-12…12) moves a followed one. Default: the character's `convert` entry, else the editor's `settings.voice.convert`. `source` and `contour` are seed-vc's, with its f0 model (`archilyzer voice setup --engine seed-vc --with f0`); what the editor cannot do it refuses in a sentence (**exit 1**); a value outside these, or a pitch on `--op enhance`: **exit 1**. **`--preview`** runs the same chain with NO TAKE made ([knobs.md](knobs.md#record-filter-preview-on-the-record-page); the record page's Filter): cleaned whole, cut (`--trim-span`: at these seconds of the recording instead of the auto trim's), converted, into the scratch dir `narration/.record-preview/<postId>.<label>/` -- its paths printed, `--out <file>` a copy of the filtered read; without `--recording` it is the record page's session of the item. A step whose inputs stand is not run again (another `--pitch`: the convert alone). `--keep-preview` makes its takes from those files (nothing converted again), `--discard-preview` removes it. **`--derive <n> --op convert`** is the character's too: its recorded preset's engine, stock voice, pitch and semitones, each unless its flag says otherwise (`--as` names another character); no character and no `--voice`: refused (**exit 2**) -- the editor's default voice is never asked for |
| `posts fx <project> <item> add caption --match "…" --text "…" [--target post\|quoted\|parent:<i>] [--occurrence n] [--at s] [--lead s] [--hold s] [--place below\|above\|side]` · `add clock [--rewind auto\|on\|off] [--off]` · `set <n> [--text …] [--place …] [--rewind …]` | a post item's **caption** ([report-video.md](report-video.md#a-caption), [knobs.md](knobs.md#a-caption-a-chip-explaining-a-phrase-as-it-is-read)): a chip explaining a phrase (any script: CJK drawn), up as it is read -- `--at`, else the take's word timings, else the reading estimate -- held `--hold` s, by the phrase and never over a word read while it is up; it waits for a word zoom. Its **clock** ([knobs.md](knobs.md#the-clock-each-posts-own-time-on-its-card-run-between-items)): the post's own time on the card, run from the clock item before it (forward; a REWIND when earlier: `--rewind`), `--off` not on this item. Through `updatePostFx`, refused in the build's words (**exit 1**); a zoom's knob on a caption, or a caption's on a zoom (**exit 1**) |
| `posts clock <project> [on\|off\|default] [--zone <IANA zone>] [--json]` | the cut's **clock** default (`render.posts.clock`, `updatePostClock`); bare, which items show it and their times |
| `posts fx <project> <item> add slam --text "不動心" [--match "…" \| --at s] [--whole \| --per-glyph] [--gap s] [--hold s] [--from-scale x] [--color #rrggbb] [--outline #rrggbb] [--outline-width px] [--place over-match\|center] [--size px] [--face jp\|sc\|tc\|kr] [--sfx trailer-hit\|off] [--volume x] [--swell \| --no-swell] [--bar "…" [--bar-style dark\|gold\|plain]]` · `set <n> [those flags; --bar off clears it]` | a post item's **slam** ([report-video.md](report-video.md#a-slam), [knobs.md](knobs.md#a-slam-a-trailer-style-title-slam-over-a-word-as-it-is-read)): a corny trailer title slam -- each glyph huge, shrinking onto the card just above the matched words' line and HITTING (a flash, dust, the frame's punch, a trailer hit's boom: the teaser's generator, `trailer-hits.mjs`), gold with a black outline; the hits spread evenly over the words' spoken span (`--gap` spaces them, `--at` moves the first), held `--hold` s; `--bar` lands the glyphs on a translation bar (rising in at the first hit, faded with them); a caption up with it waits for it. Through `updatePostFx`, refused in the build's words (**exit 1**); a slam's knob on another effect, or another's on a slam (**exit 2**) |
diff --git a/umtool/docs/knobs.md b/umtool/docs/knobs.md
@@ -1164,7 +1164,7 @@ the shape, the mix, recordings, parts, the best part). One writer for a post's n
| Knob | In umtool | From a terminal | Route |
|---|---|---|---|
| `narration.script` — what is read: the post, verbatim; Orpheus's tags for emotion | post bench, **script**, **Save script** | `umtool posts narrate <p> <item> --script "…"` · every post's drafted: `--all --draft-scripts [--force]` | `op: "set", patch: {script}` |
-| **the recording session** — the cut's posts read aloud in order, part by part, each part on disk as soon as it is kept (a reload resumes), the post's recorded take made and picked when its last part is in | `/projects/<p>/narration/record` (the Cut tab's **Record the narration**): the jump list (recorded / placeholder, n of N), the post's card and attachment, the teleprompter in its parts (the placeholder's `parts.json`, else the script split), the mic, the level, count-in; **Space** record / stop, **r** redo the part, **Enter** the next part (the post done: the next post), **n** / **p** posts; **Play it back**, **Play the placeholder** | — | `GET /api/report/post-narration/record?project&id[&n]` · `POST` multipart `{project, id, n, count, text, para, part}` · `POST {op: "discard", id, n}` · `POST {op: "finish", id}` |
+| **the recording session** — the cut's posts read aloud in order, part by part, each part on disk as soon as it is kept (a reload resumes), the post's recorded take made and picked when its last part is in -- or, with **Filter before keeping**, the post waits: [filter, preview, Keep](#record-filter-preview-on-the-record-page) | `/projects/<p>/narration/record` (the Cut tab's **Record the narration**): the jump list (recorded / placeholder, n of N), the post's card and attachment, the teleprompter in its parts (the placeholder's `parts.json`, else the script split), the mic, the level, count-in; **Space** record / stop, **r** redo the part, **Enter** the next part (the post done: the next post), **n** / **p** posts; **Play it back**, **Play the placeholder**; **Use a sound file…** (a recording made elsewhere, for the part); the character it is read as, its direction, **▶ <voice> reads it** | — | `GET /api/report/post-narration/record?project&id[&n]` · `POST` multipart `{project, id, n, count, text, para, part}` · `POST {op: "discard", id, n}` · `POST {op: "finish", id, spans?}` |
| a recorded take — your own read, part by part, kept as `take-<n>.recorded-<label>.wav`, picked | post bench, **record your read**: the mic, the level, **Record** (R) / **Stop** (S) / **Redo part** / **Next part**, **Keep** / **Discard**, **voice** (the label, default `operator`) | — | `POST` multipart `{project, id, label, script?, part[], text[], para[]}` |
| a synthesized take — the editor's tts op, with direction | post bench, **Re-take with direction** (a note, a voice) | `umtool posts narrate <p> <item> --take [--note "…"] [--voice v] [--engine e] [--speed s]` · every missing one: `--all --take` | `op: "take"` → `{jobId, file}` · `GET ?project&id&job&file` keeps it when done |
| a THREAD READ — the post it answers (or every ancestor), the post it quotes, the linked posts and his words, each in its author's voice, parts cached, one take picked ([below](#pronunciation-and-voices-the-lexicon-the-voice-map-a-thread-read)) | — | `umtool posts narrate <p> <item> --take --thread [--parents 0\|all] [--skip-parent <id>]… [--voice-for <handle>=<voice>]… [--dry-run] [--json]` | — |
@@ -1379,6 +1379,8 @@ for one read).
| the voice a character reads in -- this project, or everywhere | an audition's **Use for this project** / **Use everywhere** | `umtool cast use <p> <character\|@handle> <voice> [--everywhere]` (the project's own override goes with `--everywhere`) | `POST … {op: "use", who, voice, scope}` |
| the re-reads a voice change asks for | the confirm under the audition: the items, **Queue N re-reads** (steps of the queue: /jobs; each a new take, picked, awaiting approval) | `umtool cast reread <p> <character> [--dry-run]` | `POST … {op: "reread", who}` |
| a recording made a character's read | **Voices** → *a recording*: the item, as whom (this video's own, the cast's), drop a file, clean / convert, **Import** (a job) | `umtool posts narrate <p> <item> --recording <file> [--as <character>] [--no-clean\|--clean] [--no-trim\|--trim] [--no-convert] [--pitch …] [--semitones n]` | `POST … multipart {op: "recording", item, as?, file}` |
+| the same chain with NO TAKE made -- a preview in the scratch dir `narration/.record-preview/<postId>.<label>/`, then kept or dropped ([below](#record-filter-preview-on-the-record-page)) | the record page's **Filter**, **Keep**, **Again** | `umtool posts narrate <p> <item> [--recording <file>] --preview [--as <character>] [--out <file>] [--trim-span [<part>=]<from>-<to>]… [--no-clean\|--clean] [--no-trim\|--trim] [--no-convert] [--engine e] [--voice v] [--pitch …] [--semitones n]` · `--keep-preview` · `--discard-preview` | `POST /api/report/post-narration/record {op: "prepare" \| "filter" \| "keep" \| "again" \| "discard-preview"}` |
+| a convert made from a take -- its engine, stock voice, pitch and semitones are the CHARACTER's recorded preset, each unless said; no character and no voice: refused (the editor's default voice is never asked for) | post bench, **run AI on take** → convert | `umtool posts narrate <p> <item> --derive <n> --op convert [--as <character>] [--engine e] [--voice v] [--pitch …] [--semitones n]` | `POST /api/report/post-narration {op: "derive", op2: "convert", as?, engine?, voice?, pitch?, semitones?}` |
```sh
umtool cast add thequartering --name TheQuartering --voice kokoro:am_michael --handles thequartering --speakers Jeremy
@@ -1393,6 +1395,69 @@ umtool cast project quartering-diet keep @madamsavvy # a character of th
umtool posts character quartering-diet <item> anon-1 # this one item read as that character (--clear: by its handle)
```
+### Record, filter, preview on the record page
+
+The operator, 11 Nov 2026: "run the filter and preview it seamlessly in the record UI". On
+`/projects/<p>/narration/record`, above the record button: **who the post is read as** (the chain's character and
+where it comes from), its **direction** line, and **▶ <voice> reads it** -- the character's stock voice reading the
+part: the read kept from before when there is one (`narration/parts-cache/`, a thread read's), else asked of the
+editor's tts op when the button is pressed, never before.
+
+**Filter before keeping** (a checkbox; on by itself for a post whose character has a stock voice to convert to, off
+otherwise -- the last part then makes the recorded take at once, as before): the last part in, the post WAITS.
+
+- **The cut marks**: each part's waveform with its trim in and out -- the auto trim's answer (the preset's
+ `trim.padMs` either side of the speech; `trim.on: false`: the whole part), draggable, or focus one and press the
+ arrow keys (0.05 s; Shift 0.25 s); **▶ what the marks keep**; **back to the auto trim**. They are what a keyboard
+ click at the start or the end of a recording is cut off with. `keepRecording` takes them as `spans` (`[{from, to}]`
+ per part, the part's own seconds), whatever the trim says.
+- **Filter** (**f**): the character's recorded preset as ONE job of umtool's (`umtool posts narrate <p> <item>
+ --preview --events`; its three stages on the page, the time it has run, Cancel) -- **clean** (the editor's
+ voice-enhance over the parts whole), **cut** at the marks and joined, **convert** (its voice-convert to the stock
+ voice) -- into the SCRATCH DIR `<project>/narration/.record-preview/<postId>.<label>/` (`preview.json`, `raw.wav`,
+ `clean.wav`, `filtered.wav` and their parts). **No take is made.** A stage whose inputs stand is not run again: a
+ mark moved re-cuts the cleaned sound and converts; another pitch converts alone. **A wait is a state, not an
+ error**: *queued* behind the editor's other voice jobs, *waiting for memory* or *for the heavy slot* at the machine's
+ gate (the last line of the editor's job, `scripts/queue-lock.mjs`'s own) -- a short read takes two or three minutes.
+ umtool runs one job at a time: while another runs, Filter says so.
+- **▶ Raw**, **▶ Filtered**, **▶ Raw, then filtered**: the two reads at ONE loudness (the louder turned down to the
+ other's measured LUFS). With no clean engine and no character to convert to, it says nothing filtered it.
+- **Pitch** and **semitones** (a Seed-VC convert): default the preset's; **Save to character** writes them to the
+ character (`character-set`: this video's own, or the cast's -- it says which). A post read as the cast's narrator, or
+ as nobody: **Keep in this video only** (`character-keep`) gives its author a character of this video's own, converted
+ as here.
+- **Keep** (**Enter**): the takes `posts narrate --recording` makes -- the recording (cut, joined, levelled), the
+ cleaned one, the converted one, the last PICKED and awaiting approval -- made FROM THE PREVIEW's FILES, nothing
+ converted again; the page opens the next post not recorded yet. When the marks or the pitch moved since the Filter
+ the button says **Keep the recording alone** and keeps one recorded take, cut at the marks.
+- **Again** (**Backspace** or **r**): the preview dropped, the part recorded again.
+- The scratch dir is removed on Keep, on Again, when the post or the page is left (unless its Filter is still running:
+ it is there when you come back), when the recording it was made from changes, and a day after a crash left one.
+- **The microphone is a secure context's** (localhost, https): opened over http from the LAN the page says so and
+ the Record button is off; **Use a sound file…** takes a recording made elsewhere for the part, and Filter, the
+ preview, the marks and Keep work as anywhere.
+- Not built: a "start on speech" level trigger. A recorder that starts at the first sound loses the start of the first
+ word, and the auto trim already cuts the silence before it; Space and the count-in start a read.
+
+| Knob | In umtool | From a terminal | Route |
+|---|---|---|---|
+| the preview -- the chain into the scratch dir, no take | **Filter** (f) | `umtool posts narrate <p> <item> --preview` (the page's session) · `--recording <file> --preview [--out <file>]` (a file; the filtered read copied to `--out`) · `--json` · `--events` (its progress, one JSON object a line) | `POST /api/report/post-narration/record {op: "filter", id, spans?, pitch?, semitones?}` → `{job}`; `GET ?project&id&job=<id>` → `{job: {state, stage, waiting, waited, stages, error}, preview?}`; `POST {op: "cancel", id, job}` |
+| the cut marks -- `[{from, to}]` per part | the waveform's two marks | `--trim-span 0.4-3.1` (the first part) · `--trim-span 2=0.2-4` | `spans` on `filter`, `keep`, `finish`; `POST {op: "prepare", id}` → each part's `seconds`, `peaks`, `auto` |
+| the pitch of this read | **pitch**, **semitones** | `--pitch target\|source\|contour` · `--semitones n` | `pitch`, `semitones` on `filter` |
+| the pitch kept on the character | **Save to character** · **Keep in this video only** | `umtool cast set <id> --convert-pitch … --convert-semitones n` · `umtool cast project <p> set <id> …` · `umtool cast project <p> keep @<handle>` | `POST /api/report/voices {op: "character-set" \| "character-keep"}` |
+| keep the preview -- its takes, the last picked | **Keep** (Enter) | `umtool posts narrate <p> <item> --keep-preview` | `POST … {op: "keep", id, filtered: true, spans?, script?}` (`filtered: false`: the recording alone) |
+| drop it | **Again** (Backspace, r), leaving the post | `umtool posts narrate <p> <item> --discard-preview` | `POST … {op: "again", id, n?}` · `{op: "discard-preview", id}` |
+| the stock voice reading the line | **▶ <voice> reads it** | — | `POST … {op: "stock", id, text}` → `{file}` or `{jobId, key}`; `GET ?project&id&stock&job&key` |
+| the preview's sounds | **▶ Raw**, **▶ Filtered**, **▶ what the marks keep** | the paths `--preview` prints | `GET ?project&id&preview&file=raw\|clean\|filtered\|part[&n]` · `GET ?project&id&preview` (who it is read as, the preview, the job) |
+
+```sh
+umtool posts narrate <p> <item> --recording savvy.wav --preview # clean, cut, convert: the paths, no take
+umtool posts narrate <p> <item> --recording savvy.wav --preview --semitones 3 # another nudge: the convert alone
+umtool posts narrate <p> <item> --recording savvy.wav --preview --trim-span 0.35-4.1 --out /tmp/savvy.wav
+umtool posts narrate <p> <item> --keep-preview # its takes, the last picked
+umtool posts narrate <p> <item> --derive 1 --op convert # take 1 converted as its character says
+```
+
### A character is a preset
The operator, 11 Nov 2026: "a preset of voice and other settings … different presets for synthetic and
diff --git a/umtool/docs/report-video.md b/umtool/docs/report-video.md
@@ -667,7 +667,13 @@ part is written to `narration/posts/<postId>/.recording-<label>/` the moment it
(`lib/report/recordSession.mjs`: a crash loses at most the part being read, a reload
resumes at the first part not kept); when the last part is in, the parts become the post's
recorded take (below) and it is picked. Chromium and Firefox (webm or ogg opus), no network
-beyond localhost.
+beyond localhost. With **Filter before keeping** (on by itself for a post whose character has
+a stock voice to convert to) the post waits instead: its cut marks on a waveform, **Filter**
+(the character's recorded preset as one job, into a preview — no take), the raw and filtered
+reads side by side, **Keep** / **Again**
+([knobs.md](knobs.md#record-filter-preview-on-the-record-page)). The microphone needs
+localhost or https: opened over http from the LAN the page says so, and a sound file can be
+chosen for a part.
**Recorded takes** — the post bench's recording session: the mic (remembered per
browser), a level meter, a 3-2-1 count-in, the script as a teleprompter with the part
diff --git a/umtool/e2e/fixtures/editor-stub.mjs b/umtool/e2e/fixtures/editor-stub.mjs
@@ -1443,7 +1443,7 @@ const server = http.createServer((req, res) => {
job: { id: opsJob[1], kind: j.kind ?? "tts-file", status },
// A voice-convert that is still running is at the machine's heavy slot, and says so as the editor's job does
// (scripts/queue-lock.mjs): the record page's Filter shows it as a wait, not an error.
- ...(tail ? { tail: status === "running" && j.kind === "voice-convert" ? ["heavy: waiting for memory — 4100 MB available, the floor is 6000 MB"] : ["tts: synthesizing (stub)", `${j.marker ?? "@@tts-result "}${JSON.stringify(j.result)}`] } : {}),
+ ...(tail ? { tail: status === "running" && j.kind === "voice-convert" ? ["heavy: waiting for memory — 4100 MB available, the floor is 6000 MB", " (HEAVY_MIN_FREE_MB=<MB> to change it; 0, or HEAVY=0, to skip it)"] : ["tts: synthesizing (stub)", `${j.marker ?? "@@tts-result "}${JSON.stringify(j.result)}`] } : {}),
});
}
diff --git a/umtool/lib/cli/groups.mjs b/umtool/lib/cli/groups.mjs
@@ -1032,8 +1032,8 @@ export const GROUPS = [
"**THE CHARACTER ONE ITEM's OWN READ IS MADE WITH** (`narration.character`, [knobs.md](knobs.md#this-videos-own-characters-and-an-items-own)): the id of one of this video's own characters, else of the cast's -- its presets answer for that item before its author's handle does (the synthetic one for `--take` and a thread read, the recorded one for `--recording`). No character: the one it names and what its read resolves to now; `--clear`: by its handle again. One undoable write; no take is made. An id nobody has: **exit 2**"],
["`posts voices <project> [ls] \\| set <handle\\|*> <voice> \\| remove <handle\\|*> [--json]`",
"**THE VOICE MAP** (`narration/voices.json`): the stock voice a thread read gives each author (`*`: everyone it does not name; default `leo` on Orpheus); `ls` lists the map and every author the cut's items carry with the voice each would get. A bad handle or voice: **exit 2**"],
- ["`posts narrate <project> <item> --recording <file> [--as <character>] [--no-clean\\|--clean] [--no-trim\\|--trim] [--no-convert] [--pitch target\\|source\\|contour] [--semitones n] [--label l]` · `<item> --derive <n> --op convert [--engine e] [--voice v] [--pitch …] [--semitones n]`",
- "**a recording made a character's read**: kept (recorded), cleaned (voice-enhance), converted (voice-convert) to the character's STOCK voice, each a new take, the last picked. The character is `--as` (this video's own first, then the cast's), else the item's own, this video's for the author, the cast's, the narrator; its **recorded preset** says whether it is cleaned and its edges trimmed (and the room kept) -- `--no-clean`/`--clean`, `--no-trim`/`--trim` say otherwise for this read. **`--pitch`** is the pitch the converted read lands on ([knobs.md](knobs.md#the-pitch-a-converted-read-lands-on)): `target` the stock voice's own (the read's intonation flattened to it), `source` the pitch it was read at, `contour` the read's rises and falls moved to the stock voice's register; `--semitones` (-12…12) moves a followed one. Default: the character's `convert` entry, else the editor's `settings.voice.convert`. `source` and `contour` are seed-vc's, with its f0 model (`archilyzer voice setup --engine seed-vc --with f0`); what the editor cannot do it refuses in a sentence (**exit 1**); a value outside these, or a pitch on `--op enhance`: **exit 1**"],
+ ["`posts narrate <project> <item> --recording <file> [--as <character>] [--no-clean\\|--clean] [--no-trim\\|--trim] [--no-convert] [--pitch target\\|source\\|contour] [--semitones n] [--label l]` · `<item> [--recording <file>] --preview [--as <character>] [--out <file>] [--trim-span [<part>=]<from>-<to>]… [--engine e] [--voice v] [--events]` · `<item> --keep-preview` · `<item> --discard-preview` · `<item> --derive <n> --op convert [--as <character>] [--engine e] [--voice v] [--pitch …] [--semitones n]`",
+ "**a recording made a character's read**: kept (recorded), cleaned (voice-enhance), converted (voice-convert) to the character's STOCK voice, each a new take, the last picked. The character is `--as` (this video's own first, then the cast's), else the item's own, this video's for the author, the cast's, the narrator; its **recorded preset** says whether it is cleaned and its edges trimmed (and the room kept) -- `--no-clean`/`--clean`, `--no-trim`/`--trim` say otherwise for this read. **`--pitch`** is the pitch the converted read lands on ([knobs.md](knobs.md#the-pitch-a-converted-read-lands-on)): `target` the stock voice's own (the read's intonation flattened to it), `source` the pitch it was read at, `contour` the read's rises and falls moved to the stock voice's register; `--semitones` (-12…12) moves a followed one. Default: the character's `convert` entry, else the editor's `settings.voice.convert`. `source` and `contour` are seed-vc's, with its f0 model (`archilyzer voice setup --engine seed-vc --with f0`); what the editor cannot do it refuses in a sentence (**exit 1**); a value outside these, or a pitch on `--op enhance`: **exit 1**. **`--preview`** runs the same chain with NO TAKE made ([knobs.md](knobs.md#record-filter-preview-on-the-record-page); the record page's Filter): cleaned whole, cut (`--trim-span`: at these seconds of the recording instead of the auto trim's), converted, into the scratch dir `narration/.record-preview/<postId>.<label>/` -- its paths printed, `--out <file>` a copy of the filtered read; without `--recording` it is the record page's session of the item. A step whose inputs stand is not run again (another `--pitch`: the convert alone). `--keep-preview` makes its takes from those files (nothing converted again), `--discard-preview` removes it. **`--derive <n> --op convert`** is the character's too: its recorded preset's engine, stock voice, pitch and semitones, each unless its flag says otherwise (`--as` names another character); no character and no `--voice`: refused (**exit 2**) -- the editor's default voice is never asked for"],
["`posts fx <project> <item> add caption --match \"…\" --text \"…\" [--target post\\|quoted\\|parent:<i>] [--occurrence n] [--at s] [--lead s] [--hold s] [--place below\\|above\\|side]` · `add clock [--rewind auto\\|on\\|off] [--off]` · `set <n> [--text …] [--place …] [--rewind …]`",
"a post item's **caption** ([report-video.md](report-video.md#a-caption), [knobs.md](knobs.md#a-caption-a-chip-explaining-a-phrase-as-it-is-read)): a chip explaining a phrase (any script: CJK drawn), up as it is read -- `--at`, else the take's word timings, else the reading estimate -- held `--hold` s, by the phrase and never over a word read while it is up; it waits for a word zoom. Its **clock** ([knobs.md](knobs.md#the-clock-each-posts-own-time-on-its-card-run-between-items)): the post's own time on the card, run from the clock item before it (forward; a REWIND when earlier: `--rewind`), `--off` not on this item. Through `updatePostFx`, refused in the build's words (**exit 1**); a zoom's knob on a caption, or a caption's on a zoom (**exit 1**)"],
["`posts clock <project> [on\\|off\\|default] [--zone <IANA zone>] [--json]`",
diff --git a/umtool/lib/report/recordPreview.test.mjs b/umtool/lib/report/recordPreview.test.mjs
@@ -61,8 +61,9 @@ const editor = () => {
ops.push({ op, ...body });
// The heavy slot's gate, then the engine: what the editor's job says while it runs.
o.onState?.({ jobId: `op-${ops.length}`, status: "queued", queue: { position: 2 }, tail: [] });
- o.onState?.({ jobId: `op-${ops.length}`, status: "running", tail: ["heavy: waiting for memory — 4100 MB available, the floor is 6000 MB"] });
- o.onState?.({ jobId: `op-${ops.length}`, status: "running", tail: ["heavy: waiting for memory — 4100 MB available, the floor is 6000 MB", "Running Seed-VC behind the heavy slot (estimate 5000 MB)…"] });
+ const gate = ["heavy: waiting for memory — 4100 MB available, the floor is 6000 MB", " (HEAVY_MIN_FREE_MB=<MB> to change it; 0, or HEAVY=0, to skip it)"];
+ o.onState?.({ jobId: `op-${ops.length}`, status: "running", tail: gate });
+ o.onState?.({ jobId: `op-${ops.length}`, status: "running", tail: [...gate, "heavy: 6900 MB available after 40s — admitted"] });
const { seconds } = await measureTake(body.file);
await wavOf(body.out, op === "voice-convert" ? VOICE_A : VOICE_B, seconds, 0);
for (const p of body.parts ?? []) await wavOf(p.out, op === "voice-convert" ? VOICE_A : VOICE_B, (await measureTake(p.file)).seconds, 0);
@@ -71,16 +72,32 @@ const editor = () => {
return { ops, ask, names: () => ops.map((o) => o.op) };
};
-test("the heavy slot's wait is a state, not an error: queued, waiting for memory, the slot held, running", () => {
+test("the heavy slot's wait is a state, not an error: queued, waiting for memory, the slot held, admitted", () => {
assert.deepEqual(opWaitOf({ status: "queued", queue: { position: 3 } }), { state: "queued", position: 3, line: null });
assert.equal(opWaitOf({ status: "queued" }).position, null);
- const mem = opWaitOf({ status: "running", tail: ["Starting…", "heavy: waiting for memory — 4100 MB available, the floor is 6000 MB", ""] });
- assert.deepEqual([mem.state, /4100 MB/.test(mem.line)], ["memory", true]);
+ // The gate's own lines (scripts/queue-lock.mjs), as the editor's job log carries them.
+ const first = [
+ "Running Seed-VC (v1, 22 kHz speech) behind the heavy slot (estimate 6500 MB)…",
+ "heavy: waiting for memory — 6706 MB available, 8000 MB promised to 2 running jobs, the floor is 6000 MB",
+ " running: lane-remote-archive (lane/remote-archive, pid 917913, 1500 MB) for 34m41s: playwright test",
+ " (HEAVY_MIN_FREE_MB=<MB> to change it; 0, or HEAVY=0, to skip it)",
+ ];
+ const mem = opWaitOf({ status: "running", tail: first });
+ assert.deepEqual([mem.state, /6706 MB available/.test(mem.line)], ["memory", true], "the continuation lines after it are still the wait");
+ assert.equal(opWaitOf({ status: "running", tail: [...first, "heavy: still waiting (memory, 30s; 6372 MB available)"] }).state, "memory");
assert.equal(opWaitOf({ status: "running", tail: ["heavy: still waiting for memory (4200 MB available, 1m 10s)"] }).state, "memory");
- assert.equal(opWaitOf({ status: "running", tail: ["queue-lock: waiting for the heavy slot — held by pid 12 (next build)"] }).state, "slot");
- assert.equal(opWaitOf({ status: "running", tail: ["queue-lock: held for a render (umtool take p --id a, since 13:31) — waiting"] }).state, "slot");
- // Admitted: the gate's line is not the last one any more.
- assert.equal(opWaitOf({ status: "running", tail: ["heavy: waiting for memory — 1 MB available, the floor is 6000 MB", "Running Seed-VC behind the heavy slot…"] }).state, "running");
+ assert.equal(opWaitOf({ status: "running", tail: ["heavy: this machine has 3900 MB in all, under the 6000 MB floor — one heavy job at a time; waiting for: x"] }).state, "memory");
+ assert.equal(opWaitOf({ status: "running", tail: ["heavy: still waiting (build, 1m00s; 9000 MB available)"] }).state, "slot");
+ assert.equal(opWaitOf({ status: "running", tail: ["heavy: waiting for a job that runs alone: a render"] }).state, "slot");
+ assert.equal(opWaitOf({ status: "running", tail: ["queue-lock: held for a render (umtool take p --id a, since 13:31) — waiting", " (render mode: `umtool render-mode off` ends it; RENDER_PRIORITY=0 to run anyway)"] }).state, "slot");
+ assert.equal(opWaitOf({ status: "running", tail: ["queue-lock: still waiting for the render (2m; umtool take p --id a)"] }).state, "slot");
+ // Admitted: the gate says so, or the engine has spoken since.
+ assert.equal(opWaitOf({ status: "running", tail: [...first, "heavy: 7100 MB available after 1m10s — admitted"] }).state, "running");
+ assert.equal(opWaitOf({ status: "running", tail: [...first, "heavy: admitted beside 1 running job (1500 MB promised)"] }).state, "running");
+ assert.equal(opWaitOf({ status: "running", tail: [...first, "heavy: capped at 8192 MB (swap 2048 MB) in a scope of its own"] }).state, "running");
+ assert.equal(opWaitOf({ status: "running", tail: ["queue-lock: the render let go after 3m — going on"] }).state, "running");
+ assert.equal(opWaitOf({ status: "running", tail: [...first, "loading the model"] }).state, "running");
+ assert.equal(opWaitOf({ status: "running", tail: ["Running Seed-VC behind the heavy slot (estimate 5000 MB)…"] }).state, "running");
assert.equal(opWaitOf({ status: "running" }).state, "running");
});
diff --git a/umtool/report-to-video/narrate-via-editor.mjs b/umtool/report-to-video/narrate-via-editor.mjs
@@ -281,17 +281,41 @@ export const STATE_TAIL_LINES = 6;
/**
* WHERE A QUEUED OR RUNNING EDITOR JOB IS, from one poll of it (`{ status, queue?, tail? }`): `queued` (behind other
- * jobs of its queue: `position`), `memory` / `slot` (it runs, and its engine waits at the machine's heavy slot --
- * scripts/queue-lock.mjs's own lines, the last one of its log: "heavy: waiting for memory …", "queue-lock: waiting
- * for the heavy slot …", "… held for a render …"; THE GATE WORKING, not an error), else `running`. Pure.
+ * jobs of its queue: `position`), `memory` / `slot` (it runs, and its engine waits at the machine's heavy slot), else
+ * `running`. THE GATE WORKING, not an error. The gate speaks in the job's log (scripts/queue-lock.mjs, its stderr):
+ *
+ * heavy: waiting for memory — 6706 MB available, 8000 MB promised to 2 running jobs, the floor is 6000 MB
+ * running: … (indented lines continue the one above)
+ * (HEAVY_MIN_FREE_MB=<MB> to change it; …)
+ * heavy: still waiting (memory, 30s; 6372 MB available) memory | build | exclusive
+ * heavy: waiting for the build slot — … · heavy: waiting for a job that runs alone: …
+ * queue-lock: held for a render (…) — waiting · queue-lock: still waiting for the render (…)
+ * heavy: 7000 MB available after 1m10s — admitted · heavy: admitted beside … · heavy: capped at … · … let go after …
+ *
+ * The LAST gate line of the tail decides: a wait that has not been answered by an admission (or by a line of the
+ * engine's after it) is where the job is. Pure.
*/
export function opWaitOf({ status, queue = null, tail = [] } = {}) {
if (status === "queued") return { state: "queued", position: Number(queue?.position) > 0 ? Number(queue.position) : null, line: null };
- const last = [...(tail ?? [])].reverse().find((l) => String(l).trim()) ?? "";
- const line = String(last).trim();
- if (/heavy: (still )?waiting for memory/i.test(line)) return { state: "memory", position: null, line };
- if (/waiting for the (heavy|build) slot|held for a render|waiting for the .* queue/i.test(line)) return { state: "slot", position: null, line };
- return { state: "running", position: null, line: line || null };
+ const lines = (tail ?? []).map((l) => String(l)).filter((l) => l.trim());
+ const isGate = (l) => /\b(heavy|queue-lock): /.test(l);
+ const continues = (l) => /^\s+\S/.test(l) || /^\(?(running: |\(HEAVY_MIN_FREE_MB|\(render mode:|\(heavy jobs)/.test(l.trim());
+ let at = -1;
+ for (let i = lines.length - 1; i >= 0; i -= 1) {
+ if (isGate(lines[i])) {
+ at = i;
+ break;
+ }
+ }
+ const running = { state: "running", position: null, line: lines.at(-1)?.trim() ?? null };
+ if (at < 0) return running;
+ const line = lines[at].trim();
+ // Something else was said after it (the engine's own output): it is in.
+ if (lines.slice(at + 1).some((l) => !continues(l))) return running;
+ if (/admitted|available after|capped at|let go after|running uncapped|not waiting for it|is not checked/.test(line)) return running;
+ if (/waiting for memory|still waiting \(memory|under the \d+ MB floor/.test(line)) return { state: "memory", position: null, line };
+ if (/waiting|held for a render/.test(line)) return { state: "slot", position: null, line };
+ return running;
}
export async function askEditorOp(route, body, { editor = editorFromEnv(), emit = () => {}, pollMs = POLL_MS, onJob = () => {}, deadlineMs = null, onState = null } = {}) {