mobinln commited on
Commit
2432ca4
·
1 Parent(s): 2f14b50

fix: audio interface

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -8,6 +8,7 @@ forced_decoder_ids = processor.get_decoder_prompt_ids(language="fa", task="trans
8
 
9
 
10
  def transcribe(audio):
 
11
  if audio is None:
12
  return "No audio input provided. Please record or upload an audio file."
13
 
@@ -39,9 +40,9 @@ def transcribe(audio):
39
  # outputs="text"
40
  # )
41
  demo = gr.Interface(
42
- transcribe,
43
- gr.Audio(sources=["microphone"], type="filepath"),
44
- "text"
45
  )
46
 
47
  if __name__ == "__main__":
 
8
 
9
 
10
  def transcribe(audio):
11
+ print(audio)
12
  if audio is None:
13
  return "No audio input provided. Please record or upload an audio file."
14
 
 
40
  # outputs="text"
41
  # )
42
  demo = gr.Interface(
43
+ fn=transcribe,
44
+ inputs=[gr.Audio(sources=["microphone"], type="filepath")],
45
+ outputs="text"
46
  )
47
 
48
  if __name__ == "__main__":