alexnasa commited on
Commit
d1440c1
·
verified ·
1 Parent(s): 88a6f90

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -9
app.py CHANGED
@@ -560,17 +560,19 @@ def get_duration(image_path, audio_path, text, orientation_state, num_steps, ses
560
 
561
  return 0
562
 
 
 
563
 
564
- # audio_chunks = inferpipe.get_times(
565
- # prompt=text,
566
- # image_path=image_path,
567
- # audio_path=audio_path,
568
- # orientation_state= orientation_state,
569
- # seq_len=args.seq_len,
570
- # num_steps=num_steps
571
- # )
572
 
573
- audio_chunks = 1
 
 
 
 
 
 
 
574
 
575
  warmup_s = 30
576
  duration_s = (20 * num_steps) + warmup_s
 
560
 
561
  return 0
562
 
563
+ if session_id is None:
564
+ session_id = uuid.uuid4().hex
565
 
566
+ limited_audio_path = preprocess_audio_first_5s_librosa(audio_path, True, session_id)
 
 
 
 
 
 
 
567
 
568
+ audio_chunks = inferpipe.get_times(
569
+ prompt=text,
570
+ image_path=image_path,
571
+ audio_path=limited_audio_path,
572
+ orientation_state= orientation_state,
573
+ seq_len=args.seq_len,
574
+ num_steps=num_steps
575
+ )
576
 
577
  warmup_s = 30
578
  duration_s = (20 * num_steps) + warmup_s