LiveKit makes handling multiple users with Deepgram super smooth by processing each person's audio stream separately. Here’s a quick rundown of how you can set this up:
1.
Initialize Deepgram STT: Start by creating a Deepgram STT instance to handle real-time transcription.
2.
Track Participant Connections: Keep an eye on LiveKit's events to know when folks join or leave the session.
3.
Create Independent Sessions: For every participant, set up a separate session linked to their audio stream so transcription happens side-by-side.
4.
Use RoomIO: Connect each session to a participant’s audio track with the RoomIO class, making sure transcription is tailored to that user.
5.
Start Transcription: Kick off a transcription stream for each person’s audio input.
6.
Clean Up: When someone leaves, close their session and tidy up resources.
This way, you get transcriptions running in parallel for everyone without a hitch. If you want me to walk you through the steps in more detail or share some example code, just give me a shout!
Sources:
How to set a fixed participant for agent audio processing |
Deepgram STT integration guide | LiveKit Docs |
livekit-plugins/livekit-plugins-deepgram/livekit/plugins/deepgram/tts.py