File size: 586 Bytes
ac852e1
 
 
128d7a2
 
 
 
ac852e1
537f7b3
5566261
128d7a2
 
 
 
 
 
ac852e1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gradio as gr
import nemo.collections.asr as nemo_asr

def transcribe(audio):
    tr = model.transcribe([audio])
    transcription = tr[0][0]
    return transcription

model_name = "HiTZ/stt_eu_conformer_transducer_large"
model = nemo_asr.models.ASRModel.from_pretrained(model_name)

iface = gr.Interface(fn=transcribe, 
                     inputs=[gr.Audio(type="filepath", label="Audio")], 
                     outputs="text",
                     title="Speech-to-Text Transcription",
                     description="Transcribe speech from your audio file.")
iface.launch()