FarhadMadadzade's picture
added test gradio app
fac06d0
raw
history blame
492 Bytes
from transformers import pipeline
import gradio as gr
import time
pipe = pipeline("automatic-speech-recognition", model="Artanis1551/whisper_romanian3")
def transcribe(audio, state=""):
text = pipe(audio)["text"]
state += text + " "
return state, state
gr.Interface(
title="Romanian Speech Transcription",
fn=transcribe,
inputs=[gr.Audio(source="microphone", type="filepath", streaming=True), "state"],
outputs=["textbox", "state"],
live=True,
).launch()