Repository navigation
feat: run instant-mode live transcription on the media server - #3548
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Member
Author
|
hey @greptileai, please re-review the PR |
Member
Author
|
hey @greptileai, please re-review the PR |
Member
Author
|
hey @greptileai, please re-review the PR |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instant-mode live transcription can now run on the media server instead of a long-lived workflow. The media server already sits next to the transcription service, so it does the waiting, downloading and transcribing. The web app stays the only writer of the transcript and the claim, and decides when to promote. The new path is off unless
LIVE_TRANSCRIBE_RUNNER=media-serveris set, and it falls back to the existing workflow whenever the media server can't take a recording.sequenceDiagram participant D as Desktop participant W as Web app participant M as Media server participant S as Storage participant A as Transcription API D->>W: create instant recording W->>W: claim + new session id W->>M: POST /live-transcribe/sessions (state, signed URLs) loop every second M->>S: GET manifest (If-None-Match) end M->>S: GET init + segments (signed) M->>A: upload, transcribe M->>W: report chunk (segment range + words) W->>S: merge into transcription.live.json W-->>M: authoritative cursor + fresh URLs M->>W: finish (done) W->>S: promote to canonical transcriptHow it works
apps/media-server/src/lib/live-transcribe.ts): one in-memory session per recording.If-None-Match, plans the next chunk with the same rules asplanNextLiveChunk, and sendsinit + context + new segmentsto the AssemblyAI-compatible API it was handed.apps/web/app/api/webhooks/media-server/live-transcribe/route.ts): every report goes through the same storage and claim helpers as the workflow (apps/web/lib/live-transcribe-runner.ts).describeLiveChunkrebuilds the offsets from the manifest itself, so a disagreement can't misplace words. It reproducesplanNextLiveChunkexactly.apps/web/workflows/live-transcribe.ts): same behaviour. Its step bodies now call the shared helpers.Safety
$.liveTranscript.session). Only reports from that session are heard, and starting, handing over or falling back moves the id atomically (rotateLiveSession).lastAudioSegmentIndex. Anything else gets the real cursor back and nothing is written. Duplicate or late reports are harmless.Cost
Rollout
LIVE_TRANSCRIBE_RUNNER=media-serveron the web app. Removing it returns every new recording to the workflow.

Confidence Score: 5/5
The latest changes appear safe to merge; no new blocking issues were found.Summary
The PR adds optional live transcription on the media server while keeping transcript writes and promotion in the web app.
Reviews (4) · Last reviewed commit: "fix(media-server): cancel in-flight chun..." · Reviewed by Greptile