Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -355,11 +355,11 @@ def infer(ref_audio_orig, ref_text, gen_text, exp_name, remove_silence, cross_fa
|
|
| 355 |
|
| 356 |
# Use the new chunk_text function to split gen_text
|
| 357 |
max_chars = int(len(ref_text.encode('utf-8')) / (audio.shape[-1] / sr) * (25 - audio.shape[-1] / sr))
|
| 358 |
-
gen_text_batches = chunk_text(gen_text, max_chars=
|
| 359 |
print('ref_text', ref_text)
|
| 360 |
for i, batch_text in enumerate(gen_text_batches):
|
| 361 |
print(f'gen_text {i}', batch_text)
|
| 362 |
-
|
| 363 |
gr.Info(f"Generating audio using {exp_name} in {len(gen_text_batches)} batches")
|
| 364 |
return infer_batch((audio, sr), ref_text, gen_text_batches, exp_name, remove_silence, cross_fade_duration)
|
| 365 |
|
|
|
|
| 355 |
|
| 356 |
# Use the new chunk_text function to split gen_text
|
| 357 |
max_chars = int(len(ref_text.encode('utf-8')) / (audio.shape[-1] / sr) * (25 - audio.shape[-1] / sr))
|
| 358 |
+
gen_text_batches = chunk_text(gen_text, max_chars=max_chars)
|
| 359 |
print('ref_text', ref_text)
|
| 360 |
for i, batch_text in enumerate(gen_text_batches):
|
| 361 |
print(f'gen_text {i}', batch_text)
|
| 362 |
+
|
| 363 |
gr.Info(f"Generating audio using {exp_name} in {len(gen_text_batches)} batches")
|
| 364 |
return infer_batch((audio, sr), ref_text, gen_text_batches, exp_name, remove_silence, cross_fade_duration)
|
| 365 |
|