mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 16:56:22 +02:00
Update transcript processing to use new API object attributes
This commit is contained in:
parent
c08508c0c4
commit
7bb8e77ee1
1 changed files with 3 additions and 3 deletions
|
|
@ -141,9 +141,9 @@ async def add_youtube_video_document(
|
|||
# Include complete caption information with timestamps
|
||||
transcript_segments = []
|
||||
for line in captions:
|
||||
start_time = line.get("start", 0)
|
||||
duration = line.get("duration", 0)
|
||||
text = line.get("text", "")
|
||||
start_time = line.start
|
||||
duration = line.duration
|
||||
text = line.text
|
||||
timestamp = f"[{start_time:.2f}s-{start_time + duration:.2f}s]"
|
||||
transcript_segments.append(f"{timestamp} {text}")
|
||||
transcript_text = "\n".join(transcript_segments)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue