Baghdad99 commited on
Commit
65b0d6a
·
1 Parent(s): 49f6e13

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -65,3 +65,14 @@ def translate_speech(audio_file_path):
65
  synthesised_speech = (synthesised_speech_data * 32767).astype(np.int16)
66
 
67
  return 16000, synthesised_speech
 
 
 
 
 
 
 
 
 
 
 
 
65
  synthesised_speech = (synthesised_speech_data * 32767).astype(np.int16)
66
 
67
  return 16000, synthesised_speech
68
+
69
+ # Define the Gradio interface
70
+ iface = gr.Interface(
71
+ fn=translate_speech,
72
+ inputs=gr.inputs.Audio(type="filepath"), # Change this line
73
+ outputs=gr.outputs.Audio(type="numpy"),
74
+ title="English to Hausa Translation",
75
+ description="Realtime demo for English to Hausa translation using speech recognition and text-to-speech synthesis."
76
+ )
77
+
78
+ iface.launch()