Expose configurable outgoing audio chunk duration for Deepgram Flux
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 74/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- audio-video-rtc
Direzione di ricerca
Inizia nel pacchetto livekit-plugins-deepgram: trova il costruttore di deepgram.STTv2 e il ciclo _run di SpeechStreamv2 dove samples_per_channel viene impostato su sample_rate // 20 (il default di 50 ms). Fai passare un argomento opzionale chunk_size_ms a intero positivo in modo che cambi solo quell'aritmetica di batching, mantenendo il default e il flush del chunk parziale. Aggiungi un test con un WebSocket falso che verifichi le dimensioni dei messaggi in uscita per 50 ms e 80 ms; si può considerare concluso quando il comportamento di default è invariato e la nuova opzione produce batch da 80 ms. Nota che l'issue chiede al maintainer se l'API sia adatta, quindi conferma l'accettazione prima di investire troppo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Proposal
Expose an optional chunk_size_ms argument on deepgram.STTv2 so applications can configure outgoing PCM WebSocket batching. Keep the existing 50 ms default; allow opting into 80 ms without replacing the plugin's send loop.
In the tested Deepgram plugin version (1.6.1), SpeechStreamv2._run sets samples_per_channel to sample_rate // 20. Deepgram's Flux quickstart recommends 80 ms chunks (2,560 bytes for mono linear16 at 16 kHz).
Updated evidence: isolated Flux benchmark
We repeated the comparison with 24 direct WebSocket trials from a LiveKit Cloud worker in us-east, removing RTC media, VAD, LiveKit endpointing, LLM, and TTS from the measured path. This follow-up tests the effect of PCM batching on observed Flux EOT latency.
The primary metric is the interval from acoustic speech end on a real-time-paced PCM timeline to receipt of Flux EndOfTurn by the worker. Acoustic speech end is the end of the last 10 ms window with normalized RMS above 0.025. Both timestamps use the same worker-side monotonic clock.
| Synthetic utterance | Mean EOT latency, 50 ms chunks | Mean EOT latency, 80 ms chunks | Difference, 80 minus 50 |
|---|---|---|---|
| “Please tell me where to put the blue notebook.” | 437.5 ms | 400.7 ms | −36.8 ms |
| “Please put the blue notebook.” | 446.2 ms | 418.8 ms | −27.5 ms |
| “on the wooden table next to the lamp.” | 532.4 ms | 523.5 ms | −8.9 ms |
| All trials | 472.0 ms | 447.7 ms | −24.4 ms (about 5.2%) |
We used three distinct prerecorded utterances. Each utterance was sent to Flux eight times: four times using 50 ms audio chunks and four times using 80 ms audio chunks.
A trial means sending one complete utterance over a fresh WebSocket connection and measuring the time from its acoustic speech end to receipt of Flux’s EndOfTurn event. The 50 ms and 80 ms values describe the duration of audio in each WebSocket message—not the duration of the utterance or the interval between trials.
For a given utterance, every trial used identical PCM audio, including the same leading and trailing silence. Only the outgoing chunk size changed.
We organized the trials into two blocks:
| Block | First trial | Second trial | Third trial | Fourth trial |
|---|---|---|---|---|
| Block 1 | 50 ms | 80 ms | 80 ms | 50 ms |
| Block 2 | 80 ms | 50 ms | 50 ms | 80 ms |
We used this counterbalanced order to reduce the influence of changes over time, such as network conditions or provider load. Running all 50 ms trials first and all 80 ms trials afterward could favor whichever condition happened to run during a faster period. Reversing the order in the second block gives both chunk sizes exposure to earlier and later positions.
This reduces ordering bias
80 ms was faster in 8 of 12 adjacent matched pairs; the median paired difference was −23.5 ms. All 24 trials produced exactly one EndOfTurn, none before the acoustic boundary. Final transcripts matched across conditions for each utterance, and all EOT events had trigger: model.
Suggested scope
A constructor-only positive integer duration, documented in milliseconds, used solely by the local audio batching loop. Preserve the 50 ms default and existing partial-chunk flush behavior.
Would this API fit the plugin? A small draft implementation with fake-WebSocket tests can serve as a concrete proposal.
- Lingua principale
- Python
- Stelle
- 14.6k
- Fork
- 3.9k
- Merge medio
- 2g 6h
- PR unite (30g)
- 153
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
-
BM25SearchStrategy (the default) never matches underscore-joined terms in tool descriptions or param descriptionsForse già presa @BlueX888 l’ha presa 1 giorno fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
livekit/agents#7727 · 1 commento ·
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 4 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 43 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
-
[Plugin] livekit-plugins-sherpa: local TTS on sherpa-onnx (Kokoro, Kitten, Piper)Forse già presa @mahimairaja l’ha presa oggi. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
[Plugin] livekit-plugins-sherpa: local STT on sherpa-onnx (streaming + batch)Forse già presa @mahimairaja l’ha presa oggi. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di livekit/agents
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
KalicoCrew/kalico#1012 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
esphome/esphome.io#7657 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
VNG-Realisatie/gemma-zaken#2658 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
comp/gateway comp/plugins duplicate P3 type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
NousResearch/hermes-agent#137019 ·
I maintainer di solito rispondono entro 1 giorno