Skip to content

fix: validate IBus system Python ASR runtime#32

Merged
LeonardNJU merged 3 commits into
LeonardNJU:masterfrom
LauraGPT:codex/validate-system-python-runtime
Jul 19, 2026
Merged

fix: validate IBus system Python ASR runtime#32
LeonardNJU merged 3 commits into
LeonardNJU:masterfrom
LauraGPT:codex/validate-system-python-runtime

Conversation

@LauraGPT

@LauraGPT LauraGPT commented Jul 16, 2026

Copy link
Copy Markdown

Summary

  • add a small runtime probe for the modules used by the VoCoType ASR path
  • run that probe before accepting the IBus "system Python" option
  • print recovery commands bound to the exact interpreter selected for the IBus launcher
  • pin both package manifests to the published Torch-free funasr_onnx==0.4.2
  • remove the obsolete 0.4.1 CPU Torch workaround while retaining the optional SLM Torch dependency

Root cause

The system-Python branch only imported numpy, sounddevice, and soundfile.
It could therefore complete installation even when the same interpreter could
not import ModelScope or the Paraformer, VAD, and punctuation entry points used
at transcription time. Installing packages into another Python environment did
not help because the generated IBus launcher remains pinned to the interpreter
selected during installation.

The new probe imports the actual runtime modules and preserves the original
exception. The package manifests now consume the upstream funasr_onnx 0.4.2
release, which declares jieba and no longer imports or installs Torch for the
default ONNX path.

This closes both sides of
issue #30. The upstream
release was delivered through
modelscope/FunASR#3242 and is
available from PyPI.

Verification

  • regression reproduced before the installer fix: the old check passed while the real ModelScope/FunASR imports failed
  • release-contract tests were added first and failed on the 0.4.1 pins and obsolete workaround
  • python -m pytest -q test/test_installer_runtime.py (5 passed)
  • python -m pytest -q (31 passed, 5 skipped)
  • runtime probe success and failure CLI paths
  • a real Python 3.11 runtime using PyPI funasr-onnx==0.4.2 and modelscope==1.30.0 passed the production probe with 39 compatible packages and no Torch installed
  • PyPI 3.11 and 3.12 clean installs both passed dependency checks, four public ONNX imports, and a real SenseVoice CPU transcription
  • bash -n scripts/install-ibus.sh, Python compilation, TOML parsing, package-pin contract, and git diff --check

@LauraGPT
LauraGPT marked this pull request as ready for review July 17, 2026 09:40
@LauraGPT

Copy link
Copy Markdown
Author

Upstream funasr-onnx 0.4.2 is now live on PyPI, so this PR no longer carries the temporary 0.4.1 Torch workaround. Exact head df8cb86662a6 pins both manifests to 0.4.2, keeps Torch only in the explicit slm extra, and adds release-contract regressions.

Fresh verification is 5/5 focused tests and 31 passed / 5 skipped repository-wide, plus Bash syntax, Python compilation, TOML/dependency checks, and a real production runtime probe using PyPI funasr-onnx==0.4.2 + ModelScope with 39 compatible packages and no Torch installed. The PR is ready for review and merge.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@LeonardNJU
LeonardNJU merged commit 14b7a5e into LeonardNJU:master Jul 19, 2026
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.

3 participants