Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
7 |
-
|
|
|
|
|
8 |
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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()
|