limited-policeman-50456
09/22/2025, 11:26 AMpInfo.identity set to the agent’s identity, e.g.
[agent-AJ_3szpKKHndFUd] Hi!
As suggested in the docs, I subscribe to the lk.transcription topic in my frontend using the livekit client sdk like so:
room.registerTextStreamHandler('lk.transcription', async (reader, pInfo) => {
for await (const raw of reader) {
console.log(`[${pInfo.identity}] ${raw}`);
}
});
I have a barebone agent setup. This is my complete agent:
import os, dotenv
from livekit.agents import Agent, AgentSession, AutoSubscribe, JobContext, WorkerOptions, cli, log
from livekit.plugins import azure, openai, silero
logger = log.logger
dotenv.load_dotenv()
async def entrypoint(ctx: JobContext):
await ctx.connect(auto_subscribe=AutoSubscribe.AUDIO_ONLY)
remote = await ctx.wait_for_participant()
agent = Agent(instructions="you are an Agent.")
session = AgentSession(
vad=silero.VAD.load(),
stt=azure.STT(
speech_key=os.environ.get("AZURE_OPENAI_API_KEY"),
speech_region="swedencentral",
language="de-DE",
),
llm=openai.LLM.with_azure(
model="gpt-4o",
azure_deployment="gpt-4o-data-zone",
azure_endpoint=os.environ.get("AZURE_OPENAI_ENDPOINT"),
api_key=os.environ.get("AZURE_OPENAI_API_KEY"),
api_version="2024-12-01-preview",
),
tts=azure.TTS(
speech_key=os.environ.get("AZURE_OPENAI_API_KEY"),
speech_region="swedencentral",
voice="de-DE-SeraphinaMultilingualNeural",
),
max_tool_steps=10,
)
await session.start(agent=agent, room=ctx.room)
await session.generate_reply(instructions="Say 'Hi!'")
def main():
cli.run_app(WorkerOptions(entrypoint_fnc=entrypoint, port=os.getenv("AGENT_PORT", 35087)))
if __name__ == "__main__":
main()
And the deps from my pyproject.toml:
[project]
dependencies = [
"livekit-agents==1.2.8",
"livekit-plugins-openai==1.2.8",
"livekit-plugins-aws==1.2.8",
"livekit-plugins-azure==1.2.8",
"livekit-plugins-turn-detector==1.2.8",
"livekit-plugins-silero==1.2.8",
"pydantic[email]==2.11.9",
"python-dotenv==1.1.0",
]
requires-python = "~=3.13"
I have python 3.13.4 and my livekit server has version 1.9.1. Does anyone know, where this misbehavior in the transcriptions participant identity comes from?
PS: What could be interesting, is that when looking at the reader.info.attributes in the frontend, the users transcripts and the agent transcripts have different lk.transcribed_track_id.jolly-doctor-73636
09/22/2025, 11:49 AMlimited-policeman-50456
09/22/2025, 12:13 PMjolly-doctor-73636
09/22/2025, 12:13 PMjolly-doctor-73636
09/22/2025, 12:18 PMlimited-policeman-50456
09/22/2025, 12:44 PMjolly-doctor-73636
09/22/2025, 12:46 PMrefined-appointment-81829
09/22/2025, 3:38 PMclean-lawyer-43115
09/22/2025, 6:01 PM