File size: 296 Bytes
6cc5a1c
50a66b5
5782555
50a66b5
 
5782555
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14


from transformers import pipeline
p = pipeline("automatic-speech-recognition")

def transcribe(audio):
    text = p(audio)["text"]
    return text
    
import gradio as gr
gr.Interface(
    fn=transcribe, 
    inputs=gr.Audio(source="microphone", type="filepath"), 
    outputs="text").launch()