fix(runtime): skip empty deduplicated event segments - #3748
Merged
Merged
Conversation
Signed-off-by: LauraGPT <18321252+LauraGPT@users.noreply.github.com>
Signed-off-by: LauraGPT <18321252+LauraGPT@users.noreply.github.com>
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.
Summary
Fix an existing
IndexErrorin 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.217d10aa99587dc9d7b42b59641a856716661cbcand preserves both changes.Validation
IndexError; the core control and distinct-event controls pass.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 headd7a33c862c9d03a68ff416110416921e49728319; 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.