[Plugin] livekit-plugins-sherpa: local STT on sherpa-onnx (streaming + batch)
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 20/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- audio-video-rtc, backend
Direzione di ricerca
An implementation is linked at livekit-plugins/livekit-plugins-sherpa in the author's repository; start by reviewing it alongside the existing silero and turn-detector plugins. The issue reports 70 tests and strict mypy checks; compare the implementation with the requested streaming and batch behavior, model downloads, and known audio limits. Done means a reviewed livekit-plugins-sherpa package that meets those requirements; an open linked pull request (#7748) is already in progress.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Feature Type
Would make my life easier
Feature Description
Every STT plugin in livekit/agents calls a hosted API. Running an agent fully on-device, in an air-gapped deployment, or just without a per-minute bill, means leaving the plugin system: an OpenAI-compatible local server behind openai.STT(base_url=...), or a one-off plugin per model.
Proposal: a livekit-plugins-sherpa package built on sherpa-onnx. One wheel, ONNX Runtime only (no torch, no GPU), and it runs most open speech models: zipformer, paraformer, Whisper, Moonshine, SenseVoice, Parakeet and more.
sherpa.STT: true streaming on sherpa's online recognizer.streaming=True,interim_results=True,aligned_transcript="word". The final transcript is always emitted beforeEND_OF_SPEECHfor the same utterance (the ordering #7699 depends on). Endpointing from sherpa's own rules;flush()closes an utterance and keeps word timestamps on the session clock.sherpa.BatchSTT: sherpa's offline recognizer (Whisper, Moonshine, SenseVoice, Parakeet...).streaming=False;AgentSessionalready runs it live throughstt.StreamAdapterand the default Silero VAD.- Built-in models are pinned to Hugging Face commits and fetched by
download-files, the same waysileroandturn-detectordo. Any other model plugs in throughrecognizer=.
Tested on real models: streaming zipformer en (70M int8) and en-20M; Moonshine tiny en (int8) and Whisper tiny.en (int8). Checks run LibriSpeech clips as 48 kHz room audio, live audio through StreamAdapter + Silero VAD, and TTS speech transcribed back.
In a full local agent on an M-series Mac mini, CPU only: about 3.4 s voice to voice, with end of turn at 0.97 s.
Workarounds / Alternatives
openai.STT(base_url=...)against a local server: an extra service to run, and no streaming interims or word timings.- Per-model plugins such as FunASR/SenseVoice in #5897 (PR #6176), batch only. sherpa-onnx also runs SenseVoice, so one plugin could cover that family plus streaming models.
- #6522 (PR #6525) composes a local example from existing plugins; this would give it a native STT.
Additional Context
Working implementation, 70 tests, mypy strict: https://github.com/mahimairaja/local-livekit (livekit-plugins/livekit-plugins-sherpa)
Write-up with measurements: https://mahimai.ca/blog/local-livekit-voice-agent-offline
Known limits: the built-in wideband models return empty text for clean 8 kHz (telephony) audio, so SIP needs an 8 kHz model via recognizer=; the 20M streaming model drops leading words on resampled 48 kHz audio, so it is not the default.
TTS side of the same package: #7747.
Happy to open a PR adding the package under livekit-plugins/.
- Lingua principale
- Python
- Stelle
- 14.6k
- Fork
- 3.9k
- Merge medio
- 3g 1h
- PR unite (30g)
- 166
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di livekit/agents
-
Agent state stays "speaking" after a realtime reply in sessions without audio outputForse già presa @Luke-salinero l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Assistant markup is stripped from chat history when expressive mode is offForse già presa @ShivamSharma43 l’ha presa 9 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
docs: openai.LLM vs openai.responses.LLM for HTTP OpenAI-compat hostsForse di nuovo libera @AbarnaaSree l’ha presa 48 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
livekit/agents#7022 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Google LLM plugin leaves Gemini thinking tokens out of completion_tokensForse già presa @ninglinLiu l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 38/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di livekit/agents
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
omegaup/omegaup#10353 · 1 commento ·
I maintainer di solito rispondono entro 5 giorni
-
bot-triaged module: LrScheduler module: optimizer triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
documentation glm5 llm-model
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vllm-project/vllm-ascend#19062 ·
I maintainer di solito rispondono entro 1 giorno
-
Author Page: shuai-zhao-llmApertaauthor-page correction
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
acl-org/acl-anthology#10496 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno