[Plugin] livekit-plugins-sherpa: local TTS on sherpa-onnx (Kokoro, Kitten, Piper)
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
The issue links a working implementation at mahimairaja/local-livekit under livekit-plugins/livekit-plugins-sherpa and reports 70 tests, including real-model speech and STT round trips through tts.StreamAdapter. Start by reading that implementation and its tests, then compare its package structure and API with the existing LiveKit agents plugins. Done means a sherpa-onnx TTS plugin supports the described models and streaming behavior; linked pull request #7749 indicates work is already underway.
索引モデルが issue の本文から書いたものです。
説明
Feature Type
Would make my life easier
Feature Description
Every TTS plugin in livekit/agents calls a hosted API. The common local route, Kokoro behind an OpenAI-compatible server through openai.TTS, breaks streaming (#6184), and it needs a separate service.
Proposal: TTS in the same livekit-plugins-sherpa package (STT side: #7746), on sherpa-onnx. In process, ONNX Runtime only, no torch or GPU, no system espeak (the phonemizer data ships with each model).
sherpa.TTS, Kokoro v1.0 by default (82M, int8, 54 voices as typed names). Kokoro's English phonemes come from misaki's dictionaries, with espeak-ng for unknown words.voicetakes the model's own speaker names or a speaker id, so other sherpa-onnx voices work too. Built in: Kitten nano (about 15M, 8 voices) and Piper en_US amy.engine=takes anysherpa_onnx.OfflineTts(VITS, Matcha, newer Kokoro).streaming=False:AgentSessionwraps it intts.StreamAdapter. Each sentence's audio is pushed throughAudioEmitterchunk by chunk as sherpa-onnx produces it, and an interruption stops generation at the next chunk.- Models are pinned to Hugging Face commits and fetched by
download-files.
Tested on real models: Kokoro, Kitten nano and Piper amy each speak a sentence, and a local STT must transcribe it back (character error rate check), directly and through tts.StreamAdapter.
In a full local agent on an M-series Mac mini, CPU only: Kokoro's first audio arrives about 2.2 s into a 3.4 s voice-to-voice turn, so TTS is the largest share of latency.
Workarounds / Alternatives
openai.TTS(base_url=...)against a local Kokoro server: streaming breaks on the framing mismatch described in #6184, and it is an extra service.- A Kokoro-only plugin as asked in #6184 would fix one model; sherpa-onnx covers Kokoro, Kitten, Piper/VITS and Matcha with one dependency.
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
No word-level alignment (aligned_transcript=False): sherpa-onnx does not expose phoneme durations.
Happy to open a PR adding it with the STT.
- 主要言語
- Python
- スター
- 14.6k
- フォーク
- 3.9k
- 平均マージ
- 3日 1時間
- マージ済み PR(30日)
- 166
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
livekit/agents のほかの issue
-
Agent state stays "speaking" after a realtime reply in sessions without audio output対応中かも @Luke-salinero が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
Assistant markup is stripped from chat history when expressive mode is off対応中かも @ShivamSharma43 が 9 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
docs: openai.LLM vs openai.responses.LLM for HTTP OpenAI-compat hosts再び着手できるかも @AbarnaaSree が 49 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
livekit/agents#7022 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Google LLM plugin leaves Gemini thinking tokens out of completion_tokens対応中かも @ninglinLiu が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 38/100
メンテナーはふだん 1 日以内に返信
-
OpenAI realtime: a text user turn queued during a tool-output push deletes the function_call_output from the server conversation対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
TomerAberbach/profiler-md#733 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
its-me-prash/vwgroup-connect-ha#1858 ·
メンテナーはふだん 1 日以内に返信
-
area: client bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
Deleting all alarms or timers shows deleted ones until the next update when there are none leftオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
leikoilja/ha-google-home#1107 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Graphify-Labs/graphify#4524 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信