voice-to-textTH / app.py
sonobit's picture
Update app.py
b270fb5
raw
history blame
316 Bytes
import gradio as gr
from transformers import pipeline
p = pipeline('wannaphong/wav2vec2-large-xlsr-53-th-cv8-deepcut')
def transcribe(audio):
text = p(audio)["text"]
return text
gr.Interface(
fn=transcribe,
inputs=gr.Audio(source="microphone", type="filepath"),
outputs="text").launch()