asierhv commited on
Commit
128d7a2
1 Parent(s): ac852e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -5
app.py CHANGED
@@ -1,10 +1,17 @@
1
  import gradio as gr
2
- import torch
3
  import nemo.collections.asr as nemo_asr
4
- from omegaconf import OmegaConf, open_dict
5
 
6
- def greet(name):
7
- return "Hello " + name + "!!"
 
 
8
 
9
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
 
 
 
 
 
 
 
10
  iface.launch()
 
1
  import gradio as gr
 
2
  import nemo.collections.asr as nemo_asr
 
3
 
4
+ def transcribe(audio):
5
+ tr = model.transcribe([audio])
6
+ transcription = tr[0][0]
7
+ return transcription
8
 
9
+ model_name = "HiTZ/stt_eu_conformer_transducer_large"
10
+ model = nemo_asr.models.ASRModel.from_pretrained(model_name)
11
+
12
+ iface = gr.Interface(fn=transcribe,
13
+ inputs=[gr.Audio(type="filepath", label="Audio")],
14
+ outputs="text",
15
+ title="Speech-to-Text Transcription",
16
+ description="Transcribe speech from your audio file.")
17
  iface.launch()