Kevin676 commited on
Commit
e080245
·
1 Parent(s): 2667e5b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -223,6 +223,10 @@ def greet(Text2, audio, Voicetoclone,VoiceMicrophone):
223
  torchaudio.save("enhanced.wav", enhanced.cpu(), 16000)
224
  return [result.text, chat_response, "enhanced.wav"]
225
 
 
 
 
 
226
  demo = gr.Interface(
227
  fn=greet,
228
  inputs=[
@@ -231,8 +235,9 @@ demo = gr.Interface(
231
  gr.Audio(source="upload", type="filepath", label='请上传您喜欢的声音(wav文件)').
232
  gr.Audio(source="microphone", type="filepath", label = "请用麦克风上传您喜欢的声音,与wav文件二选一即可"),
233
  ],
234
- # outputs=[gr.Textbox(label="Speech to Text"), gr.Textbox(label="ChatGPT Output"), "audio"],
235
- outputs="audio",
 
236
  title="🥳💬💕 - TalktoAI,随时随地,谈天说地!"
237
  #theme="huggingface",
238
  #description = "🤖 - 让有人文关怀的AI造福每一个人!AI向善,文明璀璨!TalktoAI - Enable the future!",
 
223
  torchaudio.save("enhanced.wav", enhanced.cpu(), 16000)
224
  return [result.text, chat_response, "enhanced.wav"]
225
 
226
+ output_1 = gr.Textbox(label="Speech to Text")
227
+ output_2 = gr.Textbox(label="ChatGPT Output")
228
+ output_3 = gr.Audio(label="Audio with Custom Voice")
229
+
230
  demo = gr.Interface(
231
  fn=greet,
232
  inputs=[
 
235
  gr.Audio(source="upload", type="filepath", label='请上传您喜欢的声音(wav文件)').
236
  gr.Audio(source="microphone", type="filepath", label = "请用麦克风上传您喜欢的声音,与wav文件二选一即可"),
237
  ],
238
+ outputs=[
239
+ output_1, output_2, output_3
240
+ ],
241
  title="🥳💬💕 - TalktoAI,随时随地,谈天说地!"
242
  #theme="huggingface",
243
  #description = "🤖 - 让有人文关怀的AI造福每一个人!AI向善,文明璀璨!TalktoAI - Enable the future!",