axxam commited on
Commit
9e7512c
·
verified ·
1 Parent(s): 1191f82

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -1,4 +1,16 @@
1
  import gradio as gr
2
  import nemo.collections.asr as nemo_asr
3
 
 
4
  asr_model = nemo_asr.models.EncDecRNNTBPEModel.from_pretrained("nvidia/stt_kab_conformer_transducer_large")
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
  import nemo.collections.asr as nemo_asr
3
 
4
+ # Load the pre-trained Kabyle ASR model
5
  asr_model = nemo_asr.models.EncDecRNNTBPEModel.from_pretrained("nvidia/stt_kab_conformer_transducer_large")
6
+
7
+ # Function to transcribe the audio input
8
+ def transcribe(audio):
9
+ # Transcribe the uploaded audio file and return the result
10
+ return asr_model.transcribe([audio])
11
+
12
+ # Create the Gradio interface with audio input and text output
13
+ iface = gr.Interface(fn=transcribe, inputs="audio", outputs="text")
14
+
15
+ # Launch the Gradio interface
16
+ iface.launch()