feat: add funasr_asr_python local FunASR (SenseVoice) ASR extension#2191
Open
LauraGPT wants to merge 1 commit into
Open
feat: add funasr_asr_python local FunASR (SenseVoice) ASR extension#2191LauraGPT wants to merge 1 commit into
LauraGPT wants to merge 1 commit into
Conversation
ede91cf to
43cbedc
Compare
Author
|
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
funasr_asr_pythonASR extension: a local, self-hosted speech-to-text backend powered by FunASR (SenseVoice / Fun-ASR-Nano / Paraformer). It mirrors the existingwhisper_stt_pythonextension, swapping faster-whisper for a local FunASR model — strong on Chinese / Cantonese / Japanese / Korean, runs on CPU or CUDA, no API key.What it does
FunASRExtension(AsyncASRBaseExtension)(vendorfunasr), structured exactly likeWhisperSTTExtension.FunASRClientbuffers 16-bit PCM, converts to float32, runsAutoModel.generate(...)off the event loop, and emitsASRResultviarich_transcription_postprocess. Default modeliic/SenseVoiceSmall(auto language); swap toFunAudioLLM/Fun-ASR-Nano-2512on GPU via config.funasris the only added dependency.Testing
FunASRClientwas verified end-to-end locally (16 kHz 16-bit PCM → FunASR → transcript via the result callback). All files passastsyntax checks and the JSON manifests validate.ten_runtime/ten_ai_baseare not on PyPI, so the full in-framework wiring can't be imported standalone — the extension faithfully mirrors the workingwhisper_stt_python, and I'd appreciate CI / a maintainer confirming the framework integration. Happy to adjust.