My STT (deepgram) is all of a sudden giving high T...
# ask-ai
a
My STT (deepgram) is all of a sudden giving high Transcription Delay and this started to ahppen without any changes in the code, how can i get the request Ids. I have a self hosted Livekit instance
✅ 1
t
Thanks for reaching out, Aditya. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I hear you: you need the Deepgram STT request IDs to investigate sudden high transcription delay on your self‑hosted LiveKit instance. Here’s how to get them and a couple of quick checks to narrow the issue. How to capture STT request IDs 1. Listen for the metrics_collected event in your agent/session. The
RealtimeModelMetrics
payload includes
request_id
,
ttft
, and
duration
. 2. Example (Python) — register a listener and log the fields:
Copy code
def sync_wrapper(ev: MetricsCollectedEvent):
    if isinstance(ev.metrics, RealtimeModelMetrics):
        print(f"Request ID: {ev.metrics.request_id}, TTFT: {ev.metrics.ttft}, Duration: {ev.metrics.duration}")

self.session.on("metrics_collected", sync_wrapper)
1. Save or correlate the printed
request_id
with Deepgram logs (Deepgram can use that ID to find server-side timings). Quick troubleshooting checks to run now • Verify your Deepgram API key and quota (expired/over quota can cause delays). • Check network latency between your LiveKit host and Deepgram (packet loss, DNS issues, routing changes). • Review recent container/host resource usage (CPU, memory, network) on your self‑hosted instance. • Use the captured
request_id
to look up timing in Deepgram logs for each slow transcription. If you want, share one example
request_id
(and a timestamp) you captured and I’ll suggest next diagnostic steps to correlate timestamps and pinpoint whether latency is on your side or Deepgram’s. Sources: Realtime model metrics | LiveKit Documentation | Deepgram STT | LiveKit Documentation, with interactive elements
a
in this exaple the item_<value0> is that the request_id from deepgram?
Copy code
"item": {
        "id": "item_7740d50aa86f",
        "type": "message",
        "role": "user",
        "content": [
          "हां बताइए भैया."
        ],
        "interrupted": false,
        "transcript_confidence": 0.5891113,
        "extra": {},
        "metrics": {
          "stt_metadata": {
            "model_name": "nova-3",
            "model_provider": "Deepgram"
          },
          "started_speaking_at": 1777448438.6401029,
          "stopped_speaking_at": 1777448439.3047473,
          "transcription_delay": 0.8769450187683105,
          "end_of_turn_delay": 0.8781044483184814,
          "on_user_turn_completed_delay": 4.399800673127174e-06
        },
        "created_at": 1777448440.1817932,
        "hash": null
      },
t
Thanks — good question. That
item_7740d50aa86f
is not the Deepgram
request_id
. It's an internal item/message ID. The Deepgram
request_id
appears in the
metrics_collected
event under the
RealtimeModelMetrics
payload (e.g.,
metrics.request_id
). To get it, register a listener for
metrics_collected
and log
ev.metrics.request_id
,
ev.metrics.ttft
, and
ev.metrics.duration
as shown earlier. Once you capture that
request_id
, you can correlate it with Deepgram logs for that transcription. , with interactive elements