fix(auto-model): align SentencePiece word markers - #3587
Merged
Conversation
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
▁word-boundary marker while aligning ASR word timestamps with punctuation tokensRoot cause
The reporter's mixed-language sample contains one timestamped word prefixed with
▁. The visible ASR surface correctly omits that tokenizer marker, but_merge_timestamp_unitscompared it as transcript text. That single-character mismatch invalidated alignment for the whole recording, triggered the VAD-segment fallback, and discarded punctuation fromsentence_infoeven though the top-level text contained 272 punctuation marks.Validation
python -m pytest -q tests/test_punc_model_none.py tests/test_cli.py tests/test_generate_subtitle.py-> 45 passed83de4060de043f9ea0a0c318edc9a818c54f28d5:▁marker now aligns with the punctuation surfacesentence_info: 275 entries carrying all 272 predicted punctuation markssentence_info: 153 entries carrying all 152 predicted punctuation marksRelated to #3539. This PR intentionally does not auto-close the issue; the reporter should confirm the fix on their workflow first.