stt / app.py
axxam's picture
Update app.py
9e7512c verified
raw
history blame
556 Bytes
import gradio as gr
import nemo.collections.asr as nemo_asr
# Load the pre-trained Kabyle ASR model
asr_model = nemo_asr.models.EncDecRNNTBPEModel.from_pretrained("nvidia/stt_kab_conformer_transducer_large")
# Function to transcribe the audio input
def transcribe(audio):
# Transcribe the uploaded audio file and return the result
return asr_model.transcribe([audio])
# Create the Gradio interface with audio input and text output
iface = gr.Interface(fn=transcribe, inputs="audio", outputs="text")
# Launch the Gradio interface
iface.launch()