Muse STT audio buffered before the websocket connection stays delayed for the whole stream
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- audio-video-rtc
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Python
- Stelle
- 14.6k
- Fork
- 3.9k
- Merge medio
- 3g 9h
- PR unite (30g)
- 159
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
-
Gemini Live: agent stays "speaking" without audio outputForse già presa @Luke-salinero l’ha presa 3 giorni 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 11 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 51 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
-
krisp VIVA: native filter is built on the event loop on the first audio frame (200-800 ms block)Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
-
SpeakingRateStream blocks event loop 100–200ms on TTS audio bursts (TranscriptSynchronizer)Forse già presa @ninglinLiu l’ha presa 1 giorno fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di livekit/agents
Issue simili
-
`image_generation`: `max_retries` is ignored for OpenAI-compatible providers (always 2 retries)Forse già presa @ericz7900 l’ha presa oggi. Apertallm translation
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
rheeloaded/paperpull#117 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
agenda-tech-brasil/agenda-tech-brasil#1619 · 1 commento ·
-
process
Difficoltà 1/5 1-3 ore Idoneità per principianti 76/100
pyrite-wiki/pyrite#1036 ·
I maintainer di solito rispondono entro 1 giorno