Skip to content

webui: show the segments, speaker turns and word timings the server returns - #412

Closed
CryptVenture wants to merge 1 commit into
0xShug0:mainfrom
CryptVenture:pr/webui-transcript-display
Closed

webui: show the segments, speaker turns and word timings the server returns#412
CryptVenture wants to merge 1 commit into
0xShug0:mainfrom
CryptVenture:pr/webui-transcript-display

Conversation

@CryptVenture

Copy link
Copy Markdown
Contributor

Split out of #373 as requested. This PR is the transcript detail display only; the package resolver, the catalog entries, the request wiring and the UI text fixes are separate PRs.

The problem

ASR, diarization, VAD and forced alignment already return timed detail — segments, speaker turns, word timings — and the result pane showed the flat transcript only. Word timings a user could have exported as subtitles were computed and thrown away on every run.

The change

The result pane renders whichever detail array came back — speaker turns, word timings or segments, in that order of specificity — as a scrollable table of start, end and content, with Save SRT and Save VTT beside it.

Spans arrive as sample offsets, so they are divided by the sample_rate the response carries. A response without that field renders no rows rather than a table of zeros; timecodes are formatted once and shared by the table and both subtitle formats, which differ only in the millisecond separator and the WEBVTT header.

Dependency: rows appear once the server reports sample_rate alongside the detail arrays, which is the companion server PR in this series. Without it this PR is inert rather than wrong.

Validation

npx svelte-check --tsconfig ./tsconfig.json
# 153 FILES 0 ERRORS 0 WARNINGS

The three functions were extracted and executed against a real Parakeet-TDT response (12 s clip, Metal, Apple M4 Max):

kind=words rows=24
SRT: 1 / 00:00:00,080 --> 00:00:00,533 / At3:45
VTT: WEBVTT /  / 00:00:00.080 --> 00:00:00.533
no sample_rate -> rows=0

Scope

+page.svelte (state, three helpers, one markup block), nine English strings in i18n.ts, and the table rules in app.css. No request behaviour changes. The generated bundle is deliberately excluded — it is not byte-reproducible, so regenerating it in each PR of this split would make the PRs conflict; happy to send one bundle-regeneration PR once the series lands.

…eturns

ASR, diarization, VAD and forced alignment already returned timed detail and
the UI dropped all of it on the floor: the result pane showed the flat
transcript only, so word timings a user could have exported as subtitles were
computed and discarded on every run.

The result pane now renders whichever detail array came back -- speaker turns,
word timings or segments, in that order of specificity -- as a scrollable
table of start, end and content, with Save SRT and Save VTT buttons beside it.

Spans arrive as sample offsets, so they are divided by the sample_rate the
response carries; without that field no row is rendered rather than a wrong
timestamp being shown. Timecodes are formatted once and shared by the table
and both subtitle formats, which differ only in the millisecond separator and
the WEBVTT header.

Rows need the server to report sample_rate beside the detail arrays, which is
the companion server change; a response without it renders no rows rather than
a table of zeros.

Validation:
  npx svelte-check --tsconfig ./tsconfig.json     # 153 files, 0 errors
  The three functions were extracted and run against a real Parakeet-TDT
  response (12 s clip): 24 word rows, first cue 00:00:00,080 --> 00:00:00,533,
  SRT and VTT headers correct, and 0 rows when sample_rate is removed.
@CryptVenture
CryptVenture force-pushed the pr/webui-transcript-display branch from fe7a3c9 to 2f87d46 Compare September 3, 2026 00:50
@CryptVenture

Copy link
Copy Markdown
Contributor Author

Closing for now to stay inside the 3-concurrent-PR policy (see the discussion on #422). Nothing is wrong with the change and CI is green on it; I will reopen it as review slots free.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant