Demo / app.py
Add-Vishnu's picture
Update app.py
6109e78
raw
history blame
592 Bytes
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()