Skip to content

fix(hotwords): prevent missing Latin prefixes in mixed-script correction - #3798

Merged
LauraGPT merged 2 commits into
mainfrom
codex/fix-hotword3796-cross-script
Oct 28, 2026
Merged

LauraGPT merged 2 commits into
mainfrom
codex/fix-hotword3796-cross-script

Conversation

@LauraGPT

@LauraGPT LauraGPT commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Addresses the residual mixed-script case in #3796. PyPI 1.4.16 drops Latin/digit pinyin keys; current main already fixes that part, but still turns 这个端口 into 这个C端口 for fuzzy hotword C端.

Require a complete phonetic key when a Latin-containing target replaces Chinese-only input. Preserve 爱助手 -> AI助手, AI助守 -> AI助手, C段 -> C端, explicit mappings and same-script fuzzy matching. No threshold or scoring changes.

Verification

  • Original 1.4.16 wheel verified against official PyPI SHA-256; the reported bug reproduces.
  • New regression on unchanged main: 1 failed, 15 deselected, reproducing C-prefix insertion.
  • Exact candidate: 22 passed across tests/test_postprocess_hotwords.py and tests/test_rich_transcription_postprocess.py.
  • Compile of checked-out source/tests and git diff --check passed.
  • Python 3.12.3, pypinyin 0.55.0, rapidfuzz 3.14.5, pytest 8.1.1; isolated Shanghai environment.

These are pure-text CPU tests, not model/GPU inference, hosted CI or full-suite acceptance. The code only changes text postprocessing. Keep #3796 open for released-version/reporter verification.

Published using the official createCommitOnBranch API with an expected-head guard and GitHub-verified signature plus DCO. The complete published tree is identical to the tested local candidate. No TLS verification, hook or repository protection was disabled. FunASR main review-count protection was explicitly changed to zero by the repository administrator on 2026-10-28; other protections remain enforced.

Current-main integration and hosted CI

  • Exact head 8f2701fcf2d70320b943c596349612ba26f29bf0 has passing Python 3.10 and 3.12 text-postprocessing CI; each executes 22 tests with real pypinyin/rapidfuzz dependencies.
  • Current-main 19e33badf1dba6f7606c9410c32c622486b5df13 integration tree 1e028d232f7a3e14d4942aa89d95c85d43710c29 was independently reconstructed and all 4154 blobs verified; 22 focused tests pass with no skips.
  • Adds a read-only, path-filtered workflow covering hotword and rich transcription modules in all three packages. No model downloads or runtime changes.
  • These are focused CPU text regressions, not pretrained ASR/GPU inference or full-suite acceptance.
  • The former potential merge used pre-release main c9c42c0 and was rejected. The current potential merge parents and complete tree are verified against 1.4.17 main.
  • This fix is not part of the already-published 1.4.17 packages. Keep postprocess_hotwords: non-Chinese hotword maps to an empty pinyin key and force-replaces every latin/digit span (ratio("","")=100) #3796 open for released-version/reporter verification.

Avoid adding a missing Latin prefix to Chinese-only text. Preserve complete
homophones and same-script fuzzy matching. Add regression coverage for #3796.

Tested: 22 targeted and adjacent pure-text CPU tests, compile and diff checks.
Signed-off-by: LauraGPT <zhifu.gzf@alibaba-inc.com>
Exercise text-only regressions on Python 3.10 and 3.12 with real optional dependencies.

Signed-off-by: LauraGPT <zhifu.gzf@alibaba-inc.com>
@LauraGPT
LauraGPT merged commit dd00b0e into main Oct 28, 2026
2 checks passed
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.

1 participant