import gradio as gr from nemo.collections.asr.models import ASRModel # Load the NeMo ASR model model = ASRModel.from_pretrained("nvidia/canary-1b") model.eval() def transcribe(audio): if audio is None: raise gr.InterfaceError("Please provide some input audio") # Perform speech recognition transcription = model.transcribe([audio]) return transcription[0] audio_input = gr.inputs.Audio() iface = gr.Interface(transcribe, audio_input, "text", title="ASR with NeMo Canary Model") iface.launch()