Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,11 @@
|
|
1 |
import gradio as gr
|
2 |
import subprocess
|
3 |
def outputProducer(stringG):
|
4 |
-
|
|
|
|
|
|
|
|
|
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()],
|