11/*
2- * Copyright 2025 LiveKit, Inc.
2+ * Copyright 2025-2026 LiveKit, Inc.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ import io.livekit.android.room.datastream.StreamInfo
2121import io.livekit.android.room.datastream.incoming.TextStreamReceiver
2222import io.livekit.android.room.participant.Participant
2323import io.livekit.android.room.types.TranscriptionAttributes
24- import io.livekit.android.room.types.fromMap
24+ import io.livekit.android.room.types.fromStringMap
2525import kotlinx.coroutines.CoroutineScope
2626import kotlinx.coroutines.Dispatchers
2727import kotlinx.coroutines.flow.Flow
@@ -59,7 +59,7 @@ internal fun setupTextStream(room: Room, topic: String, coroutineScope: Coroutin
5959
6060 val textStreams = Collections .synchronizedList(mutableListOf<TextStreamData >())
6161 room.registerTextStreamHandler(topic) { reader: TextStreamReceiver , fromIdentity: Participant .Identity ->
62- val transcriptionAttributes = TranscriptionAttributes .fromMap (reader.info.attributes)
62+ val transcriptionAttributes = TranscriptionAttributes .fromStringMap (reader.info.attributes)
6363 val isTranscription = transcriptionAttributes.lkSegmentID != null
6464
6565 var index = - 1
@@ -74,7 +74,7 @@ internal fun setupTextStream(room: Room, topic: String, coroutineScope: Coroutin
7474 if (index == - 1 ) {
7575 index = textStreams.indexOfFirst { stream ->
7676 val streamTranscriptionAttributes = if (isTranscription) {
77- TranscriptionAttributes .fromMap (stream.streamInfo.attributes)
77+ TranscriptionAttributes .fromStringMap (stream.streamInfo.attributes)
7878 } else {
7979 null
8080 }
0 commit comments