Bijoy2001's picture
Update app.py
b6e43f6
raw
history blame contribute delete
460 Bytes
import gradio as gr
import time
def transcribe (audio, state=" "):
time.sleep(3)
""" speech to text function using the pipeline that we defined"""
text= p(audio) ["text"]
state += text + " "
return state, state
gr.Interface(
fn=transcribe,
inputs=[
gr.inputs.Audio(source="microphone", type="filepath"),
"state"
],
outputs=[
"textbox",
"state"
],
live=True).launch()