File size: 462 Bytes
35f8a26 13268f4 35f8a26 e7cab25 0c0df10 e7cab25 0c0df10 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import gradio as gr
from transformers import pipeline
# Define the full path to the NeMo Canary model
model_name = "nvidia/canary-1b"
# Define the pipeline for speech recognition with the NeMo Canary model
pipe = pipeline(
task="automatic-speech-recognition",
model=model_name
)
# Create a Gradio interface from the pipeline
interface = gr.Interface.from_pipeline(pipe, inputs="microphone", outputs="text")
# Launch the interface
interface.launch()
|