Skip to content

fix(transcription): NVIDIA streams again, and NVIDIA and ElevenLabs publish each word of a long segment once - #1479

Draft
shashank03-dev wants to merge 6 commits into
fossasia:devfrom
shashank03-dev:fix/nvidia-elevenlabs-captions
Draft

shashank03-dev wants to merge 6 commits into
fossasia:devfrom
shashank03-dev:fix/nvidia-elevenlabs-captions

Conversation

@shashank03-dev

@shashank03-dev shashank03-dev commented Dec 5, 2026 •

Copy link
Copy Markdown
Member

Fixes #1478

NVIDIA captions never started because the provider called streaming_recognize(), which nvidia-riva-client doesn't have. It now calls streaming_response_generator(). NVIDIA and ElevenLabs also resend the whole segment on every result, so once a segment passed the 50 word or 15 s limit every later result was finalized again. A new RunningTranscript in the aggregator passes on only the words not yet published, in order, and both providers use it. In scripts without spaces (Japanese, Chinese, Thai) the text that grows onto the last published word is passed on too.

Who sees what: listeners in a room that uses NVIDIA or ElevenLabs. Before, NVIDIA gave no captions, and with only the method fixed a 26 s clip gave 41 final lines. Now the same clip gives 2 captions and a 120 word ElevenLabs segment gives 3, with every word once.

What does not change: the other providers. handle_partial now returns whether its limits made the text final, and other callers ignore it.

Limits: ElevenLabs was checked against its documented message format, not a live key. A long segment is cut by word count, so if the provider later rewrites words it already sent ("twenty five" to "25"), one word at the cut can be lost or repeated.

Depends on: nothing. Split out of #1474 as asked. Merge order: this PR, then #1480, then #1481.

Tests: NVIDIA and ElevenLabs tests for long segments with fast and slow publishing, unspaced scripts, the Riva method and handle_partial's return value. All fail on dev. Full suite 3843 passed.

Checked for real: NVIDIA Parakeet on NVIDIA's cloud with a real key. On dev every stream fails. With the fix a 26 s clip came back as 2 clean captions, and a 90 s run through the portal saved 5 captions with no repeats.

This recording covers the whole split (#1479, #1480 and #1481).

Before (dev): a listener is live on the English booth, but the event page has no Usage tile, and /workspace/events/1/usage/ and the CSV export both return 404.

1166-before.mp4

After: with a listener on English audio and German AI translation, the new Usage page shows transcription, characters translated, listening and listener connections. Listening in from Mission Control on English adds no listener connection. The CSV returns 200 for the event owner and 403 for a room coordinator.

1166-after.mp4

ASRService has streaming_response_generator, not streaming_recognize, so every
NVIDIA stream failed and no audio reached NVIDIA.
Riva's interim text is the whole utterance so far, so once it passed the
aggregator's 50 word or 15 s limit every later result was finalized again and
listeners saw the same text repeated. Only the words not yet published now go to
the aggregator, in order.
Scribe's partial transcript is the whole segment so far and its commit repeats
all of it, so a segment past the aggregator's limits was published many times
(a 120 word segment came out as 16 finals). The words-not-yet-published logic
from the NVIDIA fix moves to RunningTranscript in the aggregator, and both
providers use it.
…paces

Japanese, Chinese and Thai put no spaces between words, so after a long
segment was cut the rest of it was dropped until the next segment.
@coderabbitai

coderabbitai Bot commented Dec 5, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@shashank03-dev shashank03-dev changed the title test fix(transcription): NVIDIA streams again, and NVIDIA and ElevenLabs publish each word of a long segment once Dec 5, 2026
@sourcery-ai

sourcery-ai Bot commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

API

Add RunningTranscript as the shared interface for whole-segment providers and make handle_partial report whether it finalized the text, so callers can track which words were published.

  • portal/transcription/aggregator.py L56-99, L113-119 (+4 small edits)

Uses of the API

Route NVIDIA and ElevenLabs interim and final results through RunningTranscript, and use NVIDIA’s streaming response generator so audio reaches Riva.

  • portal/transcription/providers/elevenlabs.py L119, L146-147, L198-200
  • portal/transcription/providers/nvidia.py L111-117 (+3 small edits)

Documentation

Update the transcription map to document the new running-transcript behavior and the handle_partial return value.

  • .agents/context/TRANSCRIPTION_MAP.md L83, L163, L168-173

Tests

Add provider and aggregator tests for NVIDIA streaming, avoiding duplicate long-segment finals, clearing completed lines, and preserving text across unspaced-script cuts.

  • tests/test_transcription_providers.py L4, L711-949

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

This branch has not been deployed

No deployments
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.

NVIDIA captions never start, and NVIDIA and ElevenLabs repeat long segments as many final captions

1 participant