Add livekit-plugins-funasr (FunASR/SenseVoice local STT) - #6176
Add livekit-plugins-funasr (FunASR/SenseVoice local STT)#6176LauraGPT wants to merge 23 commits into
Conversation
|
Thanks for the review! Addressed the findings:
CI is green (ruff + type-check). The transcription core (16-bit PCM -> resample to 16k -> SenseVoice -> cleaned text) was verified locally. |
|
Fresh FunASR/SenseVoice-side validation recheck (2026-07-07 UTC):
Caveat: I did not rerun the full local pytest target in the bare ops checkout because the monorepo runtime package dependencies ( |
|
Updated this PR to current main and completed the packaging/runtime pass at afab30a:
@tinalenguyen, would you be able to review the new local STT plugin when convenient? |
|
Synced this PR to current Fresh local verification passes the 3 focused plugin regressions, Ruff and format checks, full mypy across 622 source files, @tinalenguyen, could you review the local FunASR/SenseVoice STT plugin when convenient? |
|
Refreshed this PR on top of current What changed in the refresh:
Local validation on the refreshed head:
GitHub now reports the PR mergeable again; repository CI is running on the refreshed head. |
|
Current-head verification for
Fresh focused validation on |
|
Current-head verification for
No new FunASR/SenseVoice-side blocker from this refresh. |
Record the latest current-head validation for livekit/agents#6176 and link the evidence comment.
|
Hi @tinalenguyen — this new local FunASR/SenseVoice STT plugin is current with main and ready for plugin-owner review. On exact head |
|
@livekit/agent-devs, I synchronized this FunASR/SenseVoice plugin with current Local exact-head verification is complete: the focused FunASR suite passes 6/6; adjacent STT/inference/transcription coverage passes 489 tests with 35 expected skips; Ruff, compileall, lock validation, and targeted mypy (211 source files) pass; and wheel/sdist metadata is aligned at Relative to the previously reviewed head, plugin implementation code is unchanged; only the package version and LiveKit Agents compatibility floor moved to 1.7.1. GitHub exact-head CI is now complete with 9 successful checks, 3 expected skips, 0 failures, and 0 pending checks; Devin Review and CLA pass, all 10 review threads are resolved, and the PR is mergeable. Maintainer review is the only remaining gate. |
d3f8160 to
1d9279f
Compare
405afec to
fc807fb
Compare
fc807fb to
e2b1235
Compare
|
CI update for e2b1235: ruff, both type-check jobs, all three blockguard jobs, and the release gates passed. The only failed unit test is unrelated to this plugin: tests/test_utils/test_audio_array_buffer.py::TestPerformance::test_3s_buffer_50ms_frames[48k] exceeded its 100 ms runner-dependent threshold (131.6 ms); the run otherwise had 2478 passed and 5 skipped. The fork token cannot rerun upstream Actions (403), so I have left the code unchanged rather than weakening an unrelated performance test. |
Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.com>
Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.com>
Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.com>
Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.com>
Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.com>
Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.com>
Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.com>
Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.com>
Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.com>
…fe generate Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.com>
Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.com>
Signed-off-by: zhifu gao <zhifu.gzf@alibaba-inc.com> Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.com>
Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.com>
Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.com>
Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.com>
Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.com>
Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.com>
Signed-off-by: LauraGPT <18321252+LauraGPT@users.noreply.github.com>
Signed-off-by: LauraGPT <18321252+LauraGPT@users.noreply.github.com>
Signed-off-by: zhifu gao <zhifu.gzf@alibaba-inc.com>
1f8256b to
48e340e
Compare
|
@livekit/agent-devs Rebased onto current This refresh preserves the current LiveKit Exact-head validation is complete: 11/11 focused FunASR plugin tests, lock validation, Ruff, and compile/diff checks locally; upstream |
Signed-off-by: zhifu gao <zhifu.gzf@alibaba-inc.com>
Signed-off-by: zhifu gao <zhifu.gzf@alibaba-inc.com>
Signed-off-by: zhifu gao <zhifu.gzf@alibaba-inc.com>
This PR adds livekit-plugins-funasr, a fully local speech-to-text plugin backed by FunASR and SenseVoice.
Why
SenseVoice is a non-autoregressive multilingual ASR model with strong Chinese and Cantonese support. It runs on-device without an API key and gives LiveKit agents a local alternative for Chinese, Cantonese, English, Japanese, and Korean speech.
What
FunASRSTTas a non-streaming LiveKit STT implementation.model.generateserialized in the worker thread, including when an awaiting request is cancelled.Plugin.download_files()hook so the default SenseVoice model can be prefetched before agent startup.livekit-agents[funasr], anduv.lockwith complete PyTorch and torchaudio runtime dependencies.Usage
Prefetch the default model before starting an agent:
CPU is the safe default. For GPU inference, install PyTorch and torchaudio builds matching the host CUDA runtime and pass
device="cuda".Verification
Validated locally on exact signed head
405afeccfb6eff6a28b58e84c303fb4e8a99aa77, merged withlivekit/agents@94d1e21af3ec8918542fbbbc0f577c7534de12df:livekit.agentsandlivekit.plugins.funasr: no issues in 211 source filesuv lock --check(378 packages), compileall, andgit diff --checkpasslivekit-agents[funasr]extra are aligned at 1.7.1funasr>=1.3.16andlivekit-agents>=1.7.1, and both artifacts includepy.typedThe prior head also passed the exact-lock Python 3.14 unit suite (1,935 passed, 3 expected skips), full mypy (635 source files), the transcription-filter section (356/356), and real CPU inference with
iic/SenseVoiceSmall. GitHub exact-head CI is complete with 9 successful checks, 3 expected path/evaluation skips, 0 failures, and 0 pending checks; Devin Review and CLA pass, and all 10 review threads remain resolved.