Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -22,10 +22,12 @@ def voice_chat(user_voice):
|
|
22 |
text_reply = gr.Textbox(label="ChatGPT Text")
|
23 |
voice_reply = gr.Audio(type="audio/wav")
|
24 |
|
25 |
-
gr.Interface(
|
26 |
-
title="AI Voice Assistant with ChatGPT AI",
|
27 |
fn=voice_chat,
|
28 |
-
inputs=[
|
29 |
-
outputs=[text_reply, voice_reply],
|
30 |
live=True,
|
31 |
-
|
|
|
|
|
|
|
|
22 |
text_reply = gr.Textbox(label="ChatGPT Text")
|
23 |
voice_reply = gr.Audio(type="audio/wav")
|
24 |
|
25 |
+
iface = gr.Interface(
|
|
|
26 |
fn=voice_chat,
|
27 |
+
inputs=[gr.inputs.Audio(source="microphone", type="filepath")],
|
28 |
+
outputs=[text_reply = gr.Textbox(label="ChatGPT Text") , voice_reply = gr.Audio(label = "ChatGPT Voice")],
|
29 |
live=True,
|
30 |
+
title="AI Voice Assistant with ChatGPT AI",
|
31 |
+
)
|
32 |
+
|
33 |
+
iface.launch(debug=True)
|