Muse STT audio buffered before the websocket connection stays delayed for the whole stream
Los mantenedores suelen responder en 1 día
Ya se ha fusionado un pull request relacionado.
- #7890 de @DEVJHAWAR11 — fusionado
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- audio-video-rtc
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Python
- Estrellas
- 14.6k
- Forks
- 3.9k
- Merge medio
- 3 d 18 h
- PR fusionados (30 d)
- 193
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de livekit/agents
-
Google TTS: default ssml_gender NEUTRAL is rejected for Neural2 voicesPosiblemente ocupada @sarankumar1325 la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Assistant markup is stripped from chat history when expressive mode is offPosiblemente ocupada @ShivamSharma43 la tomó hace 13 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
docs: openai.LLM vs openai.responses.LLM for HTTP OpenAI-compat hostsQuizá libre de nuevo @AbarnaaSree la tomó hace 53 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
livekit/agents#7022 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
google realtime (Gemini Live): manual activity detection — barge-in fires on the model's own generation; unclosed transcript-only generation blocks later generate_replyPosiblemente ocupada @akashhguptaa la tomó hoy. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
Todos los issues de livekit/agents
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
zach-blumenfeld/aip#13 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
nathanmarlor/foxess_modbus#1287 ·
Los mantenedores suelen responder en 4 días
-
bug good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
OpenLakeForge/openlakeforge#498 ·
Los mantenedores suelen responder en 1 día
-
good first issue hacktoberfest help wanted python
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Los mantenedores suelen responder en 1 día
-
Exact onnxruntime==1.27.0 core pin makes Pipecat-based apps uninstallable from the dashboardAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
pollen-robotics/reachy_mini#1493 ·
Los mantenedores suelen responder en 1 día