from another thread: hi, wondering if anyone else...
# ask-ai
f
from another thread: hi, wondering if anyone else is seeing this issue with deepgram STT where the
audio_duration
metric is reported as 5s consistently? can't tell if this is a bug in livekit or if we've somehow misconfigured something causing 5s to be buffered and sent instead of streaming live audio
t
Thanks for reaching out, Tarik. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! The reason you’re seeing the Deepgram STT
audio_duration
metric reported every 5 seconds is because LiveKit uses a periodic reporting setup. Specifically, the
SpeechStream
class relies on a
PeriodicCollector
that collects and sends metrics like
audio_duration
in 5-second chunks. If you’re worried something might be off, it’s a good idea to double-check that your audio is streaming properly to LiveKit. But just so you know, this 5-second reporting interval is actually the default and usually not a sign of any problem. Now, if you want to change how often the metrics get reported, you’d need to tweak the
PeriodicCollector
timing inside the
SpeechStream
code. Feel free to reach out if you want a hand with that or have any other questions—I’m here to help! Sources: STTMetrics | LiveKit Agents | livekit-agents/livekit/agents/metrics/base.py