is the created_at from session history accurately ...
# ask-ai
p
is the created_at from session history accurately maps to the audio?
t
Thanks for reaching out, harish. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thank you for your question! The
created_at
timestamp in session history shows the exact moment when a room was created in LiveKit. LiveKit sets this automatically right when the room is made, so it marks the start of the session. This timestamp is in UTC and is very precise, down to nanoseconds, which helps keep everything consistent. Just a little heads-up: the
created_at
timestamp is specifically about the room creation time and doesn’t directly track audio or participant activity. If you want to connect timestamps to particular audio events or participant actions, it’s a good idea to look at other data points like
joined_at
for participants or check event logs related to audio activities. I hope this helps clarify things for you! Sources: Analytics API | LiveKit Docs | livekit/livekit_analytics.pb.go | livekit-protocol/livekit/protocol/analytics.py
p
what about created_at field from chat item? does this map to the beginning of the users speech?
t
Thank you for your question! The
created_at
field in a chat item shows the exact time when that item was created and added to the chat context. It marks the moment the chat message or related event was saved in the chat history, rather than the very start of a user's speech. If you're hoping to match timestamps to the beginning of a user's speech, you might want to explore transcription-related data. For instance, transcription events come with their own timestamps, and transcription segments include
start_time
and
end_time
fields that align with the actual audio timeline. I hope this helps clarify things for you! Sources: livekit-protocol/livekit/protocol/models.pyi | livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/experimental/realti... | Events and error handling | LiveKit Docs
p
If you're hoping to match timestamps to the beginning of a user's speech, I want to do this
t
To help you match timestamps to the beginning of a user's speech, you can use LiveKit's Voice Activity Detection (VAD) system. The VAD sends out a
START_OF_SPEECH
event whenever it detects speech, and this event includes a
timestamp
field that accurately marks the exact moment the speech started. For instance, if you're working with the Python SDK, you can listen for this event using the
RecognitionHooks.on_start_of_speech()
callback, which gives you the
timestamp
in seconds. Similarly, in the JavaScript SDK, the
VADEvent
object contains the
timestamp
field for the same purpose. If you'd like, I’m here to help you with more details or examples to make the implementation smoother. Just let me know! Sources: livekit-agents/livekit/agents/stt/stt.py | agents/src/vad.ts