Gregniuki commited on
Commit
efd7a46
·
verified ·
1 Parent(s): d111950

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -464,7 +464,7 @@ def infer(ref_audio_orig, ref_text, gen_text, exp_name, remove_silence, cross_fa
464
  audio, sr = torchaudio.load(ref_audio)
465
 
466
  # Use the new chunk_text function to split gen_text
467
- max_chars = int(speed*(len(ref_text.encode('utf-8')) / (audio.shape[-1] / sr) * (25 - audio.shape[-1] / sr )))
468
  print(f"text: {max_chars} ")
469
  gen_text_batches = chunk_text(gen_text, max_chars=max_chars)
470
  print('ref_text', ref_text)
 
464
  audio, sr = torchaudio.load(ref_audio)
465
 
466
  # Use the new chunk_text function to split gen_text
467
+ max_chars = int((len(ref_text.encode('utf-8')) / (audio.shape[-1] / sr) * (25 - audio.shape[-1] / sr )))
468
  print(f"text: {max_chars} ")
469
  gen_text_batches = chunk_text(gen_text, max_chars=max_chars)
470
  print('ref_text', ref_text)