megaaziib commited on
Commit
9c824f7
·
1 Parent(s): 7658179

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -15,18 +15,18 @@ async def text_to_speech_edge(text, language_code):
15
 
16
  await communicate.save(tmp_path)
17
 
18
- return "语音合成完成:{}".format(text), tmp_path
19
 
20
 
21
 
22
- input_text = gr.inputs.Textbox(lines=5, label="输入文本")
23
- output_text = gr.outputs.Textbox(label="输出文本")
24
- output_audio = gr.outputs.Audio(type="filepath", label="导出文件")
25
  default_language = list(language_dict.keys())[0]
26
- language = gr.inputs.Dropdown(choices=list(language_dict.keys()), default=default_language, label="语言")
27
 
28
 
29
- interface = gr.Interface(fn=text_to_speech_edge, inputs=[input_text, language], outputs=[output_text, output_audio], title="Edge TTS 文字转语音")
30
 
31
 
32
  if __name__ == "__main__":
 
15
 
16
  await communicate.save(tmp_path)
17
 
18
+ return "Speech synthesis completed:{}".format(text), tmp_path
19
 
20
 
21
 
22
+ input_text = gr.inputs.Textbox(lines=5, label="Input Text")
23
+ output_text = gr.outputs.Textbox(label="Output Text")
24
+ output_audio = gr.outputs.Audio(type="filepath", label="Export File")
25
  default_language = list(language_dict.keys())[0]
26
+ language = gr.inputs.Dropdown(choices=list(language_dict.keys()), default=default_language, label="Language")
27
 
28
 
29
+ interface = gr.Interface(fn=text_to_speech_edge, inputs=[input_text, language], outputs=[output_text, output_audio], title="Edge TTS Text to Speech")
30
 
31
 
32
  if __name__ == "__main__":