Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -219,7 +219,7 @@ def infer_batch(ref_audio, ref_text, gen_text_batches, exp_name, remove_silence,
|
|
219 |
# Calculate duration
|
220 |
ref_text_len = len(ref_text.encode("utf-8"))
|
221 |
gen_text_len = len(gen_text.encode("utf-8"))
|
222 |
-
duration = ref_audio_len + int(ref_audio_len / ref_text_len * gen_text_len / speed)
|
223 |
# Print the calculated duration
|
224 |
print(f"Duration: {duration} seconds")
|
225 |
# inference
|
|
|
219 |
# Calculate duration
|
220 |
ref_text_len = len(ref_text.encode("utf-8"))
|
221 |
gen_text_len = len(gen_text.encode("utf-8"))
|
222 |
+
duration = ref_audio_len + int(ref_audio_len / ref_text_len * gen_text_len / (0.8 * speed))
|
223 |
# Print the calculated duration
|
224 |
print(f"Duration: {duration} seconds")
|
225 |
# inference
|