sreepathi-ravikumar commited on
Commit
91fa8e5
·
verified ·
1 Parent(s): 5657cb1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -293,9 +293,9 @@ async def generate_tts_optimized(id, lines, lang):
293
  if output and os.path.exists(audio_path):
294
  audio = MP3(audio_path)
295
  duration = audio.info.length
296
-
297
 
298
- return duration, audio_path
299
 
300
  def audio_func(id, lines, lang):
301
  """Synchronous wrapper for audio generation."""
@@ -555,7 +555,7 @@ def generate_video():
555
  if not length or not audio_path:
556
  print("Failed to generate audio.")
557
 
558
- scale=length/total
559
 
560
  # Now proceed with video generation using 'data'
561
  print(json.dumps(data, indent=2)) # For debugging
 
293
  if output and os.path.exists(audio_path):
294
  audio = MP3(audio_path)
295
  duration = audio.info.length
296
+ return duration, audio_path
297
 
298
+ return None , None
299
 
300
  def audio_func(id, lines, lang):
301
  """Synchronous wrapper for audio generation."""
 
555
  if not length or not audio_path:
556
  print("Failed to generate audio.")
557
 
558
+ scale=float(length)/total
559
 
560
  # Now proceed with video generation using 'data'
561
  print(json.dumps(data, indent=2)) # For debugging