Spaces:
Running
Running
Increase character limit from 100 to 600
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ gr.Audio.postprocess = audio_postprocess
|
|
31 |
def create_vc_fn(model, sid):
|
32 |
def vc_fn(input_audio, vc_transform, auto_f0, tts_text, tts_voice, tts_mode):
|
33 |
if tts_mode:
|
34 |
-
if len(tts_text) >
|
35 |
return "Text is too long", None
|
36 |
if tts_text is None or tts_voice is None:
|
37 |
return "You need to enter text and select a voice", None
|
@@ -114,7 +114,7 @@ if __name__ == '__main__':
|
|
114 |
vc_transform = gr.Number(label="vc_transform", value=0)
|
115 |
auto_f0 = gr.Checkbox(label="auto_f0", value=False)
|
116 |
tts_mode = gr.Checkbox(label="tts (use edge-tts as input)", value=False)
|
117 |
-
tts_text = gr.Textbox(visible=False, label="TTS text (
|
118 |
tts_voice = gr.Dropdown(choices=voices, visible=False)
|
119 |
vc_submit = gr.Button("Generate", variant="primary")
|
120 |
with gr.Column():
|
|
|
31 |
def create_vc_fn(model, sid):
|
32 |
def vc_fn(input_audio, vc_transform, auto_f0, tts_text, tts_voice, tts_mode):
|
33 |
if tts_mode:
|
34 |
+
if len(tts_text) > 600 and limitation:
|
35 |
return "Text is too long", None
|
36 |
if tts_text is None or tts_voice is None:
|
37 |
return "You need to enter text and select a voice", None
|
|
|
114 |
vc_transform = gr.Number(label="vc_transform", value=0)
|
115 |
auto_f0 = gr.Checkbox(label="auto_f0", value=False)
|
116 |
tts_mode = gr.Checkbox(label="tts (use edge-tts as input)", value=False)
|
117 |
+
tts_text = gr.Textbox(visible=False, label="TTS text (600 words limitation)" if limitation else "TTS text")
|
118 |
tts_voice = gr.Dropdown(choices=voices, visible=False)
|
119 |
vc_submit = gr.Button("Generate", variant="primary")
|
120 |
with gr.Column():
|