Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Plugin] livekit-plugins-sherpa: local STT on sherpa-onnx (streaming + batch)

オープン
#7,746 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@mahimairaja がすでに取り組んでいます。

2026年10月11日 から。

  • #7748 @mahimairaja による — オープン

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
20/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
python

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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 before END_OF_SPEECH for 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; AgentSession already runs it live through stt.StreamAdapter and the default Silero VAD.
  • Built-in models are pinned to Hugging Face commits and fetched by download-files, the same way silero and turn-detector do. Any other model plugs in through recognizer=.

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/.

主要言語
Python
スター
14.6k
フォーク
3.9k
平均マージ
2日 7時間
マージ済み PR(30日)
228

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

livekit/agents のほかの issue

livekit/agents の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。