Skip to content

fix(runtime): skip empty deduplicated event segments - #3748

Merged
LauraGPT merged 2 commits into
mainfrom
codex/rich-event-empty-segment-20261001
Oct 1, 2026
Merged

LauraGPT merged 2 commits into
mainfrom
codex/rich-event-empty-segment-20261001

Conversation

@LauraGPT

@LauraGPT LauraGPT commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fix an existing IndexError in the ONNX and libtorch SenseVoice rich-transcription postprocessors when consecutive language segments contain the same event and a segment has no spoken text.

After duplicate leading-event removal, a segment can become empty; both runtime copies then index it in get_event(). Add the same post-deduplication empty-segment guard already present in core FunASR. Keep the current event/emoji state and subsequent transcript intact.

Validation

  • Before the fix, the new 30-case regression file gives 18 failed / 12 passed: only ONNX/libtorch duplicate-event cases raise IndexError; the core control and distinct-event controls pass.
  • The same regression file against exact fix(sensevoice): stop rendering the Cough event as the Sneeze emoji #3747 head also gives 18 failed / 12 passed, demonstrating this bug predates and is not caused by its mapping change.
  • After the guard: 30 regression cases passed; combined with related speaker/emotion documentation checks, 61 passed.
  • After merging actual current main, native CPU run below: 71 passed, zero skips/errors, 11.95 seconds test time (13.24 seconds enclosing command).
python -m pytest -q -p no:cacheprovider \
  tests/test_rich_transcription_event_segments.py \
  tests/test_rich_transcription_postprocess.py \
  tests/test_timestamp_tools.py \
  tests/test_speaker_emotion_docs.py

The timestamp tests import the real FunASR package; the postprocessing tests use the repository's file-loader pattern to execute each shipped module without initializing a runtime engine. This is postprocessor/native helper coverage, not ONNX/libtorch model inference, a model download, a full test-suite pass or a package release. CUDA was disabled and model access offline.

Changed Python files compile; effective diff passes whitespace checks. Independent read-only review of the final current-main diff found no P1/P2. Signed commits include DCO sign-offs. No hosted CI result is claimed at submission.

Integration Status

Merged as 800f7565e8e850b079b9e111d12107c19fc6121f. The actual merge tree exactly matches the reviewed and locally tested signed head d7a33c862c9d03a68ff416110416921e49728319; parents and tree were checked after merging.

The exact-head ONNX package workflow 36817570899 and exact-merge workflow 36817826794 both completed successfully for Python 3.11 and 3.12. These are package build/install/wrapper checks; the 71 focused postprocessing/timestamp/documentation tests above are separate native evidence, not a claim that the hosted workflow runs that full selection.

This change is now in repository source. No Python package/model release, website deployment or running inference-service restart was performed.

Signed-off-by: LauraGPT <18321252+LauraGPT@users.noreply.github.com>
Signed-off-by: LauraGPT <18321252+LauraGPT@users.noreply.github.com>
@LauraGPT
LauraGPT merged commit 800f756 into main Oct 1, 2026
2 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.

1 participant