Gregniuki commited on
Commit
074cc6d
·
verified ·
1 Parent(s): f9114be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -230,10 +230,10 @@ def infer_batch(ref_audio, ref_text, gen_text_batches, exp_name, remove_silence,
230
  generated_waves = []
231
  spectrograms = []
232
  # Remove the last 5 chats, ensuring you don't attempt to slice beyond the list length
233
- ref_text = ref_text[:-2] if len(ref_text) >= 2 else []
234
  # Ensure ref_text ends with a space if the last character is single-byte
235
  if len(ref_text[-1].encode("utf-8")) == 1:
236
- ref_text = ref_text + " "
237
 
238
  # Define weights for characters
239
  punctuation_weights = {",": 3, ".": 3, " ": 3} # Add more punctuation as needed
 
230
  generated_waves = []
231
  spectrograms = []
232
  # Remove the last 5 chats, ensuring you don't attempt to slice beyond the list length
233
+ ref_text = ref_text[:-9] if len(ref_text) >= 9 else []
234
  # Ensure ref_text ends with a space if the last character is single-byte
235
  if len(ref_text[-1].encode("utf-8")) == 1:
236
+ ref_text = ref_text + ". "
237
 
238
  # Define weights for characters
239
  punctuation_weights = {",": 3, ".": 3, " ": 3} # Add more punctuation as needed