Hunzla commited on
Commit
465da4c
1 Parent(s): 7719f3d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -29,8 +29,9 @@ def find_most_similar_command(statement, command_list):
29
  i+=1
30
 
31
  return best_match,reply
32
- def transcribe_the_command(audio):
33
  import soundfile as sf
 
34
  sample_rate, audio_data = audio
35
  file_name = "recorded_audio.wav"
36
  sf.write(file_name, audio_data, sample_rate)
@@ -50,7 +51,7 @@ import gradio as gr
50
 
51
  iface = gr.Interface(
52
  fn=transcribe_the_command,
53
- inputs=gr.inputs.Audio(label="Recorded Audio",source="microphone"),
54
  outputs="text",
55
  title="Whisper Small Urdu Command",
56
  description="Realtime demo for Urdu speech recognition using a fine-tuned Whisper small model and outputting the estimated command on the basis of speech transcript.",
 
29
  i+=1
30
 
31
  return best_match,reply
32
+ def transcribe_the_command(audio,abc):
33
  import soundfile as sf
34
+ print(abc)
35
  sample_rate, audio_data = audio
36
  file_name = "recorded_audio.wav"
37
  sf.write(file_name, audio_data, sample_rate)
 
51
 
52
  iface = gr.Interface(
53
  fn=transcribe_the_command,
54
+ inputs=[gr.inputs.Audio(label="Recorded Audio",source="microphone"),"abc"],
55
  outputs="text",
56
  title="Whisper Small Urdu Command",
57
  description="Realtime demo for Urdu speech recognition using a fine-tuned Whisper small model and outputting the estimated command on the basis of speech transcript.",