Update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,15 @@
|
|
1 |
import nemo.collections.asr as nemo_asr
|
2 |
import gradio as gr
|
3 |
|
|
|
|
|
4 |
def transcribe(state, file):
|
5 |
|
6 |
#if not audio:
|
7 |
# return {state_var: state, transcription_var: state}
|
8 |
-
|
9 |
|
10 |
-
transcription= asr_model.transcribe([
|
11 |
print(transcription)
|
12 |
return transcription[0]
|
13 |
|
|
|
1 |
import nemo.collections.asr as nemo_asr
|
2 |
import gradio as gr
|
3 |
|
4 |
+
asr_model = nemo_asr.models.EncDecCTCModelBPE.from_pretrained(model_name="stt_rw_conformer_ctc_large")
|
5 |
+
|
6 |
def transcribe(state, file):
|
7 |
|
8 |
#if not audio:
|
9 |
# return {state_var: state, transcription_var: state}
|
10 |
+
|
11 |
|
12 |
+
transcription= asr_model.transcribe([file])
|
13 |
print(transcription)
|
14 |
return transcription[0]
|
15 |
|