Spaces:
Runtime error
Runtime error
Commit
·
6109e78
1
Parent(s):
2ee178d
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,17 +1,21 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
| 2 |
|
| 3 |
def dem(audio):
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
| 9 |
|
| 10 |
|
| 11 |
demo = gr.Interface(
|
| 12 |
dem,
|
| 13 |
inputs="microphone", # returns tuple
|
| 14 |
# inputs=gr.Audio(sources=["microphone"]), # work return tuple
|
| 15 |
-
outputs="audio",
|
| 16 |
)
|
| 17 |
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import subprocess
|
| 3 |
+
|
| 4 |
|
| 5 |
def dem(audio):
|
| 6 |
+
print(type(audio))
|
| 7 |
+
print(audio)
|
| 8 |
+
sr,y = audio
|
| 9 |
+
print(f"Speech rate:{sr} and audio : {y}")
|
| 10 |
+
command = r"""'./whisper_blas_bin_v1_3_0/main.exe' -h"""
|
| 11 |
+
result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|
| 12 |
+
return audio,result.stdout,result.strderr
|
| 13 |
|
| 14 |
|
| 15 |
demo = gr.Interface(
|
| 16 |
dem,
|
| 17 |
inputs="microphone", # returns tuple
|
| 18 |
# inputs=gr.Audio(sources=["microphone"]), # work return tuple
|
| 19 |
+
outputs=["audio","text","text"]
|
| 20 |
)
|
| 21 |
demo.launch()
|