File size: 756 Bytes
19525d4
 
 
 
 
 
 
 
 
 
 
8330245
19525d4
 
 
 
 
76d4349
c679f82
19525d4
8330245
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import gradio as gr
from transformers import pipeline


model = pipeline(task="automatic-speech-recognition",

def predict_speech_to_text(audio):
    prediction = model(audio)
    text = prediction['text']
    return text

gr.Interface.load("models/facebook/s2t-medium-librispeech-asr")               
gr.Interface(fn=predict_speech_to_text,
             title="πŸ§‘πŸ½β€πŸŽ€ PROLOVE πŸ₯°πŸ˜˜ ",
             inputs=gr.inputs.Audio(
                 source="microphone", type="filepath", label="Input"),
             outputs=gr.outputs.Textbox(label="Output"),
             description="This application was created to help correct pronouncation",
             examples=['Good night_alvi.wav'],
             allow_flagging='never'
             ).launch()