Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -7,6 +7,7 @@ import gradio as gr
7
  from gtts import gTTS
8
  from io import BytesIO
9
  from IPython.display import Audio, display
 
10
 
11
  # Set OpenAI API key
12
  openai.api_key = os.environ.get("OPENAI_API_KEY")
@@ -60,7 +61,7 @@ def clear_chat():
60
  interface = gr.Interface(
61
  chat,
62
  inputs=["text",
63
- gr.Audio(source="microphone", type="numpy"),
64
  "state"
65
  ],
66
  outputs=["text",
 
7
  from gtts import gTTS
8
  from io import BytesIO
9
  from IPython.display import Audio, display
10
+ from transformers import pipeline
11
 
12
  # Set OpenAI API key
13
  openai.api_key = os.environ.get("OPENAI_API_KEY")
 
61
  interface = gr.Interface(
62
  chat,
63
  inputs=["text",
64
+ gr.inputs.Audio(source="microphone", type="filepath"),
65
  "state"
66
  ],
67
  outputs=["text",