I have a Deepgram STT configured with interim_resu...
# ask-ai
c
I have a Deepgram STT configured with interim_results=True and smart_format=True. I can create an STT stream with stt_stream = stt.stream() and iterate with async for event in stt_stream:, but I NEVER receive any SpeechEventType.INTERIM_TRANSCRIPT events - only final transcripts appear in conversation_item_added. My Deepgram config: deepgram.STT(model='nova-3', interim_results=True, smart_format=True) My setup shows: 'Created STT stream for interim processing' My loop: if event.type == SpeechEventType.INTERIM_TRANSCRIPT: never triggers What specific Deepgram parameters or LiveKit configuration are required for interim transcript events to actually be emitted by the STT stream? Is there a minimum audio duration, specific model requirement, or additional Deepgram parameter needed?
t
Thanks for reaching out, Clovis. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
To receive
SpeechEventType.INTERIM_TRANSCRIPT
events in LiveKit when using Deepgram STT with
interim_results=True
and
smart_format=True
, ensure the following: • Enable interim results: Confirm that
interim_results=True
is set when initializing the Deepgram STT instance. This parameter enables preliminary results before the final transcription is available. • Proper STT stream setup: Use a streaming STT instance, as interim transcripts are only available through the streaming interface. • Audio data flow: Continuously push audio frames to the STT stream using methods like
push_frame()
. Here is an example configuration in Python:
Copy code
from livekit.plugins.deepgram import STT

stt = STT(
    interim_results=True,  # Required for interim transcripts
    smart_format=True,     # Enables smart formatting
    # other parameters...
)
The
smart_format=True
and
interim_results=True
parameters work together without conflicts. Both are passed to Deepgram's API in the live configuration. The
smart_format
parameter improves the readability of transcriptions and applies to both interim and final transcripts. If you are still not receiving interim transcript events, verify that: • Audio frames are being pushed to the STT stream continuously. • The transcript contains actual text content (interim transcripts are only emitted when there is text). Let me know if you need further assistance! Sources: livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/stt.py | Deepgram integration guide | LiveKit Docs | agents/src/stt/stt.ts | SpeechEventType | LiveKit Agents