Baghdad99 commited on
Commit
207480c
1 Parent(s): a177a50

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -1,6 +1,5 @@
1
  import gradio as gr
2
  import requests
3
- from IPython.display import Audio
4
 
5
  # Define the Hugging Face Inference API URLs and headers
6
  ASR_API_URL = "https://api-inference.huggingface.co/models/Baghdad99/saad-speech-recognition-hausa-audio-to-text"
@@ -40,7 +39,7 @@ def translate_speech(audio):
40
  # Define the Gradio interface
41
  iface = gr.Interface(
42
  fn=translate_speech,
43
- inputs=gr.inputs.Audio(source="microphone", type="file"),
44
  outputs=gr.outputs.Audio(type="auto"),
45
  title="Hausa to English Translation",
46
  description="Realtime demo for Hausa to English translation using speech recognition and text-to-speech synthesis."
 
1
  import gradio as gr
2
  import requests
 
3
 
4
  # Define the Hugging Face Inference API URLs and headers
5
  ASR_API_URL = "https://api-inference.huggingface.co/models/Baghdad99/saad-speech-recognition-hausa-audio-to-text"
 
39
  # Define the Gradio interface
40
  iface = gr.Interface(
41
  fn=translate_speech,
42
+ inputs=gr.Audio(source="microphone", type="numpy"),
43
  outputs=gr.outputs.Audio(type="auto"),
44
  title="Hausa to English Translation",
45
  description="Realtime demo for Hausa to English translation using speech recognition and text-to-speech synthesis."