SWivid commited on
Commit
ddb68ee
·
1 Parent(s): 49706f2
Files changed (1) hide show
  1. gradio_app.py +2 -2
gradio_app.py CHANGED
@@ -318,7 +318,7 @@ def infer(ref_audio_orig, ref_text, gen_text, exp_name, remove_silence, custom_s
318
  gr.Info("Using custom reference text...")
319
 
320
  # Split the input text into batches
321
- if len(ref_text.encode('utf-8')) == len(ref_text):
322
  max_chars = 400-len(ref_text.encode('utf-8'))
323
  else:
324
  max_chars = 300-len(ref_text.encode('utf-8'))
@@ -386,7 +386,7 @@ with gr.Blocks() as app:
386
  This is a local web UI for F5 TTS with advanced batch processing support, based on the unofficial [online demo](https://huggingface.co/spaces/mrfakename/E2-F5-TTS). This app supports the following TTS models:
387
 
388
  * [F5-TTS](https://arxiv.org/abs/2410.06885) (A Fairytaler that Fakes Fluent and Faithful Speech with Flow Matching)
389
- * [E2-TTS](https://arxiv.org/abs/2406.18009) (Embarrassingly Easy Fully Non-Autoregressive Zero-Shot TTS)
390
 
391
  The checkpoints support English and Chinese.
392
 
 
318
  gr.Info("Using custom reference text...")
319
 
320
  # Split the input text into batches
321
+ if len(ref_text.encode('utf-8')) == len(ref_text) and len(gen_text.encode('utf-8')) == len(gen_text):
322
  max_chars = 400-len(ref_text.encode('utf-8'))
323
  else:
324
  max_chars = 300-len(ref_text.encode('utf-8'))
 
386
  This is a local web UI for F5 TTS with advanced batch processing support, based on the unofficial [online demo](https://huggingface.co/spaces/mrfakename/E2-F5-TTS). This app supports the following TTS models:
387
 
388
  * [F5-TTS](https://arxiv.org/abs/2410.06885) (A Fairytaler that Fakes Fluent and Faithful Speech with Flow Matching)
389
+ * [E2 TTS](https://arxiv.org/abs/2406.18009) (Embarrassingly Easy Fully Non-Autoregressive Zero-Shot TTS)
390
 
391
  The checkpoints support English and Chinese.
392