feat: show AssemblyAI speaker diarization in transcripts - #2243
Open
pavzagor wants to merge 2 commits into
Open
Conversation
| 5. Preserve all newlines and formatting | ||
| 6. Do not add any explanations or comments | ||
| 7. Return ONLY the translated VTT content | ||
| 7. Preserve all <v Speaker ...> and </v> voice tags exactly, including speaker labels; translate only the spoken text inside them |
Contributor
There was a problem hiding this comment.
The prompt asks the model to preserve speaker voice tags, but the response is accepted whenever it merely contains WEBVTT. If a provider drops or changes a <v Speaker ...> tag while translating, the response is cached unchanged, so subsequent translated captions lose or misattribute that speaker. Validate the returned cue structure and speaker annotations against the source before caching it.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/web/actions/videos/translate-transcript.ts
Line: 154
Comment:
**Voice tags are not validated**
The prompt asks the model to preserve speaker voice tags, but the response is accepted whenever it merely contains `WEBVTT`. If a provider drops or changes a `<v Speaker ...>` tag while translating, the response is cached unchanged, so subsequent translated captions lose or misattribute that speaker. Validate the returned cue structure and speaker annotations against the source before caching it.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Member
|
@greptileai please review the PR |
Author
|
@richiemcilroy anything else needed from my side to merge this? |
Member
|
Hey @pavzagor if you can get both of these to 5/5 we're good to go! |
Member
|
hey @greptileai please re-review the PR |
Author
|
@richiemcilroy this is 5/5 lfg!!! |
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.
Cap already stores AssemblyAI word speakers, but transcription did not request them and captions/UI discarded them. This enables diarization for full recordings and editable-transcript backfills, shows Speaker A/B labels in the transcript, editor and player captions, and preserves labels through transcript edits, video cuts, copying, VTT/text downloads and agent API round-trips. Existing transcripts without labels continue to render normally.
Live chunks remain provisional and use no speaker labels: AssemblyAI identities are scoped to a transcription request. On recording completion, Cap queues a full-recording transcription instead of promoting independent chunks into a misleading final transcript. This adds a full transcription pass for recordings previously eligible for live promotion; the final labels appear when that pass completes. Queue failures propagate for workflow retry.
Validation:
pnpm typecheckandpnpm exec biome ci . --linter-enabled=falsepassed; scoped Biome checks passed.b7ffdd4a-2d21-4425-b8bd-bffa3f28159f.Also corrected the existing Slack-manifest test's stale expected brand color to match the current manifest, so the full web suite passes. No database migration or new environment variable is required; uses the existing
ASSEMBLY_API_KEY.Upstream validation on
2766dc0: CI and Recording Reliability passed. Greptile re-reviewed 24 files and added no new comments; security checks passed. Vercel preview remains blocked on Cap Software team authorization.The PR appears safe to merge; the previous translation-validation issue is fully fixed and no new changes or outstanding findings remain.
Summary