Spaces:
Running
on
Zero
Running
on
Zero
raoyonghui
commited on
Commit
•
9c395be
1
Parent(s):
773510a
fix issue in length check
Browse files
app.py
CHANGED
@@ -91,12 +91,12 @@ def split_paragraph(text):
|
|
91 |
temp_sent = ""
|
92 |
for char in text:
|
93 |
temp_sent = temp_sent + char
|
94 |
-
if
|
95 |
-
cur_length = cur_length + 0.3
|
96 |
-
elif is_chinese(char):
|
97 |
cur_length = cur_length + 1
|
|
|
|
|
98 |
else:
|
99 |
-
cur_length = cur_length + 0.
|
100 |
if cur_length < fisrt_punc_check_start:
|
101 |
continue
|
102 |
do_split = False
|
@@ -477,7 +477,7 @@ iface = gr.Interface(
|
|
477 |
fn=inference,
|
478 |
inputs=[
|
479 |
gr.Audio(label="Upload Prompt Wav", type="filepath"),
|
480 |
-
gr.Textbox(label="Target Text(1024 characters at most)"
|
481 |
gr.Number(
|
482 |
label="Target Duration (in seconds), if the target duration is less than 0, the system will estimate a duration.", value=-1
|
483 |
), # Removed 'optional=True'
|
|
|
91 |
temp_sent = ""
|
92 |
for char in text:
|
93 |
temp_sent = temp_sent + char
|
94 |
+
if is_chinese(char):
|
|
|
|
|
95 |
cur_length = cur_length + 1
|
96 |
+
elif is_english(char):
|
97 |
+
cur_length = cur_length + 0.3
|
98 |
else:
|
99 |
+
cur_length = cur_length + 0.5
|
100 |
if cur_length < fisrt_punc_check_start:
|
101 |
continue
|
102 |
do_split = False
|
|
|
477 |
fn=inference,
|
478 |
inputs=[
|
479 |
gr.Audio(label="Upload Prompt Wav", type="filepath"),
|
480 |
+
gr.Textbox(label="Target Text(1024 characters at most)"),
|
481 |
gr.Number(
|
482 |
label="Target Duration (in seconds), if the target duration is less than 0, the system will estimate a duration.", value=-1
|
483 |
), # Removed 'optional=True'
|