Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -156,8 +156,8 @@ def chunk_text(text, max_chars):
|
|
156 |
"""
|
157 |
if max_chars > 105:
|
158 |
max_chars = 105
|
159 |
-
|
160 |
-
|
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 = {",":
|
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
|