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