Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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 + 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 = 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")
|