I have noticed a UserState event of speaking being...
# ask-ai
m
I have noticed a UserState event of speaking being made however this is not followed by a conversation_item_added afterwards. I can hear the voice the call recording fine
t
Thanks for reaching out, Ian. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
When the
UserState
event for "speaking" is triggered, it means the voice activity detection (VAD) has picked up that the user has started talking. This happens right away as soon as speech is detected. On the other hand, the
conversation_item_added
event only happens once the user's speech has been fully transcribed into text and added to the chat history. So, there might be a little delay between the "speaking" event and when the transcription is finalized. Sometimes, if the speech isn’t processed into a conversation item, this event might not appear at all. Since you mentioned you can hear the voice in the call recording, that’s a great sign the audio is being captured properly. If the
conversation_item_added
event is missing, it could be related to how the transcription process or endpointing settings are configured. Please feel free to reach out if you'd like me to help you dig deeper into this—I’m here to support you! Sources: Events and error handling | LiveKit Docs | Events and error handling | LiveKit Docs | livekit-agents/livekit/agents/voice/agent_activity.py | agents/src/voice/agent_activity.ts
f
when reading the transcription from the usetranscription hook i see both users have the same identity: [ { "text": "Hi Gad, I’m Alex from PMF Labs. This is a quick, one-question behavioral mock interview, focused on the competencies relevant for a role at Meta. Ready to get started?", "participantInfo": { "identity": "agent-AJ_pCnEDWRVZ6UW" }, "streamInfo": { "id": "4f7ab6ab-acf5-4b4d-8f44-79ff47f2fcae", "mimeType": "text/plain", "topic": "lk.transcription", "timestamp": 1761719455016, "attributes": { "lk.transcription_final": "true", "lk.transcribed_track_id": "TR_AMLp8LBEzAJ9du", "lk.segment_id": "SG_1b1aa1249295" }, "encryptionType": 0 } }, { "text": "Yeah, sure. I just want to see if you can have a live transcription or only when I'm finished talking you get an entire script.", "participantInfo": { "identity": "agent-AJ_pCnEDWRVZ6UW" }, "streamInfo": { "id": "a7c9111a-b693-4181-bc92-a82711c781e3", "mimeType": "text/plain", "topic": "lk.transcription", "timestamp": 1761719488144, "attributes": { "lk.transcription_final": "false", "lk.transcribed_track_id": "TR_AM4iJsQdeb9T6j", "lk.segment_id": "SG_3fb89ba4d45f" }, "encryptionType": 0 } }, { "text": "Understood.", "participantInfo": { "identity": "agent-AJ_pCnEDWRVZ6UW" }, "streamInfo": { "id": "c5fbaafa-602f-4430-aee8-fe5a365e7dca", "mimeType": "text/plain", "topic": "lk.transcription", "timestamp": 1761719488647, "attributes": { "lk.transcribed_track_id": "TR_AMLp8LBEzAJ9du", "lk.transcription_final": "true", "lk.segment_id": "SG_8a54f7affbff" }, "encryptionType": 0 } } ]
t
It looks like both users are getting assigned the same identity in the transcription data. To help us get to the bottom of this, could you please clarify a few things? • Are these identities for human participants, agent participants, or maybe both? • Are the duplicate identities showing up in the same transcription stream or in separate streams? • How are participant identities being assigned when they join the room? Understanding this will really help us figure out whether the issue is coming from the client-side setup, agent routing, or session management. Thanks so much for your help with this! Sources: Node.js Agents Architecture | livekit/livekit_composite | DeepWiki | packages/react/src/hooks/useRemoteParticipant.ts | hooks/useDataStreamTranscriptions.ts | Text and transcriptions | LiveKit Docs | examples/other/transcription/multi-user-transcriber.py