Audiototext / app.py
raghuram13's picture
Update app.py
4ff9ed0
raw
history blame contribute delete
461 Bytes
import gradio as gr
from transformers import pipeline
model = pipeline('automatic-speech-recognition', model='facebook/wav2vec2-base-960h')
def audiototext(audio):
text = model(audio)['text']
return text
gr.Interface(
fn=audiototext,
inputs=gr.Audio(source="upload", type="filepath"),
outputs=["textbox"],
examples = ['Hey_Siri.wav', 'Martin.mp3','download.wav','30_Second_Song.mp3'],
title = "AUDIO TO TEXT CONVERSION"
).launch()