in deepgram before agent speech is committed in ro...
# ask-ai
d
in deepgram before agent speech is committed in room their is some random single word like 'uh' how to fix it started occurring now it was not their previously
t
Thanks for reaching out, Giriraj. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! If you’re noticing random little words like "uh" popping up in your Deepgram transcriptions, don’t worry—it’s actually pretty easy to fix. These filler words show up because the
filler_words
option is turned on by default to help with turn detection accuracy, but that means words like "uh" and "um" get included in your results. If you’d prefer to skip those filler words, just set
filler_words=False
when you’re setting up your Deepgram STT instance. Here’s a quick example to show you how:
Copy code
from livekit.plugins.deepgram import stt

deepgram_stt = stt.STT(
    model="nova-3",
    interim_results=True,
    punctuate=True,
    smart_format=False,
    filler_words=False,  # Disable filler words
    sample_rate=16000,
    no_delay=True,
    endpointing_ms=25,
    profanity_filter=False,
    language="en-US",
)
Just a heads up—turning off filler words might make turn detection a bit trickier since those fillers actually help the system know when someone’s finished speaking. If you notice it’s not as smooth, you can tweak settings like
endpointing_ms
to better control when speech is considered done. This way, you can avoid cutting off your agent’s speech too soon. Sources: livekit-agents/livekit/agents/voice/agent_activity.py
d
what must be configuration for deepgram TTS
t
Hey there! When setting up Deepgram TTS with LiveKit, you can either stick with the default settings or tweak a few parameters to fit your needs. Here’s a quick rundown of the main configuration details: • Model: The default TTS model is
aura-2-andromeda-en
. • Encoding: By default, the audio encoding format is
linear16
. • Sample Rate: The default audio sample rate is 24000 Hz. If you want to get Deepgram TTS working in a LiveKit session, here’s a simple example to help you out:
Copy code
from livekit.plugins import deepgram
from livekit.agents import AgentSession

session = AgentSession(
    tts=deepgram.TTS(
        model="aura-2-andromeda-en",
    ),
    # ... other components like stt, llm, etc.
)
Just a heads up, make sure your
DEEPGRAM_API_KEY
environment variable is set up for authentication. Also, if you want to speed things up, you can pre-warm the TTS service by calling the
prewarm()
method on your TTS instance like this:
Copy code
tts_instance = deepgram.TTS()
tts_instance.prewarm()
If you’d like to dive deeper, feel free to check out the Deepgram TTS plugin reference or the Voice AI quickstart guide. They’re super helpful! Sources: Deepgram TTS integration guide | LiveKit Docs | livekit-plugins/livekit-plugins-deepgram/README.md