Spaces:
Runtime error
Runtime error
File size: 674 Bytes
9e43625 75cb74f 3ece66a 75cb74f 3ece66a 75cb74f 3ece66a edf267e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
from subprocess import Popen
# from transformers import AutoProcessor, AutoModelForPreTraining
# processor = AutoProcessor.from_pretrained("patrickvonplaten/mms-1b")
# model = AutoModelForPreTraining.from_pretrained("patrickvonplaten/mms-1b")
model = "https://dl.fbaipublicfiles.com/mms/pretraining/base_300m.pt"
def transcribe(audio):
Popen('python mms_infer.py --model model --lang eng --audio audio')
gr.Interface(
title = 'MetaAI (Facebook Research) MMS (Massively Multilingual Speech) ASR',
fn=transcribe,
inputs=[
gr.inputs.Audio(source="microphone", type="filepath")
],
outputs=[
"textbox"
],
live=True).launch() |