alisaadhq commited on
Commit
59c010c
·
verified ·
1 Parent(s): 6dda67c

Update processor.py

Browse files
Files changed (1) hide show
  1. processor.py +5 -1
processor.py CHANGED
@@ -21,6 +21,8 @@ Fixes applied:
21
  - ✅ NEW: _apply_ducking_ffmpeg — FFmpeg sidechaincompress ducking (production)
22
  Called as a post-process step after write_videofile to avoid
23
  double-encoding. Falls back to simple mix_audio on FFmpeg failure.
 
 
24
  """
25
  import os
26
  import gc
@@ -363,7 +365,9 @@ class VideoProcessor:
363
  f"{min(current_end, max_time)/60:.1f}m …"
364
  )
365
 
366
- ai_res = analyze_transcript(chunk_transcript)
 
 
367
  logger.info(f"🤖 AI response type: {type(ai_res)}")
368
 
369
  try:
 
21
  - ✅ NEW: _apply_ducking_ffmpeg — FFmpeg sidechaincompress ducking (production)
22
  Called as a post-process step after write_videofile to avoid
23
  double-encoding. Falls back to simple mix_audio on FFmpeg failure.
24
+ - ✅ FIX: analyze_transcript now receives video_duration=max_time so
25
+ validate_segments can extend short segments instead of discarding them.
26
  """
27
  import os
28
  import gc
 
365
  f"{min(current_end, max_time)/60:.1f}m …"
366
  )
367
 
368
+ # FIX: pass video_duration so validate_segments can extend
369
+ # short segments instead of discarding them entirely.
370
+ ai_res = analyze_transcript(chunk_transcript, video_duration=max_time)
371
  logger.info(f"🤖 AI response type: {type(ai_res)}")
372
 
373
  try: