feat: add FunASR speech recognition backend#10090
Conversation
|
Hi @mudler, friendly ping — this PR adds FunASR as a speech recognition backend for LocalAI. Ready for review whenever convenient. Thanks! |
|
Hi @mudler, friendly follow-up — this PR adds FunASR as a speech recognition backend for LocalAI. FunASR recently added an agent-friendly CLI ( |
c2ddbf3 to
74c6596
Compare
|
Rebased onto the latest |
fd9fd5f to
8105d38
Compare
|
Rebased this PR onto the latest Current state:
Local checks run: ruby -e 'require "yaml"; data=YAML.load_file("backend/index.yaml"); names=data.select { |x| x.is_a?(Hash) }.map { |x| x["name"] }; abort("missing funasr") unless names.include?("funasr"); abort("missing cpu-funasr") unless names.include?("cpu-funasr"); abort("missing metal-supertonic") unless names.include?("metal-supertonic"); puts "index ok: #{data.length} entries"'
python3 -m py_compile backend/python/funasr/backend.py
rg -n "<<<<<<<|=======|>>>>>>>" backend/index.yaml backend/python/funasr || true
git diff --check upstream/master...HEAD |
|
Quick maintainer-side validation pass after the latest rebase:
I did not run a full dependency install or model transcription in this bare ops environment, but the registry wiring and backend entrypoint syntax look clean from this pass. |
|
One caveat from a deeper pass so the validation note above is not read as a ready-to-merge sign-off: So the registry wiring, syntax, and requirement-file checks are clean, but the |
|
Follow-up on the test caveat I noted earlier: I pushed signed head What it covers without downloading FunASR weights:
Validation on the refreshed branch: Note: running |
cdcdf52 to
f258f5f
Compare
Signed-off-by: zhifu gao <zhifu.gzf@alibaba-inc.com>
Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.com>
f258f5f to
bc41281
Compare
|
Rebased this PR onto current Current head is Validation run locally on the rebased branch:
GitHub DCO is passing on the new head. |
|
I pulled the failing fork-side The job reaches the CodeQL/code-scanning upload step and fails because the fork token cannot access the CodeQL API endpoints: So the visible failing For the FunASR backend itself, the latest local validation remains: |
Summary
Adds FunASR as a new speech recognition backend for LocalAI.
FunASR is an industrial-grade ASR toolkit (16K+ GitHub stars) from Alibaba DAMO Academy, featuring:
Changes
backend/python/funasr/— New Python gRPC backend wrapping FunASR'sAutoModelAPIbackend/index.yaml— Meta definition and image entries for cpu/cuda12/cuda13/rocm/metal/l4t platformsUsage
The backend supports the standard
/v1/audio/transcriptionsendpoint with optionallanguageparameter.Test plan
pip install funasrinstalls cleanly in the backend venv