Gregniuki commited on
Commit
ecb9aa5
·
verified ·
1 Parent(s): dd87196

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -254,7 +254,7 @@ def infer_batch(ref_audio, ref_text, gen_text_batches, exp_name, remove_silence,
254
  gen_text_len = calculate_weighted_length(gen_text)
255
 
256
  # Duration calculation considering global speed factor
257
- duration = ref_audio_len * speed + int(((ref_audio_len / ref_text_len) * gen_text_len) / speed)
258
 
259
  # Print the calculated duration
260
  print(f"Chunk {i + 1}: Duration: {duration} seconds")
 
254
  gen_text_len = calculate_weighted_length(gen_text)
255
 
256
  # Duration calculation considering global speed factor
257
+ duration = int(ref_audio_len * speed) + int(((ref_audio_len / ref_text_len) * gen_text_len) / speed)
258
 
259
  # Print the calculated duration
260
  print(f"Chunk {i + 1}: Duration: {duration} seconds")