Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
from transformers import pipeline
|
2 |
-
|
3 |
|
4 |
# Create a pipeline for text-to-speech
|
5 |
tts = pipeline("text-to-speech", model="facebook/mms-tts-eng")
|
@@ -19,10 +19,10 @@ def voice_chat(user_voice):
|
|
19 |
audio = tts(chat_reply)["audio"]
|
20 |
return chat_reply, audio
|
21 |
|
22 |
-
text_reply =
|
23 |
-
voice_reply =
|
24 |
|
25 |
-
Interface(
|
26 |
title="AI Voice Assistant with ChatGPT AI",
|
27 |
fn=voice_chat,
|
28 |
inputs=[Interface.Audio(source="microphone", type="filepath")],
|
|
|
1 |
from transformers import pipeline
|
2 |
+
import gradio as gr
|
3 |
|
4 |
# Create a pipeline for text-to-speech
|
5 |
tts = pipeline("text-to-speech", model="facebook/mms-tts-eng")
|
|
|
19 |
audio = tts(chat_reply)["audio"]
|
20 |
return chat_reply, audio
|
21 |
|
22 |
+
text_reply = gr.Textbox(label="ChatGPT Text")
|
23 |
+
voice_reply = gr.Audio('output.wav')
|
24 |
|
25 |
+
gr.Interface(
|
26 |
title="AI Voice Assistant with ChatGPT AI",
|
27 |
fn=voice_chat,
|
28 |
inputs=[Interface.Audio(source="microphone", type="filepath")],
|