We run a production voice agent on livekit-agents 1.6.7, using LiveKit Inference STT with deepgram/flux-general-multi. However, we are seeing the STT stream stop sending any events for 15-30 seconds even though the caller is talking and the audio is clean (57-59 dB SNR). Opening a new STT stream doesn’t help, because new streams stay silent too. Then one stream suddenly sends a single final transcript covering all the buffered audio (for example, 33 words at 0.99 confidence for about 24s of audio, arriving about 10s after the stream opened). So the audio does seem to reach the service, but the results come back very late. This happens on about 10% of production calls. The caller hears nothing back and often hangs up. Is this a known problem with the Inference gateway or with Flux, and is there a fix or a recommended setup, like connecting to Deepgram directly?
You’re running agents version 1.6.7 which is about 2 months behind the current stable release. I had vague memories that we had fixed stuff for Deepgram since that release, but I couldn’t find a fix I could point to and say ‘upgrading to 1.8.8 will fix your issue’.
That feels like something is blocked. It might be worth upgrading to 1.8.1 just to see if you get any logs about blocked event loops in your agent (Diagnosing blocked event loops in LiveKit Agents | LiveKit has more detail, but in short, we introduced logic to the agent in that release to log any blocking calls affecting performance)
The other possibility is something specific to our Inference gateway. If there is an issue with the gateway (and I don’t see any ongoing known issues - though #5717 does look interesting doesn’t affect the plugin). If you did connect to Deepgram directly, and this issue went away, it would definitely point the finger at the gateway.
Hey Troy, thanks for sharing. That’s pretty much exactly what I already have built out. The main reason for my question was hoping it was something LiveKit fixed the root cause of.
@The_Scaling_Team, Flux is an end-of-turn model, not a streaming-interim one. It holds a turn and emits the result when it decides the turn ended, so it does not send the running partials that nova does (deepgram STT docs, Deepgram Flux). The “no events for 15-30s then one final covering ~24s of audio” is that end-of-turn finalization landing late;: the agent has nothing to act on until it fires, so the caller hears silence.
Two levers bound that wait. Lower eager_eot_threshold (default 0.5) so Flux emits a draft turn sooner, and set eot_timeout_ms so a turn finalizes on a timeout even when the model stays uncertain, which stops a long continuous utterance from buffering for 24s (same docs). If you need running partials for responsiveness instead, nova-3 through deepgram.STT sends interim results by default and Flux will not (stt.py).
The Flux turn-handling path has also moved since 1.6.7, so that version is a weak place to debug this. Flux chunk duration became configurable in #7205, and an open fix, #8158, stops the agent waiting on a final the STT never sends. Upgrade first, then run the direct-Deepgram A/B: the plugin’s STTv2 is the Flux path on your own key, which takes the Inference gateway out of the loop and tells you which side owns the stall..,.
from livekit.plugins import deepgram
session = AgentSession(
stt=deepgram.STTv2(
model="flux-general-multi",
eager_eot_threshold=0.4, # emit a draft turn sooner; default 0.5
eot_timeout_ms=5000, # finalize on a timeout instead of stalling
language_hint="en",
),
# ... llm, tts
)
The 10% intermittency, with fresh streams also staying silent until one flushes, points at something holding the session rather than your turn config, and only LiveKit can read the gateway side of that from the session logs. That part is the gateway lane the team already flagged to keep on their end…