Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,7 +27,7 @@ def asr_transcript(audio):
|
|
| 27 |
data={}
|
| 28 |
if audio:
|
| 29 |
text_asr = asr_model.transcribe_file(audio.name)
|
| 30 |
-
text_nemo_trasducer = transcribe(audio, "stt_rw_conformer_ctc_large")
|
| 31 |
with open(audio.name,'rb') as f:
|
| 32 |
audio_proper = f.read()
|
| 33 |
stt_engine = SpeechToTextEngine()
|
|
@@ -39,8 +39,7 @@ def asr_transcript(audio):
|
|
| 39 |
# Running the transcription
|
| 40 |
text_coqui = stt_engine.run(audio_proper)
|
| 41 |
|
| 42 |
-
return text_asr.lower() , text_coqui
|
| 43 |
-
else:
|
| 44 |
return "File not valid"
|
| 45 |
|
| 46 |
gradio_ui = gr.Interface(
|
|
@@ -52,8 +51,7 @@ gradio_ui = gr.Interface(
|
|
| 52 |
""",
|
| 53 |
inputs=[ gr.inputs.Audio(label="Upload Audio File", type="file", optional=False)],
|
| 54 |
outputs=[gr.outputs.Textbox(label="Recognized speech from speechbrain model"),
|
| 55 |
-
gr.outputs.Textbox(label="Recognized speech from coqui STT model")
|
| 56 |
-
gr.outputs.Textbox(label="Recognized speech from NVIDIA conformer ctc large model")]
|
| 57 |
# examples = [["sample_1.wav"],["sample_2.wav"]]
|
| 58 |
)
|
| 59 |
|
|
|
|
| 27 |
data={}
|
| 28 |
if audio:
|
| 29 |
text_asr = asr_model.transcribe_file(audio.name)
|
| 30 |
+
#text_nemo_trasducer = transcribe(audio, "stt_rw_conformer_ctc_large")
|
| 31 |
with open(audio.name,'rb') as f:
|
| 32 |
audio_proper = f.read()
|
| 33 |
stt_engine = SpeechToTextEngine()
|
|
|
|
| 39 |
# Running the transcription
|
| 40 |
text_coqui = stt_engine.run(audio_proper)
|
| 41 |
|
| 42 |
+
return text_asr.lower() , text_coqui
|
|
|
|
| 43 |
return "File not valid"
|
| 44 |
|
| 45 |
gradio_ui = gr.Interface(
|
|
|
|
| 51 |
""",
|
| 52 |
inputs=[ gr.inputs.Audio(label="Upload Audio File", type="file", optional=False)],
|
| 53 |
outputs=[gr.outputs.Textbox(label="Recognized speech from speechbrain model"),
|
| 54 |
+
gr.outputs.Textbox(label="Recognized speech from coqui STT model")]
|
|
|
|
| 55 |
# examples = [["sample_1.wav"],["sample_2.wav"]]
|
| 56 |
)
|
| 57 |
|