riteshkr commited on
Commit
3f04ac3
1 Parent(s): aebd35d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -73,26 +73,26 @@ def speech_to_speech_translation(audio):
73
  # Define the Gradio interfaces for microphone input and file upload
74
  mic_translate = gr.Interface(
75
  fn=speech_to_speech_translation,
76
- inputs=gr.Audio(source="microphone", type="filepath"),
77
  outputs=gr.Audio(label="Generated Speech", type="numpy"),
78
  )
79
 
80
  file_translate = gr.Interface(
81
  fn=speech_to_speech_translation,
82
- inputs=gr.Audio(source="upload", type="filepath"),
83
  outputs=gr.Audio(label="Generated Speech", type="numpy"),
84
  )
85
 
86
  # Define the Gradio interfaces for transcription
87
  mic_transcribe = gr.Interface(
88
  fn=transcribe_speech,
89
- inputs=gr.Audio(source="microphone", type="filepath"),
90
  outputs=gr.Textbox(),
91
  )
92
 
93
  file_transcribe = gr.Interface(
94
  fn=transcribe_speech,
95
- inputs=gr.Audio(source="upload", type="filepath"),
96
  outputs=gr.Textbox(),
97
  )
98
 
 
73
  # Define the Gradio interfaces for microphone input and file upload
74
  mic_translate = gr.Interface(
75
  fn=speech_to_speech_translation,
76
+ inputs=gr.Audio(sources="microphone", type="filepath"),
77
  outputs=gr.Audio(label="Generated Speech", type="numpy"),
78
  )
79
 
80
  file_translate = gr.Interface(
81
  fn=speech_to_speech_translation,
82
+ inputs=gr.Audio(sources="upload", type="filepath"),
83
  outputs=gr.Audio(label="Generated Speech", type="numpy"),
84
  )
85
 
86
  # Define the Gradio interfaces for transcription
87
  mic_transcribe = gr.Interface(
88
  fn=transcribe_speech,
89
+ inputs=gr.Audio(sources="microphone", type="filepath"),
90
  outputs=gr.Textbox(),
91
  )
92
 
93
  file_transcribe = gr.Interface(
94
  fn=transcribe_speech,
95
+ inputs=gr.Audio(sources="upload", type="filepath"),
96
  outputs=gr.Textbox(),
97
  )
98