iqbalc commited on
Commit
3df0647
·
1 Parent(s): a623235

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  import whisper
2
  model = whisper.load_model("large")
3
  import gradio as gr
@@ -20,3 +23,14 @@ def transcribe(audio):
20
  options = whisper.DecodingOptions()
21
  result = whisper.decode(model, mel, options)
22
  return result.text
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ os.system("pip install git+https://github.com/openai/whisper.git")
3
+ import gradio as gr
4
  import whisper
5
  model = whisper.load_model("large")
6
  import gradio as gr
 
23
  options = whisper.DecodingOptions()
24
  result = whisper.decode(model, mel, options)
25
  return result.text
26
+
27
+ gr.Interface(
28
+ title = 'Speech to text Demo',
29
+ fn=transcribe,
30
+ inputs=[
31
+ gr.inputs.Audio(source="microphone", type="filepath")
32
+ ],
33
+ outputs=[
34
+ "textbox"
35
+ ],
36
+ live=True).launch()