i have strange issue , i use deepgram stt , somet...
# ask-ai
m
i have strange issue , i use deepgram stt , sometimes i got this ╭────────────────┬──────────────────────────────────────╮ narpos-survey-new | │ Metric │ Value │ narpos-survey-new | ├────────────────┼──────────────────────────────────────┤ narpos-survey-new | │ Type │ stt_metrics │ narpos-survey-new | │ Label │ livekit.plugins.deepgram.stt.STT │ narpos-survey-new | │ Request ID │ c6a16a08-0671-4ef8-a2d8-d16ab9d0d750 │ narpos-survey-new | │ Timestamp │ 2025-07-25 135324 │ narpos-survey-new | │ Duration │ 0.0000s │ narpos-survey-new | │ Streamed │ ✓ │ narpos-survey-new | │ Audio Duration │ 5.0000s │ narpos-survey-new | ╰────────────────┴──────────────────────────────────────╯ narpos-survey-new | narpos-survey-new | narpos-survey-new | narpos-survey-new | narpos-survey-new | STT Metrics Report narpos-survey-new | ╭────────────────┬──────────────────────────────────────╮ narpos-survey-new | │ Metric │ Value │ narpos-survey-new | ├────────────────┼──────────────────────────────────────┤ narpos-survey-new | │ Type │ stt_metrics │ narpos-survey-new | │ Label │ livekit.plugins.deepgram.stt.STT │ narpos-survey-new | │ Request ID │ c6a16a08-0671-4ef8-a2d8-d16ab9d0d750 │ narpos-survey-new | │ Timestamp │ 2025-07-25 135329 │ narpos-survey-new | │ Duration │ 0.0000s │ narpos-survey-new | │ Streamed │ ✓ │ narpos-survey-new | │ Audio Duration │ 5.0500s │ narpos-survey-new | ╰────────────────┴──────────────────────────────────────╯ narpos-survey-new | narpos-survey-new | narpos-survey-new | narpos-survey-new | narpos-survey-new | STT Metrics Report narpos-survey-new | ╭────────────────┬──────────────────────────────────────╮ narpos-survey-new | │ Metric │ Value │ narpos-survey-new | ├────────────────┼──────────────────────────────────────┤ narpos-survey-new | │ Type │ stt_metrics │ narpos-survey-new | │ Label │ livekit.plugins.deepgram.stt.STT │ narpos-survey-new | │ Request ID │ c6a16a08-0671-4ef8-a2d8-d16ab9d0d750 │ narpos-survey-new | │ Timestamp │ 2025-07-25 135335 │ narpos-survey-new | │ Duration │ 0.0000s │ narpos-survey-new | │ Streamed │ ✓ │ narpos-survey-new | │ Audio Duration │ 5.0500s │ narpos-survey-new | ╰────────────────┴─── Main Problem: Duration 0.0000s Seeing Duration: 0.0000s in your STT metrics indicates that Deepgram STT is operating in streaming mode, but the transcription process is not complete. stt.py:302-311 Cause of the Problem I see repeated metrics in your logs with the same Request ID (c6a16a08-0671-4ef8-a2d8-d16ab9d0d750). This means: Audio Duration increases (5.0000s → 5.0500s) - audio is being received Duration remains at 0.0000s - transcription is not completed Streamed: ✓ - streaming is active This pattern indicates that STT is receiving audio but is not producing a transcription result. why this is happening ?
t
Thanks for reaching out, Ayse. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
The behavior you're observing, where the Duration is consistently reported as
0.0000s
in the STT metrics, is expected for Deepgram's streaming STT implementation. This is not an issue but rather the designed behavior of the system. In streaming STT, the
Duration
field is always set to
0.0
because the transcription process operates continuously in real-time, rather than processing discrete requests. As a result, there is no single "request duration" to measure. Instead of focusing on the
Duration
metric, you should monitor the following: • Audio Duration: This indicates the duration of the audio being streamed and should increase as audio is received. • Streamed: This confirms that the STT is operating in streaming mode. If you are not receiving transcription results despite these metrics being correct, there may be another issue at play. Let me know if that's the case, and we can investigate further. Sources: livekit-plugins/livekit-plugins-deepgram/livekit/plugins/deepgram/stt.py | Capturing metrics | LiveKit Docs
m
i am getting no transciption
t
Hey there! Having trouble getting transcriptions from Deepgram? No worries - let's troubleshoot this together. I know technical hiccups can be frustrating, but we'll help you sort this out step by step. Configuration Issues • API Key: Double-check that your Deepgram API key is working correctly. You can set this through the constructor or the
DEEPGRAM_API_KEY
environment variable. • Language Detection: Just a heads up - streaming mode doesn't play nice with language detection. Make sure
detect_language
is turned off and you've specified a language. • Interim Results: If
interim_results
is disabled, you'll only see final transcripts at the end of speech segments. Audio Format Issues • Sample Rate and Encoding: Let's make sure your audio matches Deepgram's requirements (like 16000 Hz sample rate, 1 channel, "linear16" encoding). • Audio Energy Filtering: Low-energy audio might get filtered out before reaching Deepgram. Check that your audio has enough oomph! Connection and Streaming Issues • WebSocket Connection: Keep an eye out for any connection instability. • Endpointing Configuration: Incorrect endpointing settings can mess with transcription results. Make sure the
endpointing_ms
parameter is set just right. Audio Processing Issues • Audio Duration: Super short audio clips might not have enough speech content for transcription. • Audio Chunk Processing: Verify that you're buffering and sending audio chunks to Deepgram correctly. Event Processing Issues • Event Handlers: Don't forget to handle
SpeechEventType.INTERIM_TRANSCRIPT
and
SpeechEventType.FINAL_TRANSCRIPT
events properly. • Speech Detection: If Deepgram can't detect speech, no transcription events will pop up. Take a look through these suggestions, and if you're still stuck, I'm here to help! Just reach out, and we'll solve this together. Sources: livekit-plugins/livekit-plugins-google/livekit/plugins/google/stt.py | plugins/test/src/stt.ts
m
this is happenign sometimes , especially one turkish operator , netgsm out of 5 calls 1 is no sound
t
Hey there! I totally understand how frustrating it can be when your calls are acting up, especially with those tricky audio issues on NetGSM. Let me help you troubleshoot this and get things working smoothly. 1. Connection and WebSocket Issues • Sometimes network connections can be a bit temperamental. We'll want to take a look at your WebSocket connection and see if there are any hiccups happening with NetGSM. • I recommend checking your logs for any repeated connection errors that might be causing trouble. 2. Audio Buffer and Queue Issues • Think of your audio like water in a pipe - if it gets backed up, things can get wonky. Try increasing your audio buffer size by setting
queue_size_ms=2000
in your settings. 3. Network Latency • Network speed can be like rush hour traffic - sometimes things just slow down between NetGSM and Deepgram's servers. We'll want to investigate the route and see where things might be getting stuck. 4. Audio Configuration Parameters • Let's make sure your audio is speaking the right "language" - aim for 16000 Hz sample rate, 1 channel (mono), and "linear16" encoding. • We might need to play around with your endpointing settings. Try adjusting
endpointing_ms
or turning it off completely with
endpointing_ms=0
. 5. Noise Suppression and Silence Detection • Sometimes noise suppression can be a bit too eager and mess with your audio. We might want to turn off those features temporarily. • If the system is having trouble detecting your speech, we can tweak the Voice Activity Detection by lowering the
min_silence_duration
. 6. Turkish Language Support • Make sure Turkish is explicitly set in your configuration - streaming mode can be a bit picky about language detection. I know this might seem like a lot, but we'll work through it together! If these steps don't solve the mystery, we might need to dig a bit deeper into NetGSM's specific network quirks. Don't worry, we'll get to the bottom of this! Sources: Community & Support | livekit/livekit_composite | DeepWiki | livekit-agents/livekit/agents/voice/audio_recognition.py | Speech & Audio Processing | livekit/livekit_composite | DeepWiki | Understanding "silence detected on local audio track" warning | LiveKit turn detector plugin | LiveKit Docs
m
but its not happening n cartesia , only in google stt and deppgram stt , i have cartesia premıum but ıt has too high latency lıke 20 sec. how to solve this ?
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!