Spaces:
Runtime error
Runtime error
| 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() |