fix(auto-model): preserve explicit timestamp and speaker text - #3553
Conversation
LauraGPT
left a comment
There was a problem hiding this comment.
The implementation and focused regressions look correct: I reproduced 16 passed in the isolated NumPy 1.26 environment, and the combined #3553 + #3554 patch applies cleanly. The remaining merge blocker is DCO: commit 0ef4a425d887e906a40d68003e01065377cb34c8 is GitHub-verified but has no Signed-off-by trailer. Please run git commit --amend --signoff --no-edit and git push --force-with-lease; I will re-check the exact replacement SHA.
0ef4a42 to
4494146
Compare
|
Thanks. I amended the commit with my DCO sign off and force pushed the replacement head. New SHA: |
LauraGPT
left a comment
There was a problem hiding this comment.
The replacement implementation is now correct. I applied exact heads #3553 449414665d36953f3bd83e514c31125a228c0fe4 and #3554 6042ace22d617a69c47735503cb67be04c7825fd together on current main@55b662ccf9ea77237ba9253b3bddd953d4184f84; all 24 focused timestamp, padding, punctuation-none, and timestamp-tool tests pass. py_compile and git diff --check also pass.
The only remaining blocker is the trailer syntax. The commit currently contains:
Signed-off-by: John6666 186692226+John6666cat@users.noreply.github.com
DCO requires angle brackets:
Signed-off-by: John6666 <186692226+John6666cat@users.noreply.github.com>
Please ensure user.name and user.email are configured, then run git commit --amend --no-edit --signoff and git push --force-with-lease. Please verify the resulting message with git log -1 --format=%B. No code changes are requested.
Signed-off-by: John6666 <186692226+John6666cat@users.noreply.github.com>
4494146 to
391fb2b
Compare
LauraGPT
left a comment
There was a problem hiding this comment.
Revalidated the exact replacement head 391fb2b5138fffe524b9e07fa99669e1d1ccf53d on current main@917ca2f4a673b4ee8b0aea4b64fbe2d6c2034a67.
- the source tree is identical to the previously reviewed implementation
- the corrected
Signed-off-bytrailer satisfies DCO - 18/18 focused timestamp-contract, punctuation-none, and timestamp-tool tests pass
py_compileandgit diff --checkpass- the current #3554 head also applies cleanly after this PR and the combined suite passes
Approved for merge.
Summary
Fix two related timestamp/speaker-output contract mismatches in the Paraformer + AutoModel path.
pred_timestampis explicitly provided, honor that value.output_timestampwhenpred_timestampis not specified.textwhile preserving the legacysentencefield.This is intentionally limited to the first of the two fixes discussed with the maintainer (PR A).
Type of change
Validation
Focused regression tests:
python -m pytest -q tests/test_paraformer_timestamp_contract.py tests/test_punc_model_none.pyResult:
16 passed, 12 subtests passedThe new regressions fail on the unmodified baseline and pass with this change.
python -m compileall funasr examples testsAlso checked:
git diff --checkUser impact
This fixes cases where an explicit
pred_timestampsetting could be overridden by the surroundingoutput_timestampbehavior, and keeps the speaker/VAD fallback result compatible with consumers expecting the documentedtextfield.Existing callers using the legacy
sentencefield remain compatible.Notes for reviewers
The scope is intentionally narrow.
This PR does not include the separate dynamic-batch timestamp-tail fix (PR B), EParaformer changes, English/BPE-specific changes, or broader timestamp-flag normalization.
The regression tests are CPU-only and do not require network or model downloads.