what is the best way to get timestamps?
# ask-ai
m
what is the best way to get timestamps?
t
Thanks for reaching out, Kush. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
LiveKit provides several ways to work with timestamps, depending on your specific use case: • `createTimeStampNs()`: A static method that returns a timestamp in nanoseconds. • `timeStampNs`: A property of
VideoFrame
that contains a timestamp in nanoseconds. • Other specific timestamp properties, such as
remoteTimestamp
in
RemoteOutboundRtpStreamStatistics
or
lastPacketReceivedTimestamp
in
InboundRtpStreamStatistics
. If you can provide more details about your use case, I can help you determine the best approach for your needs. Sources: timeStampNs | Documentation | remoteTimestamp | Documentation | lastPacketReceivedTimestamp | Documentation | lastPacketReceivedTimestamp | Documentation | createTimeStampNs() | Documentation
m
I want to determine the timestamps for an agent pipeline conversation with a remote particpant. I want recording the room using egress. Is the timestamp going to be accurate to the egress file?
t
Thank you for providing more details. Unfortunately, I couldn't find specific information on whether the timestamps in LiveKit are guaranteed to align accurately with the egress file. To ensure accuracy, you may need to test the setup or provide additional details about your use case so we can explore further options. If you'd like, I can escalate this to a specialist for a more in-depth review.
m
how would I get timestamps from an agent transcript? do you have examples with code?
t
Currently, I couldn't locate specific examples or documentation on extracting timestamps from an agent transcript in LiveKit. If you have a particular SDK or tool in mind, I can assist in narrowing down the approach or escalate this to a specialist for further assistance. Let me know how you'd like to proceed!
a
@microscopic-airport-67304 did you get any way to get the timestamps with agent transcript
t
Hey there! I see you might be unsure about those agent transcript timestamps. No worries – I'm here to help! If you'd like me to dig into this a bit more or connect you with someone who can provide more in-depth support, just say the word. We'll get to the bottom of this together.
a
Yes go ahead
t
I'm sorry, but I don't have the information you need at the moment. If you would like a member of the LiveKit team to respond, please ask your question in one of the other channels.