feat: add funasr_asr_python local FunASR (SenseVoice) ASR extension#2191
feat: add funasr_asr_python local FunASR (SenseVoice) ASR extension#2191LauraGPT wants to merge 4 commits into
Conversation
ede91cf to
43cbedc
Compare
|
CI note for reviewers: the only failing check is not a code/test failure. I inspected So this check is blocked by the review action's permission policy for external contributors, not by the FunASR extension code. The PR remains |
|
Fresh FunASR/SenseVoice-side validation recheck (2026-07-07 UTC):
Caveat: my bare checkout does not include installed/materialized |
|
I checked the only failing check on this PR ( The job exits before doing a review because the workflow sees the PR actor with read-only repository permission: So the current red check is a Claude review workflow permission issue on |
43cbedc to
7a468a0
Compare
|
Synced this PR to current Fresh verification passes the repository-native extension suite (13/13), Pylint at 10.00/10, Black on all 11 Python files, both The only red check still exits before reading the diff: the review action sees the fork actor with |
|
Synced this FunASR/SenseVoice ASR extension PR with the latest Head: Fresh validation on PYTHONPATH=".:.ten/app/ten_packages/system/ten_runtime_python/interface:.ten/app/ten_packages/system/ten_ai_base/interface" \
/cpfs_speech/user/zhifu.gzf/.cache/funasr-ops/ten-2191-venv-20260717/bin/python -m pytest -q tests
PYTHONPATH="..." \
/cpfs_speech/user/zhifu.gzf/.cache/funasr-ops/ten-2191-venv-20260717/bin/python -m compileall -q \
addon.py config.py const.py extension.py funasr_client.py reconnect_manager.py tests
./agents/scripts/pylint.sh funasr_asr_python
black --check --line-length 80 agents/ten_packages/extension/funasr_asr_python/*.py agents/ten_packages/extension/funasr_asr_python/tests
tman -y install --standalone
git diff --checkResults:
The branch is now 0 commits behind the target branch. GitHub reports it mergeable; the remaining gate is maintainer review. The |
|
Follow-up on the restarted Relevant log lines from run https://github.com/TEN-framework/ten-framework/actions/runs/29664747134/job/88133177090: So the remaining red check is a repository permission gate for the Claude review action, not a FunASR extension test failure. The local extension validation above remains current for this exact head. |
Summary
Adds a local
funasr_asr_pythonASR extension powered by FunASR. It follows TEN'sAsyncASRBaseExtensioncontract, defaults toiic/SenseVoiceSmall, runs on CPU or CUDA without an API key, and accepts another FunASR-compatible model through configuration.The extension converts 16 kHz signed 16-bit PCM into normalized float audio, runs
AutoModel.generate(...)outside the event loop, post-processes SenseVoice output, and emits TENASRResultmessages.Reliability
autoand normalizes it for TEN results.finallyand always reports finalize completion.Runtime dependencies are declared consistently in
pyproject.toml:funasr>=1.1.0,numpy>=1.24.0,pydantic>=2.0.0, andtyping-extensions>=4.5.0.Validation
Validated at exact head
7a468a0795729bfc702c5d9c0b86a2353508f633, rebased onto current TEN main0c914f7ba3437f6eb28c0a00a103f7b458e25b6c:tests/bin/start: 13 passedtman check manifest-jsonandtman check property-json: both conform to schemagit diff --check: passedA real CPU smoke used this extension's
FunASRClient, FunASR 1.3.14, the official 5.592-second Mandarin sample, andiic/SenseVoiceSmall. The callback returned one final result with detected languagezhand transcript: