Gregniuki commited on
Commit
9ddc2d2
·
verified ·
1 Parent(s): 0c39302

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -156,8 +156,8 @@ def chunk_text(text, max_chars):
156
  """
157
  if max_chars > 105:
158
  max_chars = 105
159
- # if max_chars < 50:
160
- # max_chars = max_chars * 2
161
  split_after_space_chars = max_chars + 30
162
  chunks = []
163
  current_chunk = ""
@@ -235,7 +235,7 @@ def infer_batch(ref_audio, ref_text, gen_text_batches, exp_name, remove_silence,
235
  ref_text = ref_text + " "
236
 
237
  # Define weights for characters
238
- punctuation_weights = {",": 0, ".": 0, " ": 0} # Add more punctuation as needed
239
 
240
  for i, gen_text in enumerate(progress.tqdm(gen_text_batches)):
241
  # Prepare the text
 
156
  """
157
  if max_chars > 105:
158
  max_chars = 105
159
+ if max_chars < 50:
160
+ max_chars = max_chars * 2
161
  split_after_space_chars = max_chars + 30
162
  chunks = []
163
  current_chunk = ""
 
235
  ref_text = ref_text + " "
236
 
237
  # Define weights for characters
238
+ punctuation_weights = {",": 2, ".": 2, " ": 2} # Add more punctuation as needed
239
 
240
  for i, gen_text in enumerate(progress.tqdm(gen_text_batches)):
241
  # Prepare the text