Spaces:
Running
Running
SayaSS
commited on
Commit
•
0c3c2eb
1
Parent(s):
d595ee0
update api
Browse files
app.py
CHANGED
@@ -178,7 +178,7 @@ if __name__ == '__main__':
|
|
178 |
o1 = gr.Textbox(label="Output Message")
|
179 |
o2 = gr.Audio(label="Output Audio", elem_id=f"tts-audio-en-{name_en.replace(' ','')}")
|
180 |
download = gr.Button("Download Audio")
|
181 |
-
btn.click(tts_fn, inputs=[input_text, lang, ns, nsw, ls, symbol_input], outputs=[o1, o2])
|
182 |
download.click(None, [], [], _js=download_audio_js.format(audio_id=f"en-{name_en.replace(' ', '')}"))
|
183 |
lang.change(change_lang, inputs=[lang], outputs=[ns, nsw, ls, temp_lang])
|
184 |
symbol_input.change(
|
@@ -237,7 +237,7 @@ if __name__ == '__main__':
|
|
237 |
o1 = gr.Textbox(label="输出信息")
|
238 |
o2 = gr.Audio(label="输出音频", elem_id=f"tts-audio-zh-{name_zh}")
|
239 |
download = gr.Button("下载音频")
|
240 |
-
btn.click(tts_fn, inputs=[input_text, lang, ns, nsw, ls, symbol_input], outputs=[o1, o2]
|
241 |
download.click(None, [], [], _js=download_audio_js.format(audio_id=f"zh-{name_zh}"))
|
242 |
lang.change(change_lang, inputs=[lang], outputs=[ns, nsw, ls])
|
243 |
symbol_input.change(
|
|
|
178 |
o1 = gr.Textbox(label="Output Message")
|
179 |
o2 = gr.Audio(label="Output Audio", elem_id=f"tts-audio-en-{name_en.replace(' ','')}")
|
180 |
download = gr.Button("Download Audio")
|
181 |
+
btn.click(tts_fn, inputs=[input_text, lang, ns, nsw, ls, symbol_input], outputs=[o1, o2], api_name=f"tts-{name_en}")
|
182 |
download.click(None, [], [], _js=download_audio_js.format(audio_id=f"en-{name_en.replace(' ', '')}"))
|
183 |
lang.change(change_lang, inputs=[lang], outputs=[ns, nsw, ls, temp_lang])
|
184 |
symbol_input.change(
|
|
|
237 |
o1 = gr.Textbox(label="输出信息")
|
238 |
o2 = gr.Audio(label="输出音频", elem_id=f"tts-audio-zh-{name_zh}")
|
239 |
download = gr.Button("下载音频")
|
240 |
+
btn.click(tts_fn, inputs=[input_text, lang, ns, nsw, ls, symbol_input], outputs=[o1, o2])
|
241 |
download.click(None, [], [], _js=download_audio_js.format(audio_id=f"zh-{name_zh}"))
|
242 |
lang.change(change_lang, inputs=[lang], outputs=[ns, nsw, ls])
|
243 |
symbol_input.change(
|