You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve chapter timestamp accuracy by using raw transcript timeline
- Add timeline skeleton to chapter generation prompt showing actual timestamps every 30s
- Remove skip logic for 00:00:00 chapter heading in transcript insertion
- Reuse existing time-to-text mapping logic for consistency
- Fixes issue where chapter timestamps could be off by several minutes
duration_constraint=f"\n\nIMPORTANT: This video is {duration_str} long. DO NOT generate any timestamps beyond {duration_str}. All timestamps must be less than or equal to {duration_str}."
872
868
869
+
# Build a timeline skeleton from raw transcript if available
870
+
timeline_context=""
871
+
ifraw_transcript:
872
+
print(f"Building timeline skeleton from raw transcript for video {video_id}")
873
+
874
+
# Build mapping of time to text (reusing existing logic)
TIMELINE REFERENCE - These are actual timestamps from the video showing what is being said at different times:
913
+
914
+
{chr(10).join(timeline_samples)}
915
+
916
+
USE THESE ACTUAL TIMESTAMPS to determine when topics change. Your chapter timestamps MUST come from the times shown above or nearby times. DO NOT guess or make up timestamps."""
917
+
873
918
chapters_prompt=f"""
874
919
This is a transcript of a YouTube livestream. Could you please identify up to 10 key moments in the stream and give me the timestamps in the format for YouTube like this?:
0 commit comments