handsome-easter-5670
06/25/2025, 4:35 AMtall-airline-16756
06/25/2025, 4:35 AMtall-airline-16756
06/25/2025, 4:35 AMhandsome-easter-5670
06/25/2025, 4:51 AMtall-airline-16756
06/25/2025, 4:51 AMregisterTextStreamHandler
method.
room.registerTextStreamHandler('lk.transcription', async (reader, participantInfo) => {
const message = await reader.readAll();
if (reader.info.attributes['lk.transcribed_track_id']) {
console.log(`New transcription from ${participantInfo.identity}: ${message}`);
} else {
console.log(`New message from ${participantInfo.identity}: ${message}`);
}
});
Here's the scoop: this code sets up a handler that can process both transcriptions and regular text messages. It's pretty clever – it checks for a lk.transcribed_track_id
attribute to figure out if something's a transcription or just a regular chat message.
Got questions or need a bit more help? I'm totally here for you – just ask!
Sources: Text and transcriptions | LiveKit Docsminiature-nail-35141
08/03/2025, 10:55 AMtall-airline-16756
08/03/2025, 10:55 AMpolite-keyboard-62230
08/18/2025, 9:56 AMpolite-keyboard-62230
08/18/2025, 9:56 AM