Repository navigation
fix(timestamp): normalize sentence output without punctuation - #3904
Merged
Merged
Conversation
…nctuation With no punctuation ids, timestamp_sentence and timestamp_sentence_en returned the text as a list of tokens and ignored return_raw_text. Let the regular loop build the single sentence so text is a string and raw_text is honored.
Preserve the original #3898 author commit and current main with real CUDA and selected suite evidence. Signed-off-by: LauraGPT <zhifu.gzf@alibaba-inc.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
Integrate #3898 with its original contributor commit preserved as a parent. Both sentence helpers now return string text and honor return_raw_text when punctuation is None or empty. Correct the stale AutoModel malformed-punctuation test to this intentional string contract, retaining timestamp assertions. The existing NumPy matrix selects both regression files; no workflow changes.
Verification
Full-suite limitation: Bare repository pytest stopped during collection: 2 unchanged standalone funasr-onnx test modules could not import that separate package in the private environment (6 skips). No test-body/full-model-suite pass is claimed. The selected root-package NumPy workflow and native timestamp CUDA contract are independently validated. The author-reported unrelated AutoModel failure was not reached by this collection attempt.