Skip to content

fix: drop the leading space on Latin sentence timestamps - #3866

Merged
LauraGPT merged 2 commits into
modelscope:mainfrom
GPT-AGI:fix/timestamp-latin-leading-space
Nov 11, 2026
Merged

LauraGPT merged 2 commits into
modelscope:mainfrom
GPT-AGI:fix/timestamp-latin-leading-space

Conversation

@GPT-AGI

@GPT-AGI GPT-AGI commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Input:

timestamp_sentence("我 用 iphone pro max", punc [1, 2, 1, 1, 3])
before: ["我用,", " iphone pro max。"]
after:  ["我用,", "iphone pro max。"]

timestamp_sentence inserts a separator before each Latin token, including the
first token of a sentence. Drop that one leading separator using the same check
as timestamp_sentence_en; internal English spaces remain unchanged.

Type of change

  • Bug fix
  • Documentation
  • Example or demo
  • Runtime or deployment
  • Benchmark or evaluation
  • Model/training change

Validation

  • python -m pytest -q tests/test_timestamp_tools.py — 9 passed
  • python -m compileall -q funasr examples tests
  • Docs or links checked
  • Runtime/deployment command tested

User impact

sentence_info text no longer starts with a synthetic space when a sentence
starts with a Latin word.

Notes for reviewers

Four before/after controls covered a Latin-starting sentence, Latin text within
Chinese, all-English, and all-Chinese input. Sentence boundaries, timestamps,
punctuation, and raw_text were unchanged.

timestamp_sentence inserts a space before an English word but, unlike timestamp_sentence_en, never removes a leading space. A Chinese utterance that continues in English was stored as " iphone pro max.".

Signed-off-by: Ting Zhang <181050363+GPT-AGI@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

@LauraGPT LauraGPT left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head 245ee66ac8faa3413c2d03a964c91718c93cdc15 against its original base 20f26b7c4905d010768ec91206149df2a90104b6.

  • Baseline with the new regression fails on the synthetic leading space (' iphone pro max。').
  • Exact head: 9/9 timestamp-tool tests pass, covering Latin sentence starts, mixed Chinese/Latin text, all-English/all-Chinese controls, raw text, punctuation, and boundaries.

No exact-head hosted check currently covers this PR, and main has advanced since the tested base. Leaving it open pending current-base revalidation plus hosted coverage. Scope is deterministic CPU text/timestamp postprocessing only; no model, GPU, ASR-quality, or release claim.

Retain exact sentence, raw-text and timestamp assertions for PR modelscope#3866. The corrected expectation fails on the old implementation and passes on the fixed current-base tree; the complete NumPy CI selection passed privately (421 passed, 27 CUDA-only skips).

Signed-off-by: LauraGPT <zhifu.gzf@alibaba-inc.com>

@LauraGPT LauraGPT left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainer validation of corrected head e7e633a2d3d6d304ba4c8b57afc7b7d359a4c19e on the main containing #3863:

  • Appended only the stale VAD sentence expectation correction, preserving exact strings, timestamp offsets/boundaries and raw text. The original implementation fails that updated expectation; the corrected implementation passes. Additional commit is verified signed and DCO-signed-off; original commits/authorship preserved.
  • New exact-head NumPy 1.26.4 and 2.4.0 jobs both pass: 421 passed and 27 CUDA-only skips each. Actual artifact ZIP digests, source-commit files and JUnit were verified. The old failed run was not rerun.
  • The combined tree with #3863 passed the complete union of both CI selections: 468 passed, 33 skips. The first private run had one fresh-process pytorch_wpe import failure (467 passed); pointing only that isolated process's PYTHONUSERBASE to the previously installed private dependency resolved it. No product source, test assertion, shared environment or model weights changed for that repair.
  • These are deterministic CPU text/postprocessing and related integration tests, not GPU inference or ASR-quality claims. The prior repository-wide offline attempt remains unpassed at online model lookup and timeout; no full-suite result is asserted.

Code, discussions, complete protection/rules, exact head/main and combined tested-tree equality checked. GitHub's temporary merge reference retained the previous main; an independent file-level three-way merge has no overlapping changed paths and exactly matches the tested combined tree. The normal merge result must match that tree and both actual parents. Normal merge only, no self-approval or admin bypass.

@LauraGPT
LauraGPT merged commit acbdbfe into modelscope:main Nov 11, 2026
2 checks passed
LauraGPT added a commit that referenced this pull request Nov 11, 2026
Deliver Python 3.12-compatible boolean parsing with normalized errors and Latin sentence-boundary timestamp fixes (#3863, #3866).

Signed-off-by: LauraGPT <zhifu.gzf@alibaba-inc.com>
@LauraGPT LauraGPT mentioned this pull request Nov 11, 2026
LauraGPT added a commit that referenced this pull request Nov 11, 2026
Deliver tested boolean parsing and text/timestamp fixes (#3863, #3866).

Signed-off-by: LauraGPT <zhifu.gzf@alibaba-inc.com>
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.

2 participants