Skip to content

fix(sensevoice): keep event dedupe state across text segments - #3931

Merged
LauraGPT merged 1 commit into
modelscope:mainfrom
nurlanmnn:fix-event-dedupe-after-text
Nov 21, 2026
Merged

LauraGPT merged 1 commit into
modelscope:mainfrom
nurlanmnn:fix-event-dedupe-after-text

Conversation

@nurlanmnn

Copy link
Copy Markdown
Contributor

Summary

Fixes #3930

When the same event starts three language segments in a row and the middle one has text, rich_transcription_postprocess showed the emoji again on the third one: 👏hello world👏again instead of 👏hello world again. After removing the repeated emoji, the loop read the event again from the stripped text, so it became None. Now the segment's event is read once before stripping and kept as the current event. Same change in the core, onnx and libtorch copies.

Type of change

  • Bug fix
  • Documentation
  • Example or demo
  • Runtime or deployment
  • Benchmark or evaluation
  • Model/training change

Validation

  • python -m pytest tests/test_rich_transcription_event_segments.py tests/test_rich_transcription_postprocess.py -q: 63 passed.
  • New test_repeated_event_with_text_across_three_segments (Cough/Sneeze/Applause × 3 modules) fails on main with 9 failures and passes with the fix. test_different_event_between_same_events_keeps_all_emojis checks that Applause, Laughter, Applause still keeps all three emojis.
  • python -m compileall on the changed files
  • Docs or links checked
  • Runtime/deployment command tested

User impact

People using SenseVoice with rich transcription get a cleaner transcript when an event like applause or coughing goes on over several segments. Before, the emoji kept popping back every other segment.

Notes for reviewers

Only the event state changes. Event-only segments, emotion handling and spacing work the same as before.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LauraGPT
LauraGPT merged commit 581150d into modelscope:main Nov 21, 2026
8 checks passed
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.

[Bug] rich_transcription_postprocess shows a repeated event emoji again after a segment with text

2 participants