Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
import torch
|
2 |
from transformers import pipeline
|
3 |
import streamlit as st
|
4 |
from st_audiorec import st_audiorec
|
@@ -16,12 +15,13 @@ def make_text(audio):
|
|
16 |
return extract_text
|
17 |
|
18 |
st.title('speech recognition')
|
19 |
-
|
20 |
-
|
|
|
|
|
21 |
|
22 |
-
|
23 |
-
text=make_text(wave_audio_data)
|
24 |
|
25 |
-
|
26 |
-
else:
|
27 |
-
|
|
|
|
|
1 |
from transformers import pipeline
|
2 |
import streamlit as st
|
3 |
from st_audiorec import st_audiorec
|
|
|
15 |
return extract_text
|
16 |
|
17 |
st.title('speech recognition')
|
18 |
+
with st.form(key='record audio'):
|
19 |
+
wave_audio_data=st_audiorec()
|
20 |
+
button=st.form_submit_button(label='Convert to Text')
|
21 |
+
if button:
|
22 |
|
23 |
+
text=make_text(wave_audio_data)
|
|
|
24 |
|
25 |
+
st.write(text)
|
26 |
+
else:
|
27 |
+
st.success('No Audio data yet')
|