Muse STT audio buffered before the websocket connection stays delayed for the whole stream
维护者通常 1 天内回复
已经有一个关联 PR 被合并了。
- #7890 来自 @DEVJHAWAR11 —— 已合并
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- python
调研方向
Start by reading SpeechStream._send_audio and _run in the Muse STT implementation, focusing on how _input_ch is queued while _connect_ws() runs and when the pacing clock starts. Reproduce the reported delays with the fake websocket and real-time frames described in the issue. Done means buffered packets are sent promptly after connection and subsequent packets arrive close to real time; an open pull request #7890 is already linked.
由索引模型根据 Issue 内容生成。
描述
Bug Description
For Muse STT implementation, in SpeechStream._send_audio, pacing_origin is set when the first packet is sent. Every later packet then waits until pacing_origin + n × 80 ms before it is sent:
if pacing_origin is None:
pacing_origin = loop.time()
deadline = pacing_origin + sent_duration
But before the first packet is sent, packets may already have stacked(between the session start and the Muse websocket connecting), since _run awaits _connect_ws() before starting _send_audio.
If x packets built up, every packet is sent x × 80 ms later than its original time, for the rest of the stream. The backlog is never caught up, because pacing never allows sending faster than real time.
As a result, Muse hears all audio late, and transcripts and end-of-turn events are late by the same amount.
Expected Behavior
Packets that stacked before the Muse websocket connects should be sent as soon as the connection is ready. After that, each packet should be sent once its audio is complete, so Muse receives audio close to real time no matter how long the connection took.
Reproduction Steps
**Repro:** running `_send_audio` with a fake websocket and frames arriving in real time:
| Connect time | Each packet sent late by |
| ------------ | ------------------------ |
| 0 ms | 1 ms |
| 300 ms | 221 ms |
| 1000 ms | 921 ms |
Operating System
macos
Models Used
Muse, muse-voice-transcribe-1.0
Package Versions
livekit-agents==1.8.6
livekit-plugins-meta==1.8.6
Session/Room/Call IDs
No response
Proposed Solution
Send the buffered packets immediately, for example by skipping the sleep while `_input_ch` still has queued frames, or by starting the pacing clock when the first frame is pushed instead of when the first packet is sent.
Additional Context
No response
Screenshots and Recordings
No response
- 主要语言
- Python
- 星标
- 14.6k
- 派生
- 3.9k
- 平均合并
- 2 天 2 小时
- 30 天内合并 PR
- 224
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
livekit/agents 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 78/100
维护者通常 1 天内回复
-
mistralai: expose reasoning_effort on the LLM可能已有人在做 @muzman123 于 2 天前认领。 未关闭enhancement
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
ci: unit tests pin Python 3.12 while the package advertises 3.14 support可能已有人在做 @huong8373tt-beep 于 3 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
Assistant markup is stripped from chat history when expressive mode is off可能已有人在做 @ShivamSharma43 于 24 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
docs: openai.LLM vs openai.responses.LLM for HTTP OpenAI-compat hosts可能重新可做 @AbarnaaSree 于 64 天前认领,目前没有进行中的 PR。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
相似的 Issue
-
breaking change
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
check-skill-pages: show fixture build errors when a build fails可能已有人在做 @ShahadatTest 今天认领。 未关闭good first issue P2
难度 1/5 1 小时以内 新手友好度 85/100
coco-research/coco#439 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
esphome/home-assistant-addon#274 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
endurain-project/endurain#882 ·
维护者通常 1 天内回复
-
good first issue
难度 2/5 1-3 小时 新手友好度 72/100