eternalBlissard commited on
Commit
7aec26d
·
verified ·
1 Parent(s): ba8a16b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -1,7 +1,11 @@
1
  import gradio as gr
2
  import subprocess
3
  def outputProducer(stringG):
4
- return str(1)
 
 
 
 
5
  demo = gr.Interface(fn=outputProducer,
6
  inputs = [gr.Textbox()],
7
  outputs= [gr.Textbox()],
 
1
  import gradio as gr
2
  import subprocess
3
  def outputProducer(stringG):
4
+ command1 = f'yt-dlp -o my_audio.wav {stringG} --extract-audio --audio-format wav'
5
+ subprocess.call(command1, shell=True)
6
+ command2 = "whisper my_audio.wav"
7
+ retVal = subprocess.check_output(command2)
8
+ return retVal
9
  demo = gr.Interface(fn=outputProducer,
10
  inputs = [gr.Textbox()],
11
  outputs= [gr.Textbox()],