Spaces:
Configuration error
Configuration error
address #74
Browse files- gradio_app.py +1 -1
- inference-cli.py +1 -1
gradio_app.py
CHANGED
@@ -321,7 +321,7 @@ def infer(ref_audio_orig, ref_text, gen_text, exp_name, remove_silence, custom_s
|
|
321 |
|
322 |
# Split the input text into batches
|
323 |
audio, sr = torchaudio.load(ref_audio)
|
324 |
-
max_chars = int(len(ref_text.encode('utf-8')) / (audio.shape[-1] /
|
325 |
gen_text_batches = split_text_into_batches(gen_text, max_chars=max_chars)
|
326 |
print('ref_text', ref_text)
|
327 |
for i, gen_text in enumerate(gen_text_batches):
|
|
|
321 |
|
322 |
# Split the input text into batches
|
323 |
audio, sr = torchaudio.load(ref_audio)
|
324 |
+
max_chars = int(len(ref_text.encode('utf-8')) / (audio.shape[-1] / sr) * (30 - audio.shape[-1] / sr))
|
325 |
gen_text_batches = split_text_into_batches(gen_text, max_chars=max_chars)
|
326 |
print('ref_text', ref_text)
|
327 |
for i, gen_text in enumerate(gen_text_batches):
|
inference-cli.py
CHANGED
@@ -366,7 +366,7 @@ def infer(ref_audio_orig, ref_text, gen_text, exp_name, remove_silence, custom_s
|
|
366 |
|
367 |
# Split the input text into batches
|
368 |
audio, sr = torchaudio.load(ref_audio)
|
369 |
-
max_chars = int(len(ref_text.encode('utf-8')) / (audio.shape[-1] /
|
370 |
gen_text_batches = split_text_into_batches(gen_text, max_chars=max_chars)
|
371 |
print('ref_text', ref_text)
|
372 |
for i, gen_text in enumerate(gen_text_batches):
|
|
|
366 |
|
367 |
# Split the input text into batches
|
368 |
audio, sr = torchaudio.load(ref_audio)
|
369 |
+
max_chars = int(len(ref_text.encode('utf-8')) / (audio.shape[-1] / sr) * (30 - audio.shape[-1] / sr))
|
370 |
gen_text_batches = split_text_into_batches(gen_text, max_chars=max_chars)
|
371 |
print('ref_text', ref_text)
|
372 |
for i, gen_text in enumerate(gen_text_batches):
|