billowy-psychiatrist-32507
09/08/2025, 8:16 PMtall-airline-16756
09/08/2025, 8:16 PMtall-airline-16756
09/08/2025, 8:16 PMpip install "livekit-agents[deepgram]~=1.2"
2. Set Up Authentication: Grab your Deepgram API key from the Deepgram Console and set it as an environment variable like this:
DEEPGRAM_API_KEY=<your_api_key>
3. Integrate with AgentSession: Then, use this code snippet to hook up Deepgram STT:
from livekit.plugins import deepgram
session = AgentSession(
stt=deepgram.STT(
model="nova-3", # This is optional and defaults to 'nova-3'
),
# ... you can add other components like llm, tts, etc.
)
4. Optional Customization: Feel free to tweak the STT settings with options like language, endpointing duration, and key terms:
stt=deepgram.STT(
model="nova-3",
language="en-US",
endpointing_ms=25,
keyterms=["LiveKit", "AI"],
)
The AgentSession takes care of voice activity detection (VAD) to kick off the STT process smoothly. If you want to dive deeper, check out the Voice AI Quickstart Guide. Happy coding!
Sources: livekit-plugins/livekit-plugins-deepgram/README.md | plugins/deepgram/src/index.ts | Deepgram STT integration guide | LiveKit Docs | Deepgram STT integration guide | LiveKit Docs | Speech-to-text (STT) integrations | LiveKit Docs