* fix(batch): check the speech model when restoring, not in every pipeline run
#4623 added the missing-model check to the batch transcribe stage. Every
batch pipeline test that does not stub it then failed in CI's model-free
environment, leaving main red. Restored jobs are the only ones that skip
enqueue's check, so restore now checks once and shows such a job as failed
with Retry, leaving the pipeline as it was.
Also confines queue record paths to the batch folder after resolving them
(the CodeQL path alerts on the record writer) and reads test files as UTF-8.
* fix(batch): check the speech model inside the transcribe step itself
Review found that a job queued before its speech model was removed could
still download it, and that checking at restore can run before startup
swaps a missing saved model for an installed one. The check now runs in the
transcribe function, right before the backend loads, for every job: queued,
retried or restored. Pipeline tests that stub the guarded transcribe call
never reach it; the one test that runs it with a stubbed model opts out.
Queue record paths are checked after resolving but replaced and removed by
their own directory entry, so a link can't make a cleanup delete another
job's record.
* feat(desktop): restart a crashed engine, ask before quitting running work, keep the batch queue across restarts
- A local engine that crashed after it had started restarts on its own
(1, 3, 6, 12, 30 s); a sixth crash in ten minutes, or a crash before it
ever started, stays on the recovery screen.
- A quit the user starts asks first while the engine reports running work;
confirmed update installs, OS shutdown and relaunches do not ask.
- Unfinished batch jobs keep a record beside their upload and are queued
again, in order, on the next backend start.
- Interrupted audiobook/story renders are announced once after launch with
a Resume action.
* changelog: add fragment for #4623
* test(dub): wait for the voice search to take focus
* fix(desktop): close the gaps review found in job resume and the quit prompt
- Quitting during a generation, clone, design or transcription now asks
first: the engine reports open requests that do work, not just jobs.
- Restart on CPU withdraws a pending automatic restart before it saves the
device choice, so the engine cannot start on the old device.
- Batch queue records hold only the upload's name, so they carry no home
path and still restore after the data folder moves.
- A save racing a cancel, a job skipped as cancelled, or a record that
cannot be deleted no longer brings finished or cancelled work back.
- One malformed record is dropped on its own instead of stopping every
saved job from restoring.
- A queued or restored job whose speech model was removed fails with the
enqueue message instead of downloading it.
- The interrupted-render notice retries a failed check a few times.
* ci(python): gate Ruff and ty on the rules the code already passes
Ruff and ty are pinned in the dev group (never installed for users: the
app syncs with --no-dev and Docker installs without groups). CI's first
Python shard and `bun run lint:py` run the same checks.
- Ruff checks runtime-bug rules: syntax, undefined names and exports,
f-strings without fields, invalid characters, dropped asyncio tasks.
- ty fails on any rule the code passes today; the 23 rules with a backlog
warn, so new instances of every other rule fail CI.
Fixes what the rules found:
- The setup warmup task was not referenced and could be garbage-collected
mid-load; it is now held until it finishes.
- A perf-budget test fake called time.sleep without importing time.
- The scam guard's invisible-character class is written as escapes.
- Type-only names (httpx, Callable) are imported under TYPE_CHECKING.
* changelog: add fragment for #4614
* build(python): let lint:py sync the pinned tools before running them
* feat(stories): screenplay-style script editor with timecodes and icon controls
- Lines show an estimated start time and the speaker in a gutter, named only
when the speaker changes; characters get a colour bar, the narrator stays
neutral.
- Voice and speed chips appear under a line only when it overrides them;
defaults live in the hover toolbar.
- Auto-cast no longer invents speakers from one-off "Phrase: text" labels or
from pronouns ("she said" goes to the last named speaker), and its panel
folds away after a successful cast.
- Script and speed controls use icons with tooltips instead of text buttons
and help paragraphs; Cover and Loudness match the other setup sections.
* changelog: add fragment for #4605
* feat(stories): timeline dock with speaker tracks and a following playhead
- A dock pinned under the script holds the last render's play bar and one
track per speaker, each line a clip. Clicking a clip selects its line and
moves the playhead there; the ruler and lanes seek on click; zoom with the
buttons or +/-.
- Clip positions and the gutter timecodes come from the render's real chapter
durations (or its total length) once there is one, and from the word-rate
estimate before; the dock says when positions are estimates.
- The script highlights the line being played.
- The runtime under the script matches the timeline, including per-line
speeds.
* test(longform): check the script instructions behind their info button
* changelog: add fragment for #4606
* fix(stories): stop casting determiners and offer to fold old pronoun speakers
- "said our host" / "her mother replied" name the noun, not the determiner,
so auto-cast no longer creates speakers like "Our".
- Stories auto-cast before the pronoun fix kept members such as "She", "He"
and "I". The script now names them and offers one click to remove them and
give their lines to the last named speaker (first person to the narrator),
keeping each line's own voice override.
* fix(stories): make the timeline readable on long stories
- Lay the tracks out in pixels with the ruler pinned to the top and speaker
names pinned to the left, so both stay in view while scrolling.
- Clips too narrow to read show only their colour instead of a cut-off "L…";
the full line stays in the tooltip and accessible name.
- Ruler labels keep about 90 px apart at any zoom; zoom goes up to 32x and the
view follows the playhead.
- The track area can be resized from a handle (mouse or arrow keys); the
height is remembered and the area never pads past its tracks.
* perf(stories): keep long scripts fast and add a line inspector
- A keystroke re-rendered and re-measured every line: about 2 s per key in a
400-line story. Rows are now memoised (their handlers read the current
draft through a ref, so a skipped render can't write stale lines) and
off-screen rows skip layout with content-visibility. Typing drops to
~35 ms of script work per key; first load halves.
- A right-hand inspector shows the selected line's timing, speaker, voice and
speed, editable in place, or a per-speaker line/runtime summary.
- The Stories editor uses the full window width instead of max-w-6xl.
- The "older saved result" notice becomes a one-line row with its detail
in an info tooltip, instead of a large card in the sidebar footer.
* fix(stories): address review findings on the screenplay editor
- A pronoun after a screenplay label ("BOB: Hi." then "he said") now refers
to that speaker instead of an earlier prose one.
- Consecutive legacy lines stored with no speaker read as one speaker.
- Folding pronoun cast members also reassigns chapter markers that named
them, without a chapter counting as the last named speaker.
- The speed popup stays open while a line's first speed is set; the chip
moves under the text only after the popup closes.
- Disabled icon actions stay focusable so their tooltip still names them.
- The book speed explanation is a keyboard-reachable info button.
* fix(stories): address review findings on the timeline
- A render's timing maps only onto the script it was made from: renders now
save a timing key of the lines, and after edits the timeline falls back to
estimates and stops linking clips and highlights to the audio.
- [pause] markers count as silence, so pause-only lines and chapters keep
their place on the timeline.
- A failed chapter takes no time; a partial render without per-chapter
durations is not spread over the whole script.
- The time grid runs left to right in right-to-left languages, so the
playhead lines up with clips and ruler.
- Resize drags use pointer capture and end on cancel, lost capture or unmount.
- The inspector keeps an explicit unassigned speaker choice.
- A failed saved-audio check is shown, not only announced.
- Off-screen rows skip layout per column, so the hover toolbar isn't clipped.
* feat(stories): clip waveforms, playback keys and changed-line markers
- Clips show the render's waveform. A new GET /audio-peaks/{name} decodes a
saved output with ffmpeg at 1 kHz mono and returns its loudness outline,
cached per file version, so a long render costs the browser nothing.
- Editing-suite keys on the Stories page: Space play/pause, J back 5 s,
K pause, L play (again for faster), Home/End. Ignored in fields and with
modifiers; listed in an info button.
- Renders save a fingerprint per line, so lines edited, re-cast, re-timed or
added since the render get a marker, and the timeline counts them.
- The line toolbar shows on hover or when focus enters it, not while typing,
and sits inside the row. Rows skip layout off-screen again (column-level
skipping laid out every toolbar: 224 ms vs 111 ms per key in 400 lines).
* feat(stories): pick any gallery voice from the Stories voice lists
The cast, line and inspector voice lists only offered saved voices, so a
gallery voice took a trip to the Gallery page. They now share one picker:
a search box over the default, your voices and the whole Voice Gallery.
Your voices filter as you type; the gallery is searched on the backend,
loads 60 at a time as the list scrolls, and long lists mount only the rows
in view. Picking a gallery voice saves it to your voices (reusing an
earlier copy) and assigns the saved voice. Arrow keys and Enter pick.
* feat(stories): rework the paste box into "Add lines from text"
The panel was titled after a button ("Auto-cast"), its placeholder promised
sentence splitting whatever the mode, and both actions hid behind a button,
a scissors icon and two info tips.
- Heading and subtitle say what it does; a collapsed panel shows when text
is waiting.
- While empty it shows the three formats it recognises and an Open file
button; text files can be dropped on the box.
- While typing it previews the speakers found (in their cast colours, or
says everything goes to the narrator) and how many lines each action adds.
The parse runs deferred, so long pastes do not stall typing.
- Auto-cast is the primary action (Ctrl/Cmd+Enter); Split into lines is a
labelled button beside the split mode; a word count and Clear sit in the box.
* fix(stories): keep the speed help reachable while busy; NARRATOR lines never take a pronoun
- The busy state disabled the whole speed fieldset, which also took its help
tip out of the tab order; the slider and reset are disabled one by one now.
- An explicit NARRATOR: line became the referent for a later "she said",
casting that quote to the narrator; mergePronounCast already skipped it.
* fix(stories): address review findings on the timeline, line actions and voice picker
- Reaction-only lines ([laughter], [sigh]) took no time on the timeline, and a
chapter of them dropped out of the chapter count, shifting every later clip.
Estimates now come from the parser's spoken spans, reactions included.
- Changing a line's voice, its speaker's voice or the book voice left lines
unmarked as changed. Render keys (now v2) include each line's resolved voice,
so those lines are marked and the timeline stops mapping the old audio.
- Hovering a line put its action buttons over the first line of text. Rows now
keep an end strip for a ⋯ button; the actions expand from it only on hover or
focus of ⋯ or the actions themselves, or when ⋯ is pressed on touch screens.
- A gallery voice still saving when its picker closed could land later and
rebuild the cast from an old copy, erasing newer edits. Closing the picker
cancels it, and cast voice picks apply to the current cast.
* feat(sidebar): one line per setting in Stories, Audiobook and Batch dubbing
Title, voice, language and format (and Batch's target language, voice and
background switch) each sit on one row: muted icon and label on the left,
the control on the right, as Batch's engine row already did. The voice is a
compact button that opens the searchable voice list with the Voice Gallery;
Batch's presets appear there as their own group. Row labels are spans tied to
their fields, since the sidebar styles every label and legend as a heading.
* fix(stories): do not announce the speed help as unavailable while busy
aria-disabled on the speed group also marked its help button unavailable to
screen readers; the slider and reset carry their own disabled states.
* fix(stories): address timeline, voice picker and waveform review findings
- Time [slow]/[fast] spans at their own speed in line estimates.
- Only a render with a matching timing key maps onto the lines; resumed or
keyless renders keep estimates instead of seeking into edited text.
- Group timeline clips in linear time; ignore transport keys another
control already handled.
- The book voice picker offers no "engine default" row, which Generate
would refuse.
- Voice picker: keep loaded gallery pages when a later page fails, show the
gallery as loading until a new search settles so Enter can't pick a stale
result, and refresh profiles when a cancelled pick may have saved.
- Line actions: the hidden toolbar's box no longer reveals it or catches
clicks on the words.
- Waveform peaks rectify before the 1 kHz resample, so speech above 500 Hz
is no longer drawn as silence.
- Localize the import examples and the clip length; reword the timeline
estimate note; fix the Dutch "last render" wording.
* fix(stories): address the second round of timeline and picker review findings
- /audio-peaks needs the consumer tier: decoding a render is real work.
- The peak scan runs off the event loop.
- Timing keys include the output language, built by one timingContext()
helper shared by the saved key and the live comparison.
- Literal bracketed text ([Appendix]) gets time; only reactions are not words.
- A result recovered only by file name keeps estimated clips.
- With estimated clips the lanes don't seek, the playhead hides and the
clock shows the render's real length.
- Clips are reachable by keyboard (one tab stop, arrows/Home/End) and the
lanes no longer rebuild every waveform on each playback update.
- The waveform cache keeps the last four renders.
- A clip click selects its line even while the text is locked.
- A second pointer lifting no longer ends a resize drag.
- The inspector summary lists unassigned lines when there is no Narrator.
- Speeds use the app language's decimal mark everywhere they are shown.
- The voice picker says when the gallery failed to load, with Retry.
- The page's basics panel and result views move to their own files, so
the page stays under 500 lines.
* Report which Sortformer piece is missing and document the macOS setup
* Add changelog fragment for #4599
* Update diarisation status tests for the missing field and cover the model override in the docs
* Re-run CI on the merged branch
The segmented downloader's address-pinned transport refused the Hub's own
download URL when the local resolver answered with non-public addresses (a
VPN or proxy app in fake-IP mode answers 198.18.x.x) or did not finish
(resolver only works through the proxy, timeouts). Those UnsafeURLErrors were
terminal, so the install stopped even though the Hub metadata requests had
just succeeded through the same network.
Cancelling a sibling range's wire lookup after one range failed also marked
the policy scope as interrupted, turning an ordinary range failure into a
terminal "destination validation was interrupted" refusal.
Both reached opt-in failure reports as ValueError (UnsafeURLError subclasses
it). Now the wire lookup of the starting origin, or any lookup that does not
complete, raises AcceleratorUnavailable and the install falls back to
snapshot_download at once with the reason logged; wire lookups no longer mark
the interruption scope. A redirect target that resolves privately and an
interrupted redirect check still stop the install.
The only way to change a share PIN was to disable sharing and enable it
again: that closes the socket, drops every connected guest and can move the
port, because enable() looks for a free one.
rotate_pin() issues a new PIN on the running listener under the same lifecycle
lock, keeps the port and the address list, republishes the app state, and
resets the PIN guard so a guest locked out under the old PIN starts clean. The
old PIN (and the ov_pin cookie carrying it) fails the next request, which
bounces that guest to the PIN form.
Exposed as POST /system/network/rotate-pin next to enable/disable, so it
inherits the same loopback-only control surface and returns 409 while sharing
is off. docs/sharing.md now says the PIN can be rotated while sharing stays on.
Tests: tests/test_network_share_rotate.py drives the real enable/disable
lifecycle against a fake uvicorn server and asserts the same task and server
object survive rotation, the port and addresses are unchanged, the state is
republished, the guard is reset, and the route answers the new PIN or 409.
The capability document advertises the auth routes, and the 403 text already
differs per tier, but a client could only discover its own tier by provoking
an error on a real route. whoami answers the question directly for every
tier, anonymous included, with kind, capabilities, transport and the admin
session's opaque credential id -- never a token, a PIN or a key.
The response runs through the existing /api/auth cache-control rule
(no-store), and the route joins the frozen dependency-free GET inventory with
its reason, so the authz census keeps its guarantee that a new open GET is a
reviewed decision.
Tests: loopback (native capabilities), cookie session (admin_session +
credential_id, no token in the body), API key, and an anonymous remote caller
with no key configured.
- Loading model starts when the GPU worker runs ensure_ready() or the
OmniVoice cold load, not while the request waits for a worker.
- Native PCM streams stay queued until their first inference step.
- Keepalive lines count as bytes but do not mark a request streaming.
- Speech routes behind an ASGI root_path are tracked.
- A failed poll freezes the shown duration instead of rewinding it.
- Tests use a plain executor and assert exceptions propagate.
Review fixes in the #4572 train: legacy generated cue ids pair with saved rows
by their render-time snapshot and stay unpaired when ambiguous; a retained
Listen range applies once seeking is allowed; the dub smoke expects no cue
control when the publication lookup fails; Sorani finds Central Kurdish; tests
synchronise with barriers instead of sleeps.
Review fixes for #4538 in the #4572 train: the fork is in flight from the
moment it claims its directory, Clear history picks its ids under the job
lock, a source replaced mid-fork aborts it, missing borrowed media is refused,
an id with a history row is a conflict rather than inherited, an abandoned
fork directory is recoverable, withdrawal markers outlive pruning while held,
media_language is carried over, and POST /dub/fork has a typed response.
"Kurdish" (ku) resolves to Northern Kurdish in NLLB and OmniVoice, so Sorani
speakers had no dub target although OmniVoice speaks ckb and NLLB has ckb_Arab.
Fixes#4565
QC keeps its mix snapshot until an abandoned ASR worker drains; legacy renders
without segment ids map generated ids by position; original-track MP4 language
keeps a registered tag such as fil; failed preview muxes leave no temp file.
The dub smokes wait for settled state before asserting. Review follow-ups to
#4551.
Review fixes for #4551: QC without a publication now validates its write against
the revision it scored, so a same-text replacement cannot take old scores; a
track without its own cue order no longer borrows the last-rendered language's;
the live YouTube smoke picks the target in Project setup.
Review fixes for #4564: decode references soundfile cannot read through
audio_io before capping, delete the oldest prepared reference copies past 32,
and keep trimming a duration span the renderer splits into chunks.
A single span before a [pause] still received the requested duration but was
then edge-trimmed, shortening the constrained speech. One predicate now decides
whether the duration reaches a span, and the planner applies the same duration
exception as plain text.
Fixes#4562