M1-14: Assemble the final transcript at stop, and after a crash #22
Labels
No labels
area/agent
area/capture
area/editor
area/geo
area/security
area/sync
area/transcription
area/ui
area/vault
area/voice-memos
blocked
milestone/M1
milestone/M2
milestone/M3
milestone/M4
needs-decision
needs-hardware
p0
p1
p2
type/bug
type/enhancement
type/feature
type/idea
type/infrastructure
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Stash/stash-ios#22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Assemble the transcript parts into one
.vttnext to the audio when a recording stops.Issue #9 writes parts and says assembly is done by hand. It should not be — the vault expects a
capture to arrive as a pair, and right now only half of it does:
Wes, in a voice memo on 2026-08-07: "does the phone automate, is it automatically piecing
together those transcripts, the parts, or is that the next phase? I feel like it was supposed to
be in issue number nine, but I don't recall exactly." Confirmed as wanted the same morning:
"the final transcription should be written after all stop."
Scope
<base>_transcription.vttin the documents directory, beside the audio.WEBVTTheader, then every cue block in order. Nothing else has to change: cue numbersare already continuous across parts and timestamps are already absolute, so assembly is
concatenation of cue blocks and not arithmetic. That was the point of #9's design.
than none, because a consumer cannot tell.
case below needs a path that works with no process state, and one path that is always exercised
beats a second one that only runs after a crash.
The case that makes this more than a convenience
A recording that ends because the app was killed never reaches
stop(). #7 established that thishappens — a route change with the phone locked terminated the app repeatedly, and the fragmented
.m4adesign is what saved the audio. The parts survive the same way; the assembled file doesnot, because nothing ran to write it.
So a capture with a
.partsfolder and no_transcription.vttbeside it is a recording thatdied. On the next launch, assemble it. That is the check, and it is cheap.
Open decision — does
.partssurvive assembly?Once the assembled file exists the parts are redundant, and leaving both means the same words are
on disk twice with nothing saying which a consumer should read.
Removing the folder is the tidier end state and makes "a
.partsfolder exists" mean exactly"this capture is unfinished", which is what the recovery check above wants to key on. Against it:
the parts are the only artifact if assembly itself is what fails, and deleting them turns one bad
write into lost text.
Recommendation is to remove it only after the assembled file is confirmed on disk. Wes to confirm.
Not in scope
Anything that touches the audio. One memo is still one continuous
.m4aand nothing here changesthat.
Done when
<base>_audio.m4aand<base>_transcription.vttside by side, andthe
.vttopens in a subtitle player against the audio..vttand no empty file to explain.