You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SentencePiece postprocessing returns different casing for the transcript and word list #3997
The SentencePiece postprocessor returns different casing for the same word in its transcript and word list. For example, it returns i have a test and ["I", "have", "a", "test"] together. This also affects I'm, I've, and I'll.
To reproduce
From a FunASR checkout at f95fe7904ec81157b1cf13a63bf4553f6725cd22, run the following. It loads the two standalone postprocessors directly.
python - <<'PY'from runpy import run_pathfor path in ( "funasr/utils/postprocess_utils.py", "runtime/python/onnxruntime/funasr_onnx/utils/postprocess_utils.py",): process = run_path(path)["sentence_postprocess_sentencepiece"] print(process(["▁i", "▁have", "▁a", "▁test"]))PY
Both print ('i have a test', ['I', 'have', 'a', 'test']).
Expected behavior
Both outputs should use the same already-normalized casing: ('I have a test', ['I', 'have', 'a', 'test']). ONNX Paraformer exposes both values for English BPE and the HTTP example returns the transcript value.
Environment
macOS 15.0 (arm64), Python 3.12.10. Reproduced on the source checkout and directly from the published funasr==1.4.29 and funasr-onnx==0.4.11 wheels. The sample uses decoded pieces and needs neither audio nor model weights.
I reproduced the casing mismatch in both Python and ONNX postprocessing on the parent revision: the four pronoun/contraction cases failed, while the two unchanged-word controls passed. At the proposed head all 82 text-postprocessing workflow tests passed in the isolated CPU environment. Tested PR #3998 at ac85bd33570b. This is a postprocessing test on decoded inputs, not an ASR accuracy measurement or a published package fix.
The fix is now on FunASR main at ece409bd. Both Python and ONNX postprocessors return I have a test and the matching word list for your example. The merged CI wheel and source archive both contain the corrected module. I also reproduced the corrected output from a private offline installation of that candidate wheel. Its internal version is still 0.4.11; this did not replace the existing PyPI package.
Activity
LauraGPT commentedon Dec 1, 2026
I reproduced the casing mismatch in both Python and ONNX postprocessing on the parent revision: the four pronoun/contraction cases failed, while the two unchanged-word controls passed. At the proposed head all 82 text-postprocessing workflow tests passed in the isolated CPU environment. Tested PR #3998 at
ac85bd33570b. This is a postprocessing test on decoded inputs, not an ASR accuracy measurement or a published package fix.LauraGPT commentedon Dec 1, 2026
The fix is now on FunASR main at ece409bd. Both Python and ONNX postprocessors return
I have a testand the matching word list for your example. The merged CI wheel and source archive both contain the corrected module. I also reproduced the corrected output from a private offline installation of that candidate wheel. Its internal version is still0.4.11; this did not replace the existing PyPI package.