DurreSudoku commited on
Commit
f993f54
·
verified ·
1 Parent(s): 617e384

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -40,7 +40,8 @@ def open_image():
40
 
41
 
42
 
43
- def transcribe(audio):
 
44
  # Transcribe the audio and split the string into a list of words
45
  try:
46
  transcribed_audio = pipe(audio)["text"]
@@ -85,7 +86,7 @@ with gr.Blocks(title="Interactive Language Learning") as demo:
85
  """)
86
  with gr.Row():
87
  with gr.Column():
88
- audio = gr.Audio(sources="microphone", type="filepath", label="Record your answer here")
89
  with gr.Column():
90
  image = gr.Image(value=open_image(),type="pil", interactive=False)
91
  with gr.Row():
 
40
 
41
 
42
 
43
+ def transcribe(audio_input):
44
+ sr, audio = audio_input
45
  # Transcribe the audio and split the string into a list of words
46
  try:
47
  transcribed_audio = pipe(audio)["text"]
 
86
  """)
87
  with gr.Row():
88
  with gr.Column():
89
+ audio = gr.Audio(sources="microphone", type="numpy", label="Record your answer here")
90
  with gr.Column():
91
  image = gr.Image(value=open_image(),type="pil", interactive=False)
92
  with gr.Row():