MyAlexa / app.py
camanalo1's picture
Update app.py
e7cab25
raw
history blame
462 Bytes
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()