Update app.py
Browse files
app.py
CHANGED
@@ -223,10 +223,6 @@ def greet(Text2, audio, Voicetoclone,VoiceMicrophone):
|
|
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 |
gr.Interface(
|
231 |
title = '🥳💬💕 - TalktoAI,随时随地,谈天说地!',
|
232 |
theme="huggingface",
|
@@ -234,11 +230,11 @@ gr.Interface(
|
|
234 |
fn=greet,
|
235 |
inputs=[
|
236 |
gr.Textbox(lines=1, label = "请填写您的OpenAI-API-key"),
|
237 |
-
gr.
|
238 |
-
gr.
|
239 |
gr.Audio(source="microphone", type="filepath", label = "请用麦克风上传您喜欢的声音,与wav文件二选一即可"),
|
240 |
],
|
241 |
outputs=[
|
242 |
-
|
243 |
],
|
244 |
).launch(show_error = True)
|
|
|
223 |
torchaudio.save("enhanced.wav", enhanced.cpu(), 16000)
|
224 |
return [result.text, chat_response, "enhanced.wav"]
|
225 |
|
|
|
|
|
|
|
|
|
226 |
gr.Interface(
|
227 |
title = '🥳💬💕 - TalktoAI,随时随地,谈天说地!',
|
228 |
theme="huggingface",
|
|
|
230 |
fn=greet,
|
231 |
inputs=[
|
232 |
gr.Textbox(lines=1, label = "请填写您的OpenAI-API-key"),
|
233 |
+
gr.Audio(source="microphone", label='在这里进行对话', type="filepath"),
|
234 |
+
gr.Audio(source="upload", type="filepath", label='请上传您喜欢的声音(wav文件)').
|
235 |
gr.Audio(source="microphone", type="filepath", label = "请用麦克风上传您喜欢的声音,与wav文件二选一即可"),
|
236 |
],
|
237 |
outputs=[
|
238 |
+
gr.Textbox(label="Speech to Text"), gr.Textbox(label="ChatGPT Output"), gr.Audio(label="Audio with Custom Voice"),
|
239 |
],
|
240 |
).launch(show_error = True)
|