ASR_NNemo_Model / app.py
arssite's picture
Upload folder using huggingface_hub
2f82e01 verified
raw
history blame
557 Bytes
import nemo.collections.asr as nemo_asr
import gradio as gr
asr_model = nemo_asr.models.ASRModel.from_pretrained(model_name="QuartzNet15x5Base-En")
def transcribe(audio):
transcription = asr_model.transcribe([audio])
return transcription[0]
iface = gr.Interface(
fn=transcribe,
inputs=gr.inputs.Audio(source="microphone", type="filepath"),
outputs="text",
title="ASR with NeMo",
description="Speak into your microphone and get a transcription using NVIDIA NeMo QuartzNet ASR."
)
iface.launch()