import gradio as gr from transformers import pipeline # Define the pipeline for speech recognition with the NeMo Canary model pipe = pipeline( task="automatic-speech-recognition", model="nvidia/canary-1b" ) # Create a Gradio interface from the pipeline interface = gr.Interface.from_pipeline(pipe, inputs="microphone", outputs="text") # Launch the interface interface.launch()