in my transcription node I collect the start_time ...
# ask-ai
a
in my transcription node I collect the start_time and end_time of each chunk, but the start_time and end_time are relative to the start of each agent turn, instead of the whole conversation, how can I change that?
Copy code
async def transcription_node(
        self, text: AsyncIterable[Union[str, TimedString]], model_settings: ModelSettings
    ) -> AsyncGenerator[Union[str, TimedString], None]:
        async for chunk in text:
            if isinstance(chunk, TimedString):
                word = Word(word=str(chunk), start=chunk.start_time or 0, end=chunk.end_time or 0)
                self._agent_word_buf.append(word)
            yield chunk
t
Thanks for reaching out, Anne. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Are you keeping track of when the whole conversation started or using a global timestamp as a reference? Knowing this will really help us adjust the start_time and end_time so they line up with the entire chat.
a
yes I can keep track of that with an event like on agent joined the room or something like that
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!