Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -397,7 +397,7 @@ def infer(ref_audio_orig, ref_text, gen_text, exp_name, remove_silence, cross_fa
|
|
397 |
# Use the new chunk_text function to split gen_text
|
398 |
max_chars = int(0.2 * (len(ref_text.encode('utf-8')) / (audio.shape[-1] / sr) * (25 - audio.shape[-1] / sr)))
|
399 |
print(f"max chars: {max_chars} ")
|
400 |
-
gen_text_batches = chunk_text(gen_text, max_chars=
|
401 |
print('ref_text', ref_text)
|
402 |
for i, batch_text in enumerate(gen_text_batches):
|
403 |
print(f'gen_text {i}', batch_text)
|
|
|
397 |
# Use the new chunk_text function to split gen_text
|
398 |
max_chars = int(0.2 * (len(ref_text.encode('utf-8')) / (audio.shape[-1] / sr) * (25 - audio.shape[-1] / sr)))
|
399 |
print(f"max chars: {max_chars} ")
|
400 |
+
gen_text_batches = chunk_text(gen_text, max_chars=100)
|
401 |
print('ref_text', ref_text)
|
402 |
for i, batch_text in enumerate(gen_text_batches):
|
403 |
print(f'gen_text {i}', batch_text)
|