STT FallbackAdapter can't detect a stream that stays connected but stops transcribing
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 22/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- python
- 領域
- ai, audio-video-rtc
調査の方向性
The payload names no files, only the candidate homes for the check: stt.FallbackAdapter, StreamAdapter, and AgentActivity, which holds both the VAD and the STT. Read how FallbackAdapter already turns errors into retries and fallback, and how #5648 handled a silently hanging TTS socket. The maintainers have not chosen a location, so the first step is to ask which one they prefer before writing code. Done means an opt-in liveness check that raises a retryable APIConnectionError after speech goes unanswered, and that ignores speech heard while the agent is talking.
索引モデルが issue の本文から書いたものです。
説明
Feature Type
Would make my life easier
Feature Description
A streaming STT can keep its WebSocket open and stop returning any events while audio still flows. We saw this with Gnani (livekit-agents 1.8.2): no events for 60 s while 16 kHz audio kept flowing, until the provider closed the session itself ("no speech segment received for 60 seconds"). The first words after the reconnect were transcribed at once. stt.FallbackAdapter only reacts to errors and timeouts, so the user is effectively muted for the whole time.
Proposal: an opt-in liveness check. When the session's VAD detects speech of at least min_speech and the STT emits no event during it or within timeout after it ends, treat the stream as failed (a retryable APIConnectionError). Retry and fallback then work as today. Optionally, replay the buffered audio of that speech into the new stream, so the words are not lost.
It could live in FallbackAdapter, StreamAdapter, or AgentActivity, which already holds both the VAD and the STT. Speech the VAD hears while the agent is talking should not count, since on a speaker line it can be the agent's own voice.
Happy to open a PR if you'd take it. Which place would you prefer?
Workarounds / Alternatives
We currently wrap each STT plugin in our own stt.STT subclass. Its stream watches the session VAD's events (through a VAD wrapper) and raises a retryable APIConnectionError when speech goes unanswered, then replays the buffered audio into the reopened stream. It works, but it duplicates retry plumbing that belongs in the framework.
Additional Context
- The timeline from one call: last final at T; 60 s of steady audio frames and no STT event of any kind; provider closes the session (status 500, retryable); LiveKit reconnects; the next speech is transcribed within a second.
- A related case that was handled: #5648 (a TTS WebSocket hanging silently).
- 主要言語
- Python
- スター
- 14.6k
- フォーク
- 3.9k
- 平均マージ
- 3日 1時間
- マージ済み PR(30日)
- 173
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
livekit/agents のほかの issue
-
Agent state stays "speaking" after a realtime reply in sessions without audio output対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
Assistant markup is stripped from chat history when expressive mode is off対応中かも @ShivamSharma43 が 8 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
docs: openai.LLM vs openai.responses.LLM for HTTP OpenAI-compat hosts再び着手できるかも @AbarnaaSree が 48 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
livekit/agents#7022 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
-
DuplexRealtimeAdapter: transcript fragment for audio that is never sent anchors the next burst, shifting transcripts by one utterance対応中かも @dyyfk が 1 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
python triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
microsoft/semantic-kernel#14615 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
shackett/shackett-utils#19 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
UKGovernmentBEIS/control-arena#917 ·
メンテナーはふだん 1 日以内に返信