Skip to content

Commit

Permalink
Create memory with delta segment start
Browse files Browse the repository at this point in the history
  • Loading branch information
beastoin committed Sep 22, 2024
1 parent 0b6e9f7 commit da9e33e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backend/utils/processing_memories.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ async def create_memory_by_processing_memory(uid: str, processing_memory_id: str
print("Transcript segments is invalid")
return
timer_start = processing_memory.timer_start
segment_start = transcript_segments[0].start
segment_end = transcript_segments[-1].end
new_memory = CreateMemory(
started_at=datetime.fromtimestamp(timer_start, timezone.utc),
finished_at=datetime.fromtimestamp(timer_start + segment_end, timezone.utc),
started_at=datetime.fromtimestamp(timer_start + segment_start, timezone.utc),
finished_at=datetime.fromtimestamp(timer_start + segment_start + segment_end, timezone.utc),
language=processing_memory.language,
transcript_segments=transcript_segments,
)
Expand Down

0 comments on commit da9e33e

Please sign in to comment.