Skip to content

fix: load official SenseVoice ONNX models - #102

Open
LauraGPT wants to merge 1 commit into
lanbinleo:mainfrom
LauraGPT:codex/fix-sensevoice-onnx-bootstrap-20260812
Open

fix: load official SenseVoice ONNX models#102
LauraGPT wants to merge 1 commit into
lanbinleo:mainfrom
LauraGPT:codex/fix-sensevoice-onnx-bootstrap-20260812

Conversation

@LauraGPT

Copy link
Copy Markdown

Fixes #101.

Summary

  • detect model_quant.onnx and pass quantize=True to funasr_onnx.SenseVoiceSmall
  • keep custom non-quantized model.onnx directories working with quantize=False
  • validate the required config, CMVN, tokenizer, and ONNX files before importing/loading the runtime
  • document the exact two-repository ModelScope preparation flow in Chinese and English

The official iic/SenseVoiceSmall-onnx repository ships model_quant.onnx but does not include chn_jpn_yue_eng_ko_spectok.bpe.model, while the existing loader used the constructor default quantize=False. This made the documented SenseVoice path fail even after downloading the official ONNX repository.

Validation

  • 59 passed with the locked project environment (uv sync --extra web)
  • focused quantized, non-quantized, and missing-tokenizer regression tests
  • Ruff check and format check on changed Python files
  • Python compile check and git diff --check
  • verified the actual funasr-onnx==0.4.1 wheel constructor supports quantize: bool = False
  • verified both referenced ModelScope repositories are reachable

Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.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.

SenseVoice 官方模型仓库无法开箱即用:quantize 参数 + 模型文件缺失

1 participant