import gradio as gr from transformers import pipeline p = pipeline('speech-to-text', model='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()