Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ def get_text(text, hps):
|
|
23 |
|
24 |
def create_tts_fn(model, hps, speaker_ids):
|
25 |
def tts_fn(text, speaker, speed):
|
26 |
-
if limitation and len(text) >
|
27 |
return "Error: Text is too long", None
|
28 |
speaker_id = speaker_ids[speaker]
|
29 |
stn_tst = get_text(text, hps)
|
@@ -112,7 +112,7 @@ if __name__ == '__main__':
|
|
112 |
with gr.Column():
|
113 |
gr.Markdown(f"## {model_name}\n\n"
|
114 |
f"![cover](file/{cover_path})")
|
115 |
-
tts_input1 = gr.TextArea(label="Text (
|
116 |
tts_input2 = gr.Dropdown(label="Speaker", choices=speakers,
|
117 |
type="index", value=speakers[0])
|
118 |
tts_input3 = gr.Slider(label="Speed", value=1, minimum=0.5, maximum=2, step=0.1)
|
|
|
23 |
|
24 |
def create_tts_fn(model, hps, speaker_ids):
|
25 |
def tts_fn(text, speaker, speed):
|
26 |
+
if limitation and len(text) > 60:
|
27 |
return "Error: Text is too long", None
|
28 |
speaker_id = speaker_ids[speaker]
|
29 |
stn_tst = get_text(text, hps)
|
|
|
112 |
with gr.Column():
|
113 |
gr.Markdown(f"## {model_name}\n\n"
|
114 |
f"![cover](file/{cover_path})")
|
115 |
+
tts_input1 = gr.TextArea(label="Text (60 words limitation)", value="γγγ«γ‘γ―γ")
|
116 |
tts_input2 = gr.Dropdown(label="Speaker", choices=speakers,
|
117 |
type="index", value=speakers[0])
|
118 |
tts_input3 = gr.Slider(label="Speed", value=1, minimum=0.5, maximum=2, step=0.1)
|