Archilyzer · Source

archilyzer

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

commit bb735b4ef244f1aedb9ac9aec986f2c6d7d4e36d
parent 553dafbf20ddc25547465b595da78312046af47c
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Wed, 11 Nov 2026 18:53:30 -0500

umtool: the CLI registry, cli.md and knobs.md say a character's presets, this video's own characters and posts character; the audition and the lint's guard ask this video's characters first; an anonymous character is refused the pool through use --everywhere too

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

Diffstat:
Meditor/CHANGELOG.md | 1+
Mumtool/components/projects/VoicesPanel.tsx | 2+-
Mumtool/docs/cli.md | 23++++++++++++++++-------
Mumtool/docs/knobs.md | 112++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------
Mumtool/lib/cli/groups.mjs | 26++++++++++++++++----------
Mumtool/lib/cli/verbs.mjs | 39++++++++++++++++++++++++++++++---------
Mumtool/lib/report/castAudition.mjs | 11+++++++++--
Mumtool/lib/report/castCli.mjs | 29+++++++++++++++++------------
Mumtool/lib/report/characters.test.mjs | 7+++++++
Mumtool/lib/report/lintCli.mjs | 7+++++--
Mumtool/lib/report/postNarrationCli.mjs | 13+++++++++----
11 files changed, 200 insertions(+), 70 deletions(-)

diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## [Unreleased] +- **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 is shown and said under a shown name, "Anon 1", "Anon 2" by default. `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 does not use an anonymous character's shown name, 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. - **The dashboard says when a media drive is not answering, slow, or not mounted.** A stalled external drive used to show only on `/storage` and in channel badges, so the editor looked broken with nothing on its front page saying why. The dashboard now opens with one card per storage location in trouble: **not answering** (an alert: pages and polls skip the drive, and its channels' jobs wait until it answers), **answering slowly** (everything still runs, just late), or **not mounted** (only when some channel's media is on it). Each card links to `/storage` and to that location's channels. On `/storage` each location has a **Drive** line that says when the drive last answered and how long it took (for example "answering — 12 ms (a read in the editor), last at 11:42"), and a **slow** chip appears next to Available when two reads in a row on it take half the 3-second limit or more (one long read is not enough). `pnpm ops get storage` reports the same for each location under `rows[].drive`: `state` (`ok`, `slow`, `stalled` or `unmounted`), `since`, `lastOkAt`, `latencyMs`, the cause and the one-line text. - **A transcription or backfill run waits while its channel's media drive is not answering.** Before, a run that started while the drive answered kept going after the drive stalled. Each next video asked the stalled drive for its audio, waited about 30 seconds and failed. Now the run pauses at the next video and says so in its log ("Holding: the media drive "…" is not answering (since 11:35) — no new transcription starts until it answers again"), then resumes by itself when the drive answers. If it has held for 5 minutes, the run checks the drive itself from a separate process, and it logs that it is still holding every 10 minutes. A run also follows a channel that is moved to another drive while it runs. A video that is refused because the drive is not answering is skipped, not added to the channel's failed-transcriptions list, and is transcribed on a later run. A downloaded video is also not moved into a saved-video store on a drive that is not answering. It stays in the video's folder, and a later pass stores it. diff --git a/umtool/components/projects/VoicesPanel.tsx b/umtool/components/projects/VoicesPanel.tsx @@ -546,7 +546,7 @@ export default function VoicesPanel({ project, posts, initialWho = null }: { pro <button type="button" data-audition-use="project" disabled={busy} onClick={() => void use(c.spec, "project")} className={buttonVariants({ variant: "outline", size: "sm" })}> Use for this project </button> - <button type="button" data-audition-use="cast" disabled={busy} onClick={() => void use(c.spec, "cast")} className={buttonVariants({ variant: "outline", size: "sm" })} title="the cast: this character reads in it in every project"> + <button type="button" data-audition-use="cast" disabled={busy || !!chosen.character?.anonymous} onClick={() => void use(c.spec, "cast")} className={buttonVariants({ variant: "outline", size: "sm" })} title={chosen.character?.anonymous ? "an anonymous character stays in this video: it never enters the pool" : "the cast: this character reads in it in every project"}> Use everywhere </button> </div> diff --git a/umtool/docs/cli.md b/umtool/docs/cli.md @@ -22,8 +22,9 @@ Inbox cannot disagree about what is wrong with one. | `check [<project>] [--json]` | **exit 1 on anything blocking** — including an `out/`, `clips/` or `share-*/` link whose drive is not there (`storage-unreachable`) | | `links <project> --embed-ids [--clips a,b] [--dry-run] [--json]` | the **published embed id**: every clip citing a Rumble URL-slug folder the archive does not serve gets `siteVideo` (the folder's `metadata.info.json` id, shareLine.mjs `siteVideoFor`), a citeUrl naming the folder moved with it; no network, one write, one undo point. The Cut tab's Project › Rumble cites ([knobs.md](knobs.md#the-inspector-panels-this-weeks-hand-edits-in-the-ui)) | | `links <project> [--json] [--fix]` | do the clip QRs open on their sites? `corpus.json` → the channel's manifest → `slugToPage` → the shard's record, one request at a time, shards from the cue cache; recorded in `out/links.json`, which `check` reads (`link-dead` blocking, `links-unverified`, `links-unchecked`); `--fix` rewrites a Twitch id the site serves as `v<id>`, and a Rumble folder id (the URL slug) as the embed id the site serves (the clip gets `siteVideo`); **exit 1** when a link is dead ([knobs.md](knobs.md#do-the-qr-links-open)). The same record dates each site's deploy: a cited video newer than it is `site-deploy-behind` ([knobs.md](knobs.md#the-sites-the-links-depend-on)) | -| `cast [ls] \| add <id> --name … --voice <engine:voice> [--handles a,b] [--speakers …] [--convert-engine e] [--convert-voice v] [--convert-pitch target\|source\|contour] [--convert-semitones n] [--narrator] \| set <id> … \| rm <id> \| undo [--json]` | **THE CAST** (`<reports>/.umtool/cast.json`, [knobs.md](knobs.md#the-cast-each-characters-voice-in-every-project-and-the-voices-page)): the characters across projects and their STOCK voices, a layer under each project's voice map; one writer, an undo point a write. A character's `convert` entry is what a recording of them is made into: the stock voice, the engine, and the **pitch** the converted read lands on (`--convert-pitch`: `target` the stock voice's own, `source` the pitch it was read at, `contour` the read's rises and falls at the stock voice's register; `--convert-semitones` -12…12 moves a followed one; `set` lays the flags given over the entry). A followed pitch on an engine that has none, or semitones with nothing followed: **exit 1** | -| `cast project <project> [--json]` · `cast use <project> <character\|@handle> <voice> [--everywhere]` · `cast reread <project> <character> [--dry-run]` | a project's characters (each voice now, where it comes from, its stale reads), the voice for this project or everywhere, and the re-reads that asks for | +| `cast [ls] \| add <id> --name … --voice <engine:voice> [--handles a,b] [--speakers …] [--speed s] [--convert-engine e] [--convert-voice v] [--convert-pitch target\|source\|contour] [--convert-semitones n] [--enhance on\|off] [--trim on\|off] [--trim-pad ms] [--direction "…"] [--narrator] \| set <id> … \| rm <id> \| undo [--json]` | **THE CAST** (`<reports>/.umtool/cast.json`, [knobs.md](knobs.md#the-cast-each-characters-voice-in-every-project-and-the-voices-page)): the characters across projects, one writer, an undo point a write. **A character is a PRESET**, two of them ([knobs.md](knobs.md#a-character-is-a-preset)): `synthetic` -- the STOCK voice it reads in (`--voice`) and its speed (`--speed` 0.5–2; Orpheus has none) -- and `recorded` -- what a recording of them is made into: the stock voice (`--convert-voice`; a file or a recording is refused), the engine, the **pitch** the converted read lands on (`--convert-pitch`: `target` the stock voice's own, `source` the pitch it was read at, `contour` the read's rises and falls at the stock voice's register; `--convert-semitones` -12…12 moves a followed one), whether it is cleaned first (`--enhance`), its edges trimmed to speech (`--trim`, `--trim-pad` the ms kept either side) and a `--direction` (one line for the person reading, never sent to a model). `set` lays the flags given over the presets; `default` for one takes that key off; `--no-convert`, `--no-speed`. A version 1 file (`voice`, `convert` at a character's top) reads as these presets and the first write makes it version 2 (`undo` puts the old file back). A followed pitch on an engine that has none, semitones with nothing followed, a speed or a pad out of range: **exit 1** | +| `cast project <project> [--json]` · `cast use <project> <character\|@handle> <voice> [--everywhere]` · `cast reread <project> <character> [--dry-run]` | a project's characters: each one's voice now (and speed) and **where it comes from** -- the chain one read asks, first hit wins: the command's flags, the item's own character (`posts character`), this video's character for the author (then its voice map), the cast's, the narrator's, the default -- what a recording of them is made into, its stale reads; this video's own characters; the items that name their own. `use`: the voice for this project (its own character's when it has one for them, else the voice map) or everywhere, and the re-reads that asks for | +| `cast project <project> add <id> [--name "…"] [--voice <engine:voice>] [--handles a,b] [--anonymous [--shown "…"]] [the preset flags]` · `set <id> … [--no-voice] [--no-anonymous]` · `rm <id>` · `undo` · `pool <id>` · `keep <character\|@handle> [--anonymous]` `[--json]` | **THIS VIDEO's OWN CHARACTERS** (`<project>/narration/characters.json`, [knobs.md](knobs.md#this-videos-own-characters-and-an-items-own)): the cast's shape and the cast's writer (a token, an undo point a write, atomic, a broken file never overwritten), for people who must not enter the pool. `--anonymous`: shown on screen and said under a **shown name**, never its own (`--shown`; default the next of `Anon 1`, `Anon 2` …). `--voice` is optional here: a character with none leaves the voice to the layers under it. `narration/voices.json` keeps working under it (a handle in it reads as a character with only a synthetic voice) and is never rewritten by these. `pool <id>` (**Add to the pool**) moves one into the cast -- an anonymous one, or an id the cast has, is refused; `keep` (**Keep in this video only**) copies a cast character here (its presets changed for this video alone), or gives an author with no character one, in the voice they read in now. A refusal: **exit 1**, nothing written | | `cast audition <character\|@handle> --voices a,b,… [--project <p>] [--text "…" \| --item <id> \| --line <n> \| --stock] [--no-score \| --score-only] [--json] [--progress ndjson]` | **AN AUDITION**: one line read by 2-6 stock voices through the editor's tts op, levelled to -20 LUFS in `<p>/narration/auditions/` (cached), scored for closeness to the character's real voice (`speakers.json`; TitaNet, local) | | `speaker-check <project> [--clip <id> …] [--json] [--progress ndjson]` · `--set 'Name=<clip>,<channel>/<id>,channel:<slug>'` · `--remove <name>` · `--list` | which of the project's **named voices** (`speakers.json`) each clip is: TitaNet-small, local, against each voice's robust centroid → `<project>/speaker-check.json` (merged); the walk's **Speaker:** badge and **Check speaker** ([report-video.md](report-video.md#the-speaker-check-on-the-walk-which-of-several-voices)) | | `quote-check <project> [--clips a,b] [--pad S] [--json]` · `quote-check <project> --status` | **is each clip's quote in the seconds it plays?** The cut ±15 s of the source the render would cut it from, transcribed by the editor (`pnpm ops transcribe`, words on — its transcription lane), the quote found in those words and in the cues: `ok`, `moved` (heard more than 0.5 s from where the cues have it), `not-found`; rows in `quote-check.json`, stale when the cut or the quote changes; `check` blocks on `moved`/`not-found` (`clip-quote-moved`, `clip-quote-missing`), a take refuses them, `prep --status` counts them ([knobs.md](knobs.md#the-quote-check-is-the-quote-where-the-clip-plays)) | @@ -130,10 +131,11 @@ Inbox cannot disagree about what is wrong with one. | `posts progress <project> [auto\|on\|off\|default] [--json]` | the cut's **progress bar** default (`render.posts.progress`, `updatePostProgressRender`; [report-video.md](report-video.md#the-progress-bar)); bare, which items draw it | | `posts roles <project> [<item> …] [--write] [--set <n>=<role>,…] [--json]` | a narrated read **piece by piece** ([knobs.md](knobs.md#thread-reads-every-part-of-a-read-on-screen-while-it-is-said), [report-video.md](report-video.md#thread-reads)): the text each part of the picked take reads -- `parent:<i>`, `quoted`, `post`, `media:<i>` -- stored or inferred, what the card shows for each, and the build's guard (a part read off a post the card hides is refused). `--write` stores the inferred roles on the picked takes' parts (one write; the import stores them for every new take); `<item> --set n=role,…` sets parts' roles by hand (`off`: inferred again); a part out of range or an unknown role is refused (**exit 1**) | | `posts narrate <project> --import [--dry-run] [--json]` · `--list` · `<item> [--script "…"] [--pick <n>] [--approve\|--unapprove] [--off\|--on] [lead= tail= ramp= linger= clip=read\|full wet= lowpass= duck=on\|off short=hold\|loop attach=under\|after lufs= pace=fast\|normal]` · `<item> --take [--note "…"] [--voice v] [--engine e] [--speed s] [--script "…"]` · `<item> --derive <n> --op enhance\|convert [--engine e] [--voice v]` · `<item> --delete <n>` · `--all --draft-scripts [--force]` · `--all --take [--limit N]` · `--cut <k=v>…` | a **narrated post item** ([report-video.md](report-video.md#narrated-post-items), [knobs.md](knobs.md#a-narrated-post-item)): `--import` reads `narration/posts/index.json` (`[{id, entry, script, takes: [{file, engine, voice, seconds}], pick}]`, and a take's `take-<n>.parts.json`) into the cut in ONE write, measuring each take (length, loudness); a re-run adds only takes not there. `--take` asks the EDITOR for a new take (`POST /api/ops/tts`, its `out` the next `narration/posts/<postId>/take-<n>.<engine>-<voice>.wav`; a job, waited for; `ARCHILYZER_EDITOR_URL`, `WORKER_TOKEN`) and picks it, its `--note` kept with it; `--pick <n>` is the take's number as `--list` shows it. `--derive <n>` makes a NEW take from take n through the editor's `voice-enhance` / `voice-convert` op (a stock synthetic voice; "not installed" until the editor has the engine), the original kept; `--delete <n>` moves a take's file to the post's `.trash/`. A new script or pick takes the approval away. `--all --draft-scripts` writes every post's words as its script, VERBATIM (cleaned only to be spoken: a reply's leading @handles, links, emoji dropped -- a handle typed inside the message is kept and said "at <handle>", the lexicon first; `plan(s)` → plans, `w/` → with, `&` → and; paragraphs kept). `--cut` sets `render.postNarration` (and its read-follow: `follow=on\|off`, `follow.dim=`, `follow.ease=`; its thread reads: `thread.parent=`, `thread.quoted=`, `thread.carry=`, `thread.reveal=`, `thread.shrink=`, `thread.dim=`, `thread.seconds=`, `thread.pan=`). Refused in the build's words (**exit 1**) A `--take` whose read says a slur the cut BEEPS is word-timed by the editor's transcription before it is kept -- never waited on: with the transcription lane held (as while Orpheus runs) the take is kept as read and the timing deferred (it says so, naming `posts narrate <p> <item> --words` to run after the release; the build refuses the take until then), and a timing still queued after 5 min is deferred the same way. An excerpted item (`posts set-item … excerpt=`) reads its spans. | -| `posts narrate <project> <item> --take --thread [--parents 0\|all\|none\|<n>] [--skip-parent <id\|parent:i>]… [--no-quoted] [--no-linked] [--read-seen] [--voice-for <handle>=<voice>]… [--voice v] [--engine e] [--note "…"] [--force] [--no-hold] [--dry-run] [--json]` | a **THREAD READ** as one command ([knobs.md](knobs.md#pronunciation-and-voices-the-lexicon-the-voice-map-a-thread-read), `lib/report/postThreadRead.mjs`): the post it answers (`--parents all`: every ancestor; `<n>`: parents 0..n; `none`), the post it quotes and the posts it links to, then his words, in DATE order, each in its author's voice (`--voice-for`, then the project's voice map, `posts voices`; his own: the narrator's), the redaction, the slur filter (a beep is skipped: a joined read is not word-timed) and the lexicon (`posts say`) applied. A parent or quoted post the item before already shows is not read again (`--read-seen`: it is). Each part is synthesized ONCE by the editor's tts op into `narration/parts-cache/<sha1(voice\|text)>.wav` (the transcription lane held meanwhile, only if it was not; `--no-hold`: left alone), joined (0.8 s between pieces, 0.6 between paragraphs, 0.25 inside one) into `take-<n>.<engine>-thread.wav` with `take-<n>.parts.json`, saved with its parts' roles, its lexicon and how it was asked (`read`) and PICKED — one write (one undo point). `--dry-run`: the pieces, voices and parts (cached or not), nothing asked. Already up to date (same words and voices): nothing done, **exit 0** (`--force`: again). A part not synthesized: **exit 1** (the parts made stay cached; run it again); `--json` prints `{ok: false, error}` too. A usage error: **exit 2** | +| `posts narrate <project> <item> --take --thread [--parents 0\|all\|none\|<n>] [--skip-parent <id\|parent:i>]… [--no-quoted] [--no-linked] [--read-seen] [--voice-for <handle>=<voice>]… [--voice v] [--engine e] [--speed s] [--note "…"] [--force] [--no-hold] [--dry-run] [--json]` | a **THREAD READ** as one command ([knobs.md](knobs.md#pronunciation-and-voices-the-lexicon-the-voice-map-a-thread-read), `lib/report/postThreadRead.mjs`): the post it answers (`--parents all`: every ancestor; `<n>`: parents 0..n; `none`), the post it quotes and the posts it links to, then his words, in DATE order, each in its author's voice (`--voice-for`, then the item's own character, this video's characters and voice map, the cast: `cast project`; his own: the narrator's) and at its character's speed (its synthetic preset's; `--speed`: every part at that one; Orpheus has none; a part at another speed is another cached part), the redaction, the slur filter (a beep is skipped: a joined read is not word-timed) and the lexicon (`posts say`) applied. A parent or quoted post the item before already shows is not read again (`--read-seen`: it is). Each part is synthesized ONCE by the editor's tts op into `narration/parts-cache/<sha1(voice\|text)>.wav` (the transcription lane held meanwhile, only if it was not; `--no-hold`: left alone), joined (0.8 s between pieces, 0.6 between paragraphs, 0.25 inside one) into `take-<n>.<engine>-thread.wav` with `take-<n>.parts.json`, saved with its parts' roles, its lexicon and how it was asked (`read`) and PICKED — one write (one undo point). `--dry-run`: the pieces, voices and parts (cached or not), nothing asked. Already up to date (same words and voices): nothing done, **exit 0** (`--force`: again). A part not synthesized: **exit 1** (the parts made stay cached; run it again); `--json` prints `{ok: false, error}` too. A usage error: **exit 2** | | `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] [--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. **`--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> --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 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**) | @@ -170,11 +172,17 @@ draft (the project's manifest); *project*: a project's other files, or reads; *c | `still <project> <clip> --at N [--take TAKE]` | one frame of a clip's fetched window at a source second, into shots/ | form · *project* | | `still <project> ls` | the pictures in the project's shots/ | form · *project* | | `cast ls` | the characters' voices across projects | form · *corpus* | -| `cast add <id> --name NAME --voice VOICE [--handles HANDLES] [--speakers SPEAKERS] [--convert-engine openvoice\|seed-vc] [--convert-voice CONVERT-VOICE] [--convert-pitch target\|source\|contour] [--convert-semitones N] [--note NOTE] [--narrator]` | a character: name, stock voice, handles | form · *corpus* | -| `cast set <id> [--name NAME] [--voice VOICE] [--handles HANDLES] [--speakers SPEAKERS] [--convert-engine openvoice\|seed-vc] [--convert-voice CONVERT-VOICE] [--convert-pitch target\|source\|contour] [--convert-semitones N] [--note NOTE] [--add-handle ADD-HANDLE] [--remove-handle REMOVE-HANDLE] [--no-convert] [--narrator] [--no-narrator]` | change a character | form · *corpus* | +| `cast add <id> --name NAME --voice VOICE [--handles HANDLES] [--speakers SPEAKERS] [--speed N] [--convert-engine openvoice\|seed-vc\|default] [--convert-voice CONVERT-VOICE] [--convert-pitch target\|source\|contour\|default] [--convert-semitones N] [--enhance on\|off\|default] [--trim on\|off\|default] [--trim-pad TRIM-PAD] [--direction DIRECTION] [--note NOTE] [--narrator]` | a character: name, stock voice, handles, its two presets | form · *corpus* | +| `cast set <id> [--name NAME] [--voice VOICE] [--handles HANDLES] [--speakers SPEAKERS] [--speed N] [--convert-engine openvoice\|seed-vc\|default] [--convert-voice CONVERT-VOICE] [--convert-pitch target\|source\|contour\|default] [--convert-semitones N] [--enhance on\|off\|default] [--trim on\|off\|default] [--trim-pad TRIM-PAD] [--direction DIRECTION] [--note NOTE] [--add-handle ADD-HANDLE] [--remove-handle REMOVE-HANDLE] [--no-convert] [--no-speed] [--narrator] [--no-narrator]` | change a character: its name, handles, presets | form · *corpus* | | `cast rm <id>` | a character out of the cast (an undo point) | form · *corpus* | | `cast undo` | the cast as it was before its last write | form · *corpus* | -| `cast project <project>` | the project's characters, their voices and drift | form · *project* | +| `cast project <project>` | the project's characters: each one's voice, where it comes from, its drift; this video's own | form · *project* | +| `cast project <project> add <id> [--name NAME] [--voice VOICE] [--handles HANDLES] [--anonymous] [--shown SHOWN] [--speed N] [--convert-engine openvoice\|seed-vc\|default] [--convert-voice CONVERT-VOICE] [--convert-pitch target\|source\|contour\|default] [--convert-semitones N] [--enhance on\|off\|default] [--trim on\|off\|default] [--trim-pad TRIM-PAD] [--direction DIRECTION] [--note NOTE]` | a character of this video only (anonymous: shown under Anon 1 …) | form · *project* | +| `cast project <project> set <id> [--name NAME] [--voice VOICE] [--handles HANDLES] [--shown SHOWN] [--speed N] [--convert-engine openvoice\|seed-vc\|default] [--convert-voice CONVERT-VOICE] [--convert-pitch target\|source\|contour\|default] [--convert-semitones N] [--enhance on\|off\|default] [--trim on\|off\|default] [--trim-pad TRIM-PAD] [--direction DIRECTION] [--note NOTE] [--add-handle ADD-HANDLE] [--remove-handle REMOVE-HANDLE] [--no-voice] [--no-convert] [--no-speed] [--anonymous] [--no-anonymous]` | change a character of this video's | form · *project* | +| `cast project <project> rm <id>` | a character out of this video's (an undo point) | form · *project* | +| `cast project <project> undo` | this video's characters as they were before their last write | form · *project* | +| `cast project <project> pool <id>` | Add to the pool: this video's character into the cast | form · *corpus* | +| `cast project <project> keep <character> [--anonymous] [--shown SHOWN]` | Keep in this video only: a cast character copied here, or an author given one | form · *project* | | `cast audition <character> --voices VOICES [--project PROJECT] [--text TEXT] [--item ITEM] [--line N] [--stock] [--no-score] [--score-only]` | one line read by 2-6 candidate voices, scored against the real voice | form · queued · *project* | | `cast use <project> <character> <voice> [--everywhere]` | the voice a character reads in, here or everywhere | form · *draft* | | `cast reread <project> <character> [--dry-run]` | the items that say a character in another voice, read again | form · queued · *project* | @@ -351,6 +359,7 @@ draft (the project's manifest); *project*: a project's other files, or reads; *c | `posts set-item <project> <item> key=value… [--in-take IN-TAKE]` | a post item's knobs | form · *draft* | | `posts narrate <project> [<item>] [key=value…] [--script SCRIPT] [--take] [--note NOTE] [--voice VOICE] [--engine ENGINE] [--speed N] [--pick N] [--approve] [--unapprove] [--off] [--on] [--thread] [--parents PARENTS] [--words] [--import] [--list] [--all] [--draft-scripts] [--limit N] [--force] [--recording RECORDING] [--as AS] [--pitch target\|source\|contour] [--semitones N] [--dry-run] [--in-take IN-TAKE]` | a post item's narration: script, takes, pick, approve, mix | form · queued · *draft* | | `posts say <project> ls\|add\|remove\|try\|stale [<word>] [<spoken>] [--case] [--item ITEM] [--note NOTE]` | the pronunciation lexicon | form · *draft* | +| `posts character <project> <item> [<character>] [--clear]` | the character one post item's own read is made with | form · *draft* | | `posts voices <project> ls\|set\|remove [<handle>] [<voice>]` | the voice map a thread read uses | form · *draft* | | `posts fit <project> [<items>…] [--all] [--linger N] [--dry-run]` | narrated posts' videos cut to their best part | form · queued · *draft* | | `posts fx <project> <item> ls\|add\|set\|remove [<what>] [--key value…] [--in-take IN-TAKE]` | a post item's word zooms, captions, clock, slams | form · *draft* | diff --git a/umtool/docs/knobs.md b/umtool/docs/knobs.md @@ -1275,16 +1275,21 @@ not the manifest: changing it never re-renders a card, it makes new takes. Beep still word-timed against its script as written (the replaced words are placed between the words heard). **The voice map** (`narration/voices.json`, `updateVoiceMap`): `{"<handle>": "<voice>", "*": "<voice>"}` -- the -project's override of THE CAST (below, "The cast"); the stock voice a read gives each author (handles without `@`, any case; `*` everyone it does not name, default `leo` on +project's override of THE CAST (below, "The cast"; a handle in it reads as one of this video's own characters with +only a synthetic voice, and the project's `narration/characters.json` answers before it); the stock voice a read gives each author (handles without `@`, any case; `*` everyone it does not name, default `leo` on Orpheus). The item's own author reads in the item's narrator voice (`narration.voice`, else the cut's) unless the map names them; `--voice-for <handle>=<voice>` overrides it for one read, `--voice` sets his post's. **A thread read** (`lib/report/postThreadRead.mjs`): `posts narrate <p> <item> --take --thread` reads the post it answers, the post it quotes, the posts its words link to and his words, in DATE order (`post-thread.mjs` `chronoPieces`), each piece cleaned to be spoken (a context post's paraphrase when it has one), each in its author's -voice. Each part (a paragraph; a long one split at a sentence end) is synthesized ONCE through the editor's tts op (a -job on its queue, paced; the GPU and the heavy slot are the editor's) into `narration/parts-cache/<sha1(voice|text)>.wav` -and reused by every read after -- a re-read after one word changed asks for that part alone. The transcription lane is +voice and **at its character's speed** (its synthetic preset's, [below](#a-character-is-a-preset); `--speed <s>`: every +part at that one, recorded on the take's `read`; Orpheus has no speed and is asked none; his own words with no preset: +the item's `narration.speed`). Each part (a paragraph; a long one split at a sentence end) is synthesized ONCE through +the editor's tts op (a job on its queue, paced; the GPU and the heavy slot are the editor's) into +`narration/parts-cache/<sha1(voice|text)>.wav` (a part at a speed: `…|x<speed>`, so the same words at another speed are +another part; `parts[i].speed` says it) and reused by every read after -- a re-read after one word changed asks for +that part alone. The transcription lane is held while parts are asked (only if it was not held; released after, on a failure, on Ctrl-C). The parts are joined (0.8 s between pieces, 0.6 between paragraphs, 0.25 inside one) into `take-<n>.<engine>-thread.wav` with `take-<n>.parts.json`, kept with each part's ROLE stored, and PICKED -- one write, one undo point @@ -1297,7 +1302,7 @@ was not synthesized (the parts made stay cached: run it again), 2 a usage error; | what a voice would be asked to say (the lexicon, the redaction, the slur filter) | **Reads and voices** → **Try it** | `umtool posts say <p> try "tbh @grok atm" [--item <id>]` | — | | the picked reads that say an entry the old way, each with the command that re-reads it | **Reads and voices** names them | `umtool posts say <p> stale [--json]` | — | | the voice map | **Reads and voices**: the map, **Set** a handle (or `*`) and a voice, ✕ removes; the cut's authors with the voice each gets | `umtool posts voices <p> set kirscheverstahl tara` · `set '*' leo` · `remove <handle>` · `ls` (each author the cut carries, and the voice each gets) | — | -| a thread read -- `takes[i].read: {kind: "thread", parents, skip?, quoted?, linked?, seen?, voiceFor?, voice?}` | the post bench plays and picks it like any take | `umtool posts narrate <p> <item> --take --thread` (parent 0) · `--parents all` (every ancestor) · `--parents none` · `--skip-parent <id>` (repeat) · `--no-quoted` · `--no-linked` · `--read-seen` · `--voice-for Movail2=leah` · `--voice leo` · `--force` · `--dry-run` · `--json` | — | +| a thread read -- `takes[i].read: {kind: "thread", parents, skip?, quoted?, linked?, seen?, voiceFor?, voice?}` | the post bench plays and picks it like any take | `umtool posts narrate <p> <item> --take --thread` (parent 0) · `--parents all` (every ancestor) · `--parents none` · `--skip-parent <id>` (repeat) · `--no-quoted` · `--no-linked` · `--read-seen` · `--voice-for Movail2=leah` · `--voice leo` · `--speed 1.1` · `--force` · `--dry-run` · `--json` | — | Recipes (copy them; `<p>` is the project, `<item>` the post item's id or its post's id): @@ -1318,20 +1323,29 @@ different ones to compare … and try to maintain consistent voices for differen **The cast** (`report-to-video/cast.mjs`; `<reports>/.umtool/cast.json`, one writer `lib/report/castStore.mjs` `castWrite` -- a token, an undo point a write, a broken file never overwritten): the CHARACTERS that recur across -projects -- `{id, name, handles, voice, convert?, speakers?, avatar?, note?, narrator?}`. `voice` is a STOCK voice -with its engine (`kokoro:am_michael`, `orpheus:zac`); `convert` the voice (and engine, openvoice | seed-vc) a -recording of them is converted to (default: `voice`) and the **pitch** that converted read lands on (`pitch`, -`semitones`: [below](#the-pitch-a-converted-read-lands-on)); `speakers` the names their REAL voice goes by in a project's -`speakers.json` -- a reference to compare a candidate with, never a target (the editor's convert op refuses a file; -the cast holds no path). One character may be the `narrator` (a recording's default character). - -**Every read asks one function** (`post-say.mjs` `voiceSourceOf` / `resolvePieceVoice`): the read's own voice -(`--voice-for`, `--voice`, the bench's voice field), the project's voice map (`narration/voices.json` -- the -project's OVERRIDE LAYER; a value may name its engine too), **the cast**, the narrator's (the item's own author), -the map's `*`, the default. A single post's take (`posts narrate --take`, the bench's Re-take: `readVoice.mjs`) and -each piece of a thread read agree. A voice that names another engine than the read's is synthesized by it: a -thread read may join Orpheus and Kokoro parts (each part records its `engine`; the disclosure names both). Projects -without a cast read as before. +projects -- `{id, name, handles, synthetic, recorded, speakers?, avatar?, note?, narrator?}` (version 2). **A +character is a preset**, two of them ([below](#a-character-is-a-preset)): `synthetic.voice` is a STOCK voice with its +engine (`kokoro:am_michael`, `orpheus:zac`) and `synthetic.speed` its speed; `recorded.convert` the voice (and engine, +openvoice | seed-vc) a recording of them is converted to (default: the synthetic voice) and the **pitch** that +converted read lands on (`pitch`, `semitones`: [below](#the-pitch-a-converted-read-lands-on)); `speakers` the names +their REAL voice goes by in a project's `speakers.json` -- a reference to compare a candidate with, never a target +(the editor's convert op refuses a file; the cast holds no path). One character may be the `narrator` (a recording's +default character). **A version 1 file** kept the voice in `voice` and the convert entry in `convert` at the +character's top: those keys are READ as the presets (`upgradeCharacter`), a reader is handed a view that still says +`voice` and `convert` (`charactersOf`), and the first write makes the file version 2 -- whose undo point is the +version 1 text, so `umtool cast undo` puts the old file back as it was. + +**Every read asks one chain, first hit wins** (`post-say.mjs` `voiceSourceOf` / `resolvePieceVoice` for a synthesized +read; `cast.mjs` `characterForRead` for a recording): **the command's flags** (`--voice-for`, `--voice`, `--speed`, +the bench's voice field; `--as`, `--pitch`), **the item's own character** (`narration.character`), **this video's +character** for the author (`narration/characters.json`, then `narration/voices.json` -- the project's OVERRIDE +LAYER; a value may name its engine too), **the cast's**, **the narrator's** (the item's own author), the map's `*`, +the default. A layer answers for a preset it HAS: a project character with no synthetic voice leaves the voice to +the layers under it, and its recorded preset still answers for a recording. A single post's take (`posts narrate +--take`, the bench's Re-take: `readVoice.mjs`) and each piece of a thread read agree, and `umtool cast project <p>` +prints the answer and its source (`item`, `project`, `cast`, `narrator`, `default`) for every author. A voice that +names another engine than the read's is synthesized by it: a thread read may join Orpheus and Kokoro parts (each part +records its `engine`; the disclosure names both). Projects without a cast read as before. **The guard**: `umtool lint <p>` warns for each picked read that says a cast character in another voice than now (`umtool cast reread`), and notes each cast voice the project's map overrides on purpose. @@ -1346,16 +1360,23 @@ with an excerpt of the real voice (`ref-<speaker>.wav`) to listen to beside them **A recording made a character's read**: `posts narrate <p> <item> --recording <file> [--as <character>]` keeps it as a recorded take (the original), cleans it (the editor's voice-enhance, when installed) and converts it (its -voice-convert) to the character's stock voice -- each a new take, the last picked, the disclosure line said. +voice-convert) to the character's stock voice -- each a new take, the last picked, the disclosure line said. The +character is the chain's (`--as`, the item's own, this video's for the author, the cast's, the narrator), and its +**recorded preset** is applied: `enhance: false` skips the clean, `trim.on: false` keeps its edges as recorded, +`trim.padMs` is the room kept either side of the words (`--clean` / `--no-clean`, `--trim` / `--no-trim` say otherwise +for one read). | Knob | In umtool | From a terminal | Route | |---|---|---|---| -| the cast -- `<reports>/.umtool/cast.json` | **Voices** (`/projects/<p>/voices`, from the Cut tab's Reads and voices): **the cast** list, ✕ removes, **Undo the last cast change**; an audition's **Use everywhere** adds or changes a character | `umtool cast ls` · `add <id> --name … --voice kokoro:am_michael --handles a,b [--speakers Jeremy] [--convert-engine seed-vc] [--convert-voice …] [--convert-pitch source\|contour\|target] [--convert-semitones n] [--narrator]` · `set <id> …` (`--add-handle`, `--remove-handle`, `--no-convert`) · `rm <id>` · `undo` | `POST /api/report/voices {op: "cast-rm" \| "cast-undo" \| "cast-set"}` | -| a project's characters -- each one's voice now and where it comes from, its reads, its drift, its real voice | **Voices**: the characters table | `umtool cast project <p> [--json]` | `GET /api/report/voices?project` | +| the cast -- `<reports>/.umtool/cast.json` | **Voices** (`/projects/<p>/voices`, from the Cut tab's Reads and voices): **the cast** list, **Presets**, ✕ removes, **Undo the last cast change**; an audition's **Use everywhere** (or an author's **Add to the pool**) adds or changes a character | `umtool cast ls` · `add <id> --name … --voice kokoro:am_michael --handles a,b [--speakers Jeremy] [the preset flags] [--narrator]` · `set <id> …` (`--add-handle`, `--remove-handle`, `--no-convert`, `--no-speed`) · `rm <id>` · `undo` | `POST /api/report/voices {op: "cast-rm" \| "cast-undo" \| "cast-set"}` | +| a character's presets -- `synthetic: {voice, speed}`, `recorded: {convert: {engine, voice, pitch, semitones}, enhance, trim: {on, padMs}, direction}` | **Voices** → a character's **Presets**: the voice and speed; converted to, by, pitch, semitones; clean it first; trim its edges and the pad; the direction; **Save presets** | `umtool cast set <id> [--voice kokoro:am_michael] [--speed 1.1] [--convert-engine seed-vc] [--convert-voice …] [--convert-pitch source\|contour\|target] [--convert-semitones n] [--enhance on\|off] [--trim on\|off] [--trim-pad 120] [--direction "higher, brisk, amused"]` (`default` for one takes it off) · this video's own: `umtool cast project <p> set <id> …` | `POST … {op: "character-set", scope: "cast" \| "project", id, voice?, speed?, convertEngine?, convertVoice?, convertPitch?, convertSemitones?, enhance?, trim?, trimPad?, direction?}` | +| a project's characters -- each one's voice now (and speed) and where it comes from, what a recording of them is made into, its reads, its drift, its real voice | **Voices**: the characters table | `umtool cast project <p> [--json]` | `GET /api/report/voices?project` | +| this video's own characters -- `<p>/narration/characters.json` | **Voices** → *this video's own characters*: **Add a character** (id, name, handles, anonymous and its shown name), **Presets**, ✕, **Undo the last change**; an author's **Keep in this video only**; a character's **Add to the pool** | `umtool cast project <p> add <id> --name … [--voice …] [--handles a,b] [--anonymous [--shown "Anon 1"]]` · `set <id> …` (`--no-voice`, `--no-anonymous`) · `rm <id>` · `undo` · `pool <id>` · `keep <character\|@handle> [--anonymous]` | `POST … {op: "character-add" \| "character-set" \| "character-rm" \| "characters-undo" \| "character-pool" \| "character-keep"}` | +| the character one post item's own read is made with -- `narration.character` | **Voices** → *an item read as a character of its own*: the item, **read as…**, **Set**; **clear** | `umtool posts character <p> <item> <character>` · `--clear` · none: print it | `POST … {op: "item-character", item, character}` | | an audition | **Voices** → a character's **Audition**: the line, the candidates (engine, voice, Add), **Render** (a job: the editor's tts, then the closeness through the heavy slot), each played at one loudness, **▶ Play each in turn** (the real voice first) | `umtool cast audition <character\|@handle> --project <p> --voices kokoro:am_michael,kokoro:am_onyx,orpheus:zac [--text "…" \| --item <id> \| --line <n> \| --stock] [--no-score \| --score-only] [--json]` | `POST /api/report/voices {op: "audition", who, voices, text?, item?}` | | 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, drop a file, clean / convert, **Import** (a job) | `umtool posts narrate <p> <item> --recording <file> [--as <character>] [--no-clean] [--no-convert] [--pitch …] [--semitones n]` | `POST … multipart {op: "recording", item, as?, file}` | +| 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}` | ```sh umtool cast add thequartering --name TheQuartering --voice kokoro:am_michael --handles thequartering --speakers Jeremy @@ -1364,8 +1385,53 @@ umtool cast audition thequartering --project quartering-diet --voices kokoro:am_ umtool cast use quartering-diet thequartering kokoro:am_michael --everywhere # then: umtool cast reread quartering-diet thequartering # each stale read made again (a take each, picked) umtool posts narrate quartering-diet <item> --recording my-read.wav --as thequartering +umtool cast set thequartering --speed 1.1 --convert-engine seed-vc --convert-pitch contour --direction "higher, brisk, amused" +umtool cast project quartering-diet add anon-1 --anonymous --handles somereplyguy --voice kokoro:am_puck # shown as "Anon 1" +umtool cast project quartering-diet keep @madamsavvy # a character of this video only, in the voice she reads in now +umtool posts character quartering-diet <item> anon-1 # this one item read as that character (--clear: by its handle) ``` +### A character is a preset + +The operator, 11 Nov 2026: "a preset of voice and other settings … different presets for synthetic and +human-filtered voices". A character carries two, picked by how the read is made: + +- **`synthetic`** -- a read the editor synthesizes: `voice` (`<engine>:<voice>`, a stock voice) and `speed` (0.5–2, + the tts op's; absent: 1). Speed is the only parameter the tts op takes beside the voice (Orpheus's emotion is in the + script, its `<sigh>` `<laugh>` tags; Orpheus has no speed and is asked none). It reaches a single take, the bench's + Re-take and every part of a thread read; `--speed` on the command wins. +- **`recorded`** -- a recording of them made their read: `convert` `{engine, voice, pitch, semitones}` (the target is + ALWAYS a stock synthetic voice: validation refuses a file, a path or a recording, in the cast and in a project's + own characters), `enhance` (cleaned first by the editor's voice-enhance; absent: yes), `trim` `{on, padMs}` (its + edges trimmed to speech -- the silence, a key click -- and the milliseconds of room kept either side; absent: on, + 80 ms before and 150 after) and `direction` -- ONE LINE FOR THE PERSON READING ("higher, brisk, amused"), shown to + them, **never sent to a model** (at most 200 characters). + +The disclosure line a cut carries is unchanged: it is made from the takes (a synthetic voice, a voice converted to a +synthetic voice), never from a preset. + +### This video's own characters, and an item's own + +**A project's own characters** (`<project>/narration/characters.json`, format `umtool-project-characters`; the cast's +writer in `castStore.mjs` -- `projectCharactersWrite`: a token, an undo point a write in `characters.undo.json`, +atomic, a broken file never overwritten) are the cast's shape, for people who must **not enter the pool**: they live +in that video only. One may be **`anonymous: true`** with a **`shown`** name -- what the read and the on-screen card +call them, never their own name; the default is the next unused of **"Anon 1", "Anon 2" …** (`cast.mjs` +`ANON_NAME_PATTERN`, the one place the pattern is written). A preset is optional here: a character with no synthetic +voice leaves the voice to the layers under it. It has no narrator (the narrator is the cast's). `narration/voices.json` +keeps working under it and is never rewritten by these commands. + +**Add to the pool** (`umtool cast project <p> pool <id>`) moves a project's character into the cast -- refused for an +anonymous one, and for an id the cast already has. **Keep in this video only** (`… keep <character|@handle>`) copies +a cast character into the project (its presets changed for this video alone; the pool's stay as they are), or gives +an author with no character one here, in the voice they read in now. + +**A post item's own character** (`narration.character`, `umtool posts character <p> <item> <id>`): the id of one of +the project's own characters, else of the cast's. Its presets answer for THAT item's own words before its author's +handle does -- a reply read as "Anon 2" while the same handle elsewhere reads as itself. An id nobody has is refused +by the command; one that stops existing later (the character removed) reads as its author does, and `umtool cast +project <p>` says so. + ### The pitch a converted read lands on A converter given no pitch speaks every read at the STOCK voice's own: measured 11 Nov, reads with a median pitch of diff --git a/umtool/lib/cli/groups.mjs b/umtool/lib/cli/groups.mjs @@ -67,15 +67,19 @@ export const GROUPS = [ cmd: "cast", usage: [ " umtool cast [ls] | add <id> --name … --voice <engine:voice> [--handles a,b] | set <id> … | rm <id> | undo", - " | project <p> | audition <character> --voices a,b,c [--project <p>] [--text …] | use <p> <character> <voice>", - " [--everywhere] | reread <p> <character> the CAST: characters' stock voices across projects (cast.json), a", - " project's characters and their drift, an audition of candidate voices (scored against the real voice)", + " | project <p> [add <id> … | set <id> … | rm <id> | undo | pool <id> | keep <character|@handle>]", + " | audition <character> --voices a,b,c [--project <p>] [--text …] | use <p> <character> <voice>", + " [--everywhere] | reread <p> <character> the CAST: characters across projects (cast.json), each a", + " PRESET -- synthetic (voice, speed) and recorded (convert, clean, trim, a direction) -- a project's", + " characters, its OWN (characters.json: anonymous ones), their drift, an audition of candidate voices", ], docs: [ - ["`cast [ls] \\| add <id> --name … --voice <engine:voice> [--handles a,b] [--speakers …] [--convert-engine e] [--convert-voice v] [--convert-pitch target\\|source\\|contour] [--convert-semitones n] [--narrator] \\| set <id> … \\| rm <id> \\| undo [--json]`", - "**THE CAST** (`<reports>/.umtool/cast.json`, [knobs.md](knobs.md#the-cast-each-characters-voice-in-every-project-and-the-voices-page)): the characters across projects and their STOCK voices, a layer under each project's voice map; one writer, an undo point a write. A character's `convert` entry is what a recording of them is made into: the stock voice, the engine, and the **pitch** the converted read lands on (`--convert-pitch`: `target` the stock voice's own, `source` the pitch it was read at, `contour` the read's rises and falls at the stock voice's register; `--convert-semitones` -12…12 moves a followed one; `set` lays the flags given over the entry). A followed pitch on an engine that has none, or semitones with nothing followed: **exit 1**"], + ["`cast [ls] \\| add <id> --name … --voice <engine:voice> [--handles a,b] [--speakers …] [--speed s] [--convert-engine e] [--convert-voice v] [--convert-pitch target\\|source\\|contour] [--convert-semitones n] [--enhance on\\|off] [--trim on\\|off] [--trim-pad ms] [--direction \"…\"] [--narrator] \\| set <id> … \\| rm <id> \\| undo [--json]`", + "**THE CAST** (`<reports>/.umtool/cast.json`, [knobs.md](knobs.md#the-cast-each-characters-voice-in-every-project-and-the-voices-page)): the characters across projects, one writer, an undo point a write. **A character is a PRESET**, two of them ([knobs.md](knobs.md#a-character-is-a-preset)): `synthetic` -- the STOCK voice it reads in (`--voice`) and its speed (`--speed` 0.5–2; Orpheus has none) -- and `recorded` -- what a recording of them is made into: the stock voice (`--convert-voice`; a file or a recording is refused), the engine, the **pitch** the converted read lands on (`--convert-pitch`: `target` the stock voice's own, `source` the pitch it was read at, `contour` the read's rises and falls at the stock voice's register; `--convert-semitones` -12…12 moves a followed one), whether it is cleaned first (`--enhance`), its edges trimmed to speech (`--trim`, `--trim-pad` the ms kept either side) and a `--direction` (one line for the person reading, never sent to a model). `set` lays the flags given over the presets; `default` for one takes that key off; `--no-convert`, `--no-speed`. A version 1 file (`voice`, `convert` at a character's top) reads as these presets and the first write makes it version 2 (`undo` puts the old file back). A followed pitch on an engine that has none, semitones with nothing followed, a speed or a pad out of range: **exit 1**"], ["`cast project <project> [--json]` · `cast use <project> <character\\|@handle> <voice> [--everywhere]` · `cast reread <project> <character> [--dry-run]`", - "a project's characters (each voice now, where it comes from, its stale reads), the voice for this project or everywhere, and the re-reads that asks for"], + "a project's characters: each one's voice now (and speed) and **where it comes from** -- the chain one read asks, first hit wins: the command's flags, the item's own character (`posts character`), this video's character for the author (then its voice map), the cast's, the narrator's, the default -- what a recording of them is made into, its stale reads; this video's own characters; the items that name their own. `use`: the voice for this project (its own character's when it has one for them, else the voice map) or everywhere, and the re-reads that asks for"], + ["`cast project <project> add <id> [--name \"…\"] [--voice <engine:voice>] [--handles a,b] [--anonymous [--shown \"…\"]] [the preset flags]` · `set <id> … [--no-voice] [--no-anonymous]` · `rm <id>` · `undo` · `pool <id>` · `keep <character\\|@handle> [--anonymous]` `[--json]`", + "**THIS VIDEO's OWN CHARACTERS** (`<project>/narration/characters.json`, [knobs.md](knobs.md#this-videos-own-characters-and-an-items-own)): the cast's shape and the cast's writer (a token, an undo point a write, atomic, a broken file never overwritten), for people who must not enter the pool. `--anonymous`: shown on screen and said under a **shown name**, never its own (`--shown`; default the next of `Anon 1`, `Anon 2` …). `--voice` is optional here: a character with none leaves the voice to the layers under it. `narration/voices.json` keeps working under it (a handle in it reads as a character with only a synthetic voice) and is never rewritten by these. `pool <id>` (**Add to the pool**) moves one into the cast -- an anonymous one, or an id the cast has, is refused; `keep` (**Keep in this video only**) copies a cast character here (its presets changed for this video alone), or gives an author with no character one, in the voice they read in now. A refusal: **exit 1**, nothing written"], ["`cast audition <character\\|@handle> --voices a,b,… [--project <p>] [--text \"…\" \\| --item <id> \\| --line <n> \\| --stock] [--no-score \\| --score-only] [--json] [--progress ndjson]`", "**AN AUDITION**: one line read by 2-6 stock voices through the editor's tts op, levelled to -20 LUFS in `<p>/narration/auditions/` (cached), scored for closeness to the character's real voice (`speakers.json`; TitaNet, local)"], ], @@ -1020,14 +1024,16 @@ export const GROUPS = [ "a narrated read **piece by piece** ([knobs.md](knobs.md#thread-reads-every-part-of-a-read-on-screen-while-it-is-said), [report-video.md](report-video.md#thread-reads)): the text each part of the picked take reads -- `parent:<i>`, `quoted`, `post`, `media:<i>` -- stored or inferred, what the card shows for each, and the build's guard (a part read off a post the card hides is refused). `--write` stores the inferred roles on the picked takes' parts (one write; the import stores them for every new take); `<item> --set n=role,…` sets parts' roles by hand (`off`: inferred again); a part out of range or an unknown role is refused (**exit 1**)"], ["`posts narrate <project> --import [--dry-run] [--json]` · `--list` · `<item> [--script \"…\"] [--pick <n>] [--approve\\|--unapprove] [--off\\|--on] [lead= tail= ramp= linger= clip=read\\|full wet= lowpass= duck=on\\|off short=hold\\|loop attach=under\\|after lufs= pace=fast\\|normal]` · `<item> --take [--note \"…\"] [--voice v] [--engine e] [--speed s] [--script \"…\"]` · `<item> --derive <n> --op enhance\\|convert [--engine e] [--voice v]` · `<item> --delete <n>` · `--all --draft-scripts [--force]` · `--all --take [--limit N]` · `--cut <k=v>…`", "a **narrated post item** ([report-video.md](report-video.md#narrated-post-items), [knobs.md](knobs.md#a-narrated-post-item)): `--import` reads `narration/posts/index.json` (`[{id, entry, script, takes: [{file, engine, voice, seconds}], pick}]`, and a take's `take-<n>.parts.json`) into the cut in ONE write, measuring each take (length, loudness); a re-run adds only takes not there. `--take` asks the EDITOR for a new take (`POST /api/ops/tts`, its `out` the next `narration/posts/<postId>/take-<n>.<engine>-<voice>.wav`; a job, waited for; `ARCHILYZER_EDITOR_URL`, `WORKER_TOKEN`) and picks it, its `--note` kept with it; `--pick <n>` is the take's number as `--list` shows it. `--derive <n>` makes a NEW take from take n through the editor's `voice-enhance` / `voice-convert` op (a stock synthetic voice; \"not installed\" until the editor has the engine), the original kept; `--delete <n>` moves a take's file to the post's `.trash/`. A new script or pick takes the approval away. `--all --draft-scripts` writes every post's words as its script, VERBATIM (cleaned only to be spoken: a reply's leading @handles, links, emoji dropped -- a handle typed inside the message is kept and said \"at <handle>\", the lexicon first; `plan(s)` → plans, `w/` → with, `&` → and; paragraphs kept). `--cut` sets `render.postNarration` (and its read-follow: `follow=on\\|off`, `follow.dim=`, `follow.ease=`; its thread reads: `thread.parent=`, `thread.quoted=`, `thread.carry=`, `thread.reveal=`, `thread.shrink=`, `thread.dim=`, `thread.seconds=`, `thread.pan=`). Refused in the build's words (**exit 1**) A `--take` whose read says a slur the cut BEEPS is word-timed by the editor's transcription before it is kept -- never waited on: with the transcription lane held (as while Orpheus runs) the take is kept as read and the timing deferred (it says so, naming `posts narrate <p> <item> --words` to run after the release; the build refuses the take until then), and a timing still queued after 5 min is deferred the same way. An excerpted item (`posts set-item … excerpt=`) reads its spans."], - ["`posts narrate <project> <item> --take --thread [--parents 0\\|all\\|none\\|<n>] [--skip-parent <id\\|parent:i>]… [--no-quoted] [--no-linked] [--read-seen] [--voice-for <handle>=<voice>]… [--voice v] [--engine e] [--note \"…\"] [--force] [--no-hold] [--dry-run] [--json]`", - "a **THREAD READ** as one command ([knobs.md](knobs.md#pronunciation-and-voices-the-lexicon-the-voice-map-a-thread-read), `lib/report/postThreadRead.mjs`): the post it answers (`--parents all`: every ancestor; `<n>`: parents 0..n; `none`), the post it quotes and the posts it links to, then his words, in DATE order, each in its author's voice (`--voice-for`, then the project's voice map, `posts voices`; his own: the narrator's), the redaction, the slur filter (a beep is skipped: a joined read is not word-timed) and the lexicon (`posts say`) applied. A parent or quoted post the item before already shows is not read again (`--read-seen`: it is). Each part is synthesized ONCE by the editor's tts op into `narration/parts-cache/<sha1(voice\\|text)>.wav` (the transcription lane held meanwhile, only if it was not; `--no-hold`: left alone), joined (0.8 s between pieces, 0.6 between paragraphs, 0.25 inside one) into `take-<n>.<engine>-thread.wav` with `take-<n>.parts.json`, saved with its parts' roles, its lexicon and how it was asked (`read`) and PICKED — one write (one undo point). `--dry-run`: the pieces, voices and parts (cached or not), nothing asked. Already up to date (same words and voices): nothing done, **exit 0** (`--force`: again). A part not synthesized: **exit 1** (the parts made stay cached; run it again); `--json` prints `{ok: false, error}` too. A usage error: **exit 2**"], + ["`posts narrate <project> <item> --take --thread [--parents 0\\|all\\|none\\|<n>] [--skip-parent <id\\|parent:i>]… [--no-quoted] [--no-linked] [--read-seen] [--voice-for <handle>=<voice>]… [--voice v] [--engine e] [--speed s] [--note \"…\"] [--force] [--no-hold] [--dry-run] [--json]`", + "a **THREAD READ** as one command ([knobs.md](knobs.md#pronunciation-and-voices-the-lexicon-the-voice-map-a-thread-read), `lib/report/postThreadRead.mjs`): the post it answers (`--parents all`: every ancestor; `<n>`: parents 0..n; `none`), the post it quotes and the posts it links to, then his words, in DATE order, each in its author's voice (`--voice-for`, then the item's own character, this video's characters and voice map, the cast: `cast project`; his own: the narrator's) and at its character's speed (its synthetic preset's; `--speed`: every part at that one; Orpheus has none; a part at another speed is another cached part), the redaction, the slur filter (a beep is skipped: a joined read is not word-timed) and the lexicon (`posts say`) applied. A parent or quoted post the item before already shows is not read again (`--read-seen`: it is). Each part is synthesized ONCE by the editor's tts op into `narration/parts-cache/<sha1(voice\\|text)>.wav` (the transcription lane held meanwhile, only if it was not; `--no-hold`: left alone), joined (0.8 s between pieces, 0.6 between paragraphs, 0.25 inside one) into `take-<n>.<engine>-thread.wav` with `take-<n>.parts.json`, saved with its parts' roles, its lexicon and how it was asked (`read`) and PICKED — one write (one undo point). `--dry-run`: the pieces, voices and parts (cached or not), nothing asked. Already up to date (same words and voices): nothing done, **exit 0** (`--force`: again). A part not synthesized: **exit 1** (the parts made stay cached; run it again); `--json` prints `{ok: false, error}` too. A usage error: **exit 2**"], ["`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] [--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. **`--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> --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 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/cli/verbs.mjs b/umtool/lib/cli/verbs.mjs @@ -87,6 +87,14 @@ const window_ = () => [num("--at", { help: "the window's start, s" }), num("--du // ---- the rows ------------------------------------------------------------------- const form = (verb, target, summary, args, extra = {}) => ({ verb, summary, target, ui: "form", args, ...extra }); +/** A character's preset flags (`umtool cast add|set`, `cast project <p> add|set`: castCli.mjs fieldsOf). */ +const presetArgs = () => [ + num("--speed", { help: "its voice's speed, 0.5–2 (Orpheus has none)" }), + pick("--convert-engine", ["openvoice", "seed-vc", "default"]), opt("--convert-voice", { help: "engine:voice -- a STOCK voice, never a file" }), + pick("--convert-pitch", ["target", "source", "contour", "default"], { help: "the pitch a converted read lands on" }), num("--convert-semitones", { help: "-12…12, moves a followed pitch" }), + pick("--enhance", ["on", "off", "default"], { help: "a recording is cleaned first" }), pick("--trim", ["on", "off", "default"], { help: "a recording's edges trimmed to speech" }), + opt("--trim-pad", { help: "ms kept either side, 0–2000 (or default)" }), opt("--direction", { help: "one line for the person reading (never sent to a model)" }), +]; /** A row's block menu (lane block-menus L8b): the block kinds that offer it, and what each fills in. */ const B = (blocks, fromBlock, more = {}) => ({ blocks, fromBlock, ...more }); const none = (verb, target, summary, reason, extra = {}) => ({ verb, summary, target, ui: "none", reason, args: [], ...extra }); @@ -128,20 +136,32 @@ export const VERBS = Object.freeze([ // ---- the cast ---- form("cast ls", "corpus", "the characters' voices across projects", [], { shape: "cast ls" }), - form("cast add", "corpus", "a character: name, stock voice, handles", [ + form("cast add", "corpus", "a character: name, stock voice, handles, its two presets", [ arg("id"), opt("--name", { required: true }), opt("--voice", { required: true, help: "engine:voice" }), opt("--handles", { help: "a,b" }), opt("--speakers", { help: "Name,…" }), - pick("--convert-engine", ["openvoice", "seed-vc"]), opt("--convert-voice", { help: "engine:voice" }), - pick("--convert-pitch", ["target", "source", "contour"], { help: "the pitch a converted read lands on" }), num("--convert-semitones", { help: "-12…12, moves a followed pitch" }), - opt("--note"), bool("--narrator", "the recordings' default character"), + ...presetArgs(), opt("--note"), bool("--narrator", "the recordings' default character"), ]), - form("cast set", "corpus", "change a character", [ - arg("id"), opt("--name"), opt("--voice", { help: "engine:voice" }), opt("--handles"), opt("--speakers"), pick("--convert-engine", ["openvoice", "seed-vc"]), opt("--convert-voice"), - pick("--convert-pitch", ["target", "source", "contour"], { help: "the pitch a converted read lands on" }), num("--convert-semitones", { help: "-12…12, moves a followed pitch" }), - opt("--note"), opt("--add-handle"), opt("--remove-handle"), bool("--no-convert"), bool("--narrator"), bool("--no-narrator"), + form("cast set", "corpus", "change a character: its name, handles, presets", [ + arg("id"), opt("--name"), opt("--voice", { help: "engine:voice" }), opt("--handles"), opt("--speakers"), ...presetArgs(), + opt("--note"), opt("--add-handle"), opt("--remove-handle"), bool("--no-convert"), bool("--no-speed"), bool("--narrator"), bool("--no-narrator"), ]), form("cast rm", "corpus", "a character out of the cast (an undo point)", [arg("id")]), form("cast undo", "corpus", "the cast as it was before its last write", []), - form("cast project", "project", "the project's characters, their voices and drift", [project()]), + form("cast project", "project", "the project's characters: each one's voice, where it comes from, its drift; this video's own", [project()]), + // This video's OWN characters (<project>/narration/characters.json; castStore.mjs: one writer, an undo point a write). + form("cast project add", "project", "a character of this video only (anonymous: shown under Anon 1 …)", [ + project(), arg("id"), opt("--name", { help: "required unless --anonymous" }), opt("--voice", { help: "engine:voice (none: the layers under it)" }), opt("--handles", { help: "a,b" }), + bool("--anonymous", "shown and said under a shown name, never its own"), opt("--shown", { help: "the shown name (default: the next Anon n)" }), ...presetArgs(), opt("--note"), + ], { shape: "cast project <project> add <id>" }), + form("cast project set", "project", "change a character of this video's", [ + project(), arg("id"), opt("--name"), opt("--voice", { help: "engine:voice" }), opt("--handles"), opt("--shown"), ...presetArgs(), opt("--note"), opt("--add-handle"), opt("--remove-handle"), + bool("--no-voice", "no voice of its own: the layers under it"), bool("--no-convert"), bool("--no-speed"), bool("--anonymous"), bool("--no-anonymous"), + ], { shape: "cast project <project> set <id>" }), + form("cast project rm", "project", "a character out of this video's (an undo point)", [project(), arg("id")], { shape: "cast project <project> rm <id>" }), + form("cast project undo", "project", "this video's characters as they were before their last write", [project()], { shape: "cast project <project> undo" }), + form("cast project pool", "corpus", "Add to the pool: this video's character into the cast", [project(), arg("id")], { shape: "cast project <project> pool <id>" }), + form("cast project keep", "project", "Keep in this video only: a cast character copied here, or an author given one", [ + project(), arg("character", { allowAt: true, help: "a cast character's id, or @handle" }), bool("--anonymous"), opt("--shown"), + ], { shape: "cast project <project> keep <character>" }), form("cast audition", "project", "one line read by 2-6 candidate voices, scored against the real voice", [ arg("character", { allowAt: true, help: "a character id or @handle" }), opt("--voices", { required: true, help: "engine:voice,engine:voice,…" }), project({ name: "--project", required: false }), opt("--text", { type: "text" }), opt("--item"), num("--line"), bool("--stock"), bool("--no-score"), bool("--score-only"), @@ -468,6 +488,7 @@ function posts() { pairs({ required: false, help: "the mix: lead= tail= linger= rate= …, one per line" }), inTake(), ], { ...Q, ...POST_ITEM }), p("say", "draft", "the pronunciation lexicon", [pick("op", ["ls", "add", "remove", "try", "stale"], { required: true }), arg("word", { required: false, allowAt: true, help: "the word or phrase (try: the text)" }), arg("spoken", { required: false }), bool("--case"), opt("--item"), opt("--note")], { shape: "posts say <project> <op>" }), + p("character", "draft", "the character one post item's own read is made with", [item(), arg("character", { required: false, help: "a character's id (this video's own, else the cast's); none: print it" }), bool("--clear", "by its author's handle again")], POST_ITEM), p("voices", "draft", "the voice map a thread read uses", [pick("op", ["ls", "set", "remove"], { required: true }), arg("handle", { required: false, help: "a handle, or *" }), arg("voice", { required: false })], { shape: "posts voices <project> <op>" }), p("fit", "draft", "narrated posts' videos cut to their best part", [items(), bool("--all"), num("--linger"), dry()], { ...Q, ...POST_ITEMS }), p("fx", "draft", "a post item's word zooms, captions, clock, slams", [ diff --git a/umtool/lib/report/castAudition.mjs b/umtool/lib/report/castAudition.mjs @@ -104,18 +104,25 @@ export function characterLines(manifest, handles) { } /** - * The character `who` names for an audition: a cast character (its id, a handle, its name), else an AUTHOR of the + * The character `who` names for an audition: one of the project's own characters (its id, a handle), a cast character (its id, a handle, its name), else an AUTHOR of the * project by @handle (`{ id, name, handles, voice: null }`). Throws AuditionError naming what is missing. */ export async function auditionCharacter(cast, who, { project = null, manifest = null } = {}) { - const { characterOf, findCharacter } = await import("umtool-report-to-video/cast"); + const { characterOf, findCharacter, projectCharactersOf, shownNameOf } = await import("umtool-report-to-video/cast"); const w = String(who ?? "").trim(); if (!w) throw new AuditionError("an audition is of a character (its id, or @handle)"); + // This video's own characters first (narration/characters.json): by id, then by a handle -- named as it is shown. + const own = project ? projectCharactersOf((await (await import("./castStore.mjs")).readProjectCharacters(project.dir)).doc) : []; + const mine = (c) => ({ ...c, name: shownNameOf(c), handles: c.handles ?? [], voice: c.voice ?? null }); if (!w.startsWith("@")) { + const p = own.find((x) => x.id === w.toLowerCase()); + if (p) return mine(p); const c = findCharacter(cast, w); if (c) return c; } const h = handleKey(w); + const p = own.find((x) => (x.handles ?? []).includes(h)); + if (p) return mine(p); const c = characterOf(cast, h); if (c) return c; if (!project) throw new AuditionError(`${w} is not in the cast (umtool cast ls), and no --project names it`); diff --git a/umtool/lib/report/castCli.mjs b/umtool/lib/report/castCli.mjs @@ -319,15 +319,15 @@ function handlesOf(ref, castRead, view, ownRead = null) { * `umtool cast project <p> add|set|rm|undo|pool|keep …`: THIS VIDEO's OWN characters (castStore.mjs * projectCharactersWrite: one writer, an undo point a write), and the two ways between them and the pool. */ -async function projectCharactersCommand(project, sub, rest, p, { reportsRoot, out, file }) { +async function projectCharactersCommand(project, op, rest, p, { reportsRoot, out, file }) { const what = (w) => `${w} (${project.id})`; - if (sub === "add" || sub === "set") { + if (op === "add" || op === "set") { const [id] = rest; - if (!id) throw new CastError(`cast project ${sub} takes the character's id`); + if (!id) throw new CastError(`cast project ${op} takes the character's id`); const f = fieldsOf(p); const r = await projectCharactersWrite(project.dir, (chars) => { const at = chars.findIndex((c) => c.id === id); - if (sub === "add") { + if (op === "add") { if (at >= 0) throw new CastError(`${id} is one of ${project.id}'s characters already (umtool cast project ${project.id} set ${id} …)`); if (!f.name && !p.has("--anonymous")) throw new CastError('cast project add takes --name "…" (or --anonymous: its shown name)'); const c = characterFrom(null, id, f, p, { layer: "project", anon: () => nextAnonName(chars) }); @@ -338,11 +338,11 @@ async function projectCharactersCommand(project, sub, rest, p, { reportsRoot, ou const c = characterFrom(chars[at], id, f, p, { layer: "project", anon: () => nextAnonName(chars.filter((_, i) => i !== at)) }); chars[at] = c; return { changed: "updated", character: c }; - }, { what: what(`${sub} ${id}`) }); + }, { what: what(`${op} ${id}`) }); out({ ok: true, scope: "project", changed: r.changed, character: characterView(r.character), token: r.token }, `${r.changed} in ${project.id}: ${line(r.character)}`); return 0; } - if (sub === "rm" || sub === "remove") { + if (op === "rm" || op === "remove") { const [id] = rest; if (!id) throw new CastError("cast project rm takes the character's id"); const r = await projectCharactersWrite(project.dir, (chars) => { @@ -354,12 +354,12 @@ async function projectCharactersCommand(project, sub, rest, p, { reportsRoot, ou out({ ok: true, scope: "project", removed: characterView(r.removed), token: r.token }, `removed ${id} from ${project.id}'s characters (umtool cast project ${project.id} undo puts it back)`); return 0; } - if (sub === "undo") { + if (op === "undo") { const r = await undoProjectCharacters(project.dir); out({ ok: true, scope: "project", undone: r.undone, at: r.at, left: r.left, token: r.token }, `undone: ${r.undone} (${r.left} undo point(s) left)`); return 0; } - if (sub === "pool") { + if (op === "pool") { // "Add to the pool": the project's character into the cast, then out of the project (the cast's answers here too). const [id] = rest; if (!id) throw new CastError("cast project pool takes the character's id"); @@ -383,7 +383,7 @@ async function projectCharactersCommand(project, sub, rest, p, { reportsRoot, ou out({ ok: true, scope: "cast", changed: "pooled", character: characterView(w.character), token: w.token }, `${id} is in the pool now, for every project: ${line(w.character)}`); return 0; } - if (sub === "keep") { + if (op === "keep") { // "Keep in this video only": a cast character copied here, or an author with none given one here. const [who] = rest; if (!who) throw new CastError("cast project keep takes a cast character (its id) or an author (@handle)"); @@ -413,7 +413,7 @@ async function projectCharactersCommand(project, sub, rest, p, { reportsRoot, ou out({ ok: true, scope: "project", changed: "kept", character: characterView(r.character), token: r.token }, `kept in ${project.id} only: ${line(r.character)}`); return 0; } - throw new CastError(`cast project <p>: nothing (the view), add, set, rm, undo, pool or keep (not ${sub})`); + throw new CastError(`cast project <p>: nothing (the view), add, set, rm, undo, pool or keep (not ${op})`); } /** @@ -531,7 +531,11 @@ export async function castCommand(args, { reportsRoot = REPORTS_ROOT, log = cons const removed = []; let scope = "project"; const cast = before.castRead.cast; + // This video's own characters that answer for these handles (their presets come before the cast's). + const ownFor = projectCharactersOf(before.ownRead.doc).filter((c) => (c.handles ?? []).some((h) => t.handles.includes(h))); if (p.has("--everywhere")) { + const anon = ownFor.find((c) => c.anonymous); + if (anon) throw new CastError(`${anon.id} is anonymous: it stays in this video, never the pool (umtool cast use ${project.id} ${anon.id} ${voice} sets its voice here)`); if (!isQualifiedVoice(voice)) throw new CastError(`--everywhere takes a voice with its engine (kokoro:am_michael), so every project reads it the same`); scope = "cast"; const castPath = before.castRead.file ?? file; @@ -555,7 +559,7 @@ export async function castCommand(args, { reportsRoot = REPORTS_ROOT, log = cons removed.push(h); } } - // (A character of this video's own for the handle still answers first: said, never removed unasked.) + // (A character of this video's own for the handle still answers first: said below, never removed unasked.) } else { // This video's own character for a handle takes it (its preset answers before the voice map); else the map. const own = projectCharactersOf(before.ownRead.doc); @@ -574,9 +578,10 @@ export async function castCommand(args, { reportsRoot = REPORTS_ROOT, log = cons const { rereadPlan } = await import("./castProject.mjs"); const plan = rereadPlan(project.id, after.manifest, after.view.characters.flatMap((c) => c.drift), t.handles); out( - { ok: true, scope, handles: t.handles, voice, removed, reread: plan.items.map((x) => ({ id: x.id, take: x.take, thread: x.thread, reads: x.reads, argv: x.argv })), skipped: plan.skipped }, + { ok: true, scope, handles: t.handles, voice, removed, ...(scope === "cast" && ownFor.some((c) => c.voice) ? { shadowedBy: ownFor.filter((c) => c.voice).map((c) => c.id) } : {}), reread: plan.items.map((x) => ({ id: x.id, take: x.take, thread: x.thread, reads: x.reads, argv: x.argv })), skipped: plan.skipped }, [ `${t.handles.map((h) => `@${h}`).join(", ")} read${t.handles.length === 1 ? "s" : ""} in ${voice} ${scope === "cast" ? "everywhere (the cast)" : `in ${project.id}`}${removed.length ? `; ${project.id}'s own override removed (${removed.join(", ")})` : ""}`, + ...(scope === "cast" ? ownFor.filter((c) => c.voice).map((c) => ` here, this video's own character ${c.id} still answers first (${c.voice}): umtool cast project ${project.id} rm ${c.id} follows the cast`) : []), plan.items.length ? ` ${plan.items.length} item(s) read them in another voice -- umtool cast reread ${project.id} ${who}:` : " no picked read says them in another voice", ...plan.items.map((x) => ` ${x.id} ${x.reads.map((r) => `${r.role} ${r.reads} -> ${r.want}`).join(", ")}`), ].join("\n"), diff --git a/umtool/lib/report/characters.test.mjs b/umtool/lib/report/characters.test.mjs @@ -331,6 +331,13 @@ test("\"Add to the pool\" and \"Keep in this video only\"", async () => { assert.equal(r.code, 0, r.text()); assert.equal((await readProjectCharacters(DIR)).doc.characters.find((c) => c.id === "stranger").voice, "kokoro:am_fenrir"); assert.deepEqual(JSON.parse(await readFile(path.join(DIR, "narration", "voices.json"), "utf8")), { stranger: "kokoro:am_onyx" }, "the map is left as it was"); + // An anonymous character never reaches the pool through `use --everywhere` either. + r = await cast(["use", "chars", "anon-a", "kokoro:am_onyx", "--everywhere"]); + assert.equal(r.code, 1); + assert.match(r.text(), /anon-a is anonymous: it stays in this video, never the pool/); + r = await cast(["use", "chars", "@guest", "kokoro:am_onyx", "--everywhere"]); + assert.equal(r.code, 1, "by its handle too"); + assert.equal((await readCast(ROOT)).cast.characters.some((c) => (c.handles ?? []).includes("guest")), false); // Add to the pool: into the cast, out of the project; one the cast has already is refused. r = await cast(["project", "chars", "pool", "me"]); assert.equal(r.code, 1); diff --git a/umtool/lib/report/lintCli.mjs b/umtool/lib/report/lintCli.mjs @@ -72,9 +72,12 @@ export async function castProblems(manifest, project, reportsRoot = REPORTS_ROOT const { readVoiceMap } = await import("./postSay.mjs"); const { resolverFor } = await import("./castProject.mjs"); const map = await readVoiceMap(project.dir).catch(() => ({})); - const { drift, overrides } = castDrift(manifest, { cast: castRead.cast, map, resolve: resolverFor({ map, cast: castRead.cast, render: manifest?.render ?? {} }) }); + // This video's own characters answer before the cast's (cast.mjs: the chain every read asks). + const { readProjectCharacters } = await import("./castStore.mjs"); + const own = (await readProjectCharacters(project.dir)).doc; + const { drift, overrides } = castDrift(manifest, { cast: castRead.cast, map, resolve: resolverFor({ map, cast: castRead.cast, project: own, render: manifest?.render ?? {} }) }); return { - warnings: drift.map((d) => `timeline ${d.id}: @${d.handle} (${d.character}) reads in ${d.reads} -- now ${d.want} (${d.from === "project" ? "the project's voice map" : d.from === "cast" ? "the cast" : d.from}): umtool cast reread ${project.id} ${d.character}`), + warnings: drift.map((d) => `timeline ${d.id}: @${d.handle} (${d.character}) reads in ${d.reads} -- now ${d.want} (${d.from === "project" ? (d.handle in map ? "the project's voice map" : "this video's own character") : d.from === "cast" ? "the cast" : d.from === "item" ? "the item's own character" : d.from}): umtool cast reread ${project.id} ${d.character}`), notes: overrides.map((o) => `@${o.handle} (${o.character}) reads in ${o.project} in this project -- the cast says ${o.cast} (an override on purpose; umtool posts voices ${project.id} remove ${o.handle} follows the cast)`), }; } diff --git a/umtool/lib/report/postNarrationCli.mjs b/umtool/lib/report/postNarrationCli.mjs @@ -46,12 +46,12 @@ export const NARRATE_USAGE = [ " umtool posts narrate <project> <item> [--script \"…\"] [--take [--note \"…\"] [--voice v] [--engine e] [--speed s]]", " [--pick <n>] [--approve|--unapprove] [--off|--on] [lead=… tail=… ramp=… linger=… clip=read|full", " wet=… lowpass=… duck=on|off short=hold|loop attach=under|after lufs=… rate=… pace=fast|normal] [--json]", - " umtool posts narrate <project> <item> --recording <file> [--as <character>] [--no-clean] [--no-convert]", + " umtool posts narrate <project> <item> --recording <file> [--as <character>] [--no-clean|--clean] [--no-trim|--trim] [--no-convert]", " [--pitch target|source|contour] [--semitones <n>]", " umtool posts narrate <project> <item> --derive <n> --op enhance|convert [--engine e] [--voice v]", " [--pitch target|source|contour] [--semitones <n>]", " umtool posts narrate <project> <item> --take --thread [--parents 0|all|none|<n>] [--skip-parent <id>]… [--no-quoted]", - " [--no-linked] [--read-seen] [--voice-for <handle>=<voice>]… [--voice v] [--force] [--dry-run]", + " [--no-linked] [--read-seen] [--voice-for <handle>=<voice>]… [--voice v] [--speed s] [--force] [--dry-run]", " umtool posts narrate <project> <item> … --in-take <take> any of these on a TAKE of the project: the pick, a new", " read (--take, --thread), the script, the mix -- written into the take's patch (umtool posts --help)", " umtool posts narrate <project> --all --draft-scripts [--force] | --all --take [--limit N]", @@ -72,8 +72,13 @@ export const NARRATE_USAGE = [ " --delete <n>: the take out of the list, its file moved to narration/posts/<postId>/.trash/ (soft).", " --recording <file> [--as <character>] [--no-clean] [--no-convert] [--label operator]: a person's RECORDING of the", " item made a character's read -- kept as a recorded take (the original), cleaned (the editor's voice-enhance), then", - " converted to the character's STOCK voice (umtool cast: its convert voice; default the post's author's, else the", - " narrator) -- each a new take, the last picked, the disclosure line said.", + " converted to the character's STOCK voice (umtool cast: its convert voice) -- each a new take, the last picked, the", + " disclosure line said. The character: --as (this video's own, else the cast's), else the item's own (umtool posts", + " character), this video's for the post's author, the cast's, the narrator. Its RECORDED PRESET says whether the", + " read is cleaned and its edges trimmed to speech (and the room kept): --clean | --no-clean and --trim | --no-trim", + " say otherwise for this read.", + " --speed <s> (--take, --take --thread): the speed the read is asked at (0.5-2; Orpheus has none) -- default its", + " character's (the synthetic preset's: umtool cast set <id> --speed), else the item's own. A thread read: every part.", " --derive <n> --op enhance|convert [--engine e] [--voice v]: a NEW take made from take n by the editor's op", " (enhance: denoise, level; convert: the performance kept, the timbre a STOCK synthetic voice) -- the original kept.", " --pitch target|source|contour [--semitones <n>] (a convert, by --derive or --recording): the PITCH the converted",