nice-napkin-15455
07/14/2025, 6:54 AMtall-airline-16756
07/14/2025, 6:55 AMtall-airline-16756
07/14/2025, 6:55 AMdiarize
parameter to true
within your Deepgram STT options. In JavaScript, for example:
const sttOptions = {
diarize: true,
// other options...
};
When enabled, this parameter is passed to Deepgram's API and allows the system to distinguish between different speakers. By default, diarize
is set to false
.
Sources: af144a41-2c4c-4189-9810-c602682aa05e, ec3eed99-8a8c-43e5-8e45-f2058270ce02
Sources: STTOptions | LiveKit Agents | plugins/deepgram/src/stt.ts | Speechmatics integration guide | LiveKit Docsnice-napkin-15455
07/14/2025, 6:56 AMTypeError: STT.__init__() got an unexpected keyword argument 'diarize'
error when supplying that parameter to deepgram plugintall-airline-16756
07/14/2025, 6:57 AMdiarize
parameter right now - it's a bit of a bummer, I know. The good news? There's a workaround!
If you want speaker diarization in Python, the Speechmatics plugin is your new best friend. It supports diarization super easily with diarization="speaker"
. Check out this handy example:
from livekit.plugins import speechmatics
stt = speechmatics.STT(
transcription_config=speechmatics.types.TranscriptionConfig(
language="en",
operating_point="enhanced",
enable_partials=True,
max_delay=0.7,
diarization="speaker",
speaker_diarization_config={"max_speakers": 2}, # adjust as needed
)
)
This setup will give you speaker IDs in your transcription results - pretty cool, right? If you're really set on using Deepgram with diarization, just know that it's currently only available in Node.js. Alternatively, you could process responses directly from Deepgram's API outside the plugin.
Sources: a5510711-aef0-484b-8bfb-226a6ac9f504, af144a41-2c4c-4189-9810-c602682aa05e, ec3eed99-8a8c-43e5-8e45-f2058270ce02, 031f2f9f-650a-46f6-af89-81bdd9caeed0, cd233cca-5f12-40c4-96ef-c1295379410c
Sources: livekit-plugins/livekit-plugins-gladia/livekit/plugins/gladia/stt.py | plugins/deepgram/src/stt.ts | STTOptions | LiveKit Agents | Deepgram STT integration guide | LiveKit Docs | pipeline-stt/diarization.py