Spaces:
Runtime error
Runtime error
updated tts limit to 600 characters
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ def create_vc_fn(tgt_sr, net_g, vc, if_f0, file_index, file_big_npy):
|
|
32 |
):
|
33 |
try:
|
34 |
if tts_mode:
|
35 |
-
if len(tts_text) >
|
36 |
return "Text is too long", None
|
37 |
if tts_text is None or tts_voice is None:
|
38 |
return "You need to enter text and select a voice", None
|
@@ -173,7 +173,7 @@ if __name__ == '__main__':
|
|
173 |
interactive=True,
|
174 |
)
|
175 |
tts_mode = gr.Checkbox(label="tts (use edge-tts as input)", value=False)
|
176 |
-
tts_text = gr.Textbox(visible=False,label="TTS text (
|
177 |
tts_voice = gr.Dropdown(label="Edge-tts speaker", choices=voices, visible=False, allow_custom_value=False, value="en-US-AnaNeural-Female")
|
178 |
vc_submit = gr.Button("Generate", variant="primary")
|
179 |
with gr.Column():
|
|
|
32 |
):
|
33 |
try:
|
34 |
if tts_mode:
|
35 |
+
if len(tts_text) > 600 and limitation:
|
36 |
return "Text is too long", None
|
37 |
if tts_text is None or tts_voice is None:
|
38 |
return "You need to enter text and select a voice", None
|
|
|
173 |
interactive=True,
|
174 |
)
|
175 |
tts_mode = gr.Checkbox(label="tts (use edge-tts as input)", value=False)
|
176 |
+
tts_text = gr.Textbox(visible=False,label="TTS text (600 words limitation)" if limitation else "TTS text")
|
177 |
tts_voice = gr.Dropdown(label="Edge-tts speaker", choices=voices, visible=False, allow_custom_value=False, value="en-US-AnaNeural-Female")
|
178 |
vc_submit = gr.Button("Generate", variant="primary")
|
179 |
with gr.Column():
|