Update app.py
Browse files
app.py
CHANGED
@@ -4,11 +4,16 @@ import psutil
|
|
4 |
|
5 |
import streamlit as st
|
6 |
from audio2text.a2t import A2T
|
|
|
7 |
|
8 |
def main():
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
12 |
|
13 |
if __name__ == "__main__":
|
14 |
print('RAM memory % used:', psutil.virtual_memory()[2])
|
|
|
4 |
|
5 |
import streamlit as st
|
6 |
from audio2text.a2t import A2T
|
7 |
+
from streamlit_mic_recorder import mic_recorder
|
8 |
|
9 |
def main():
|
10 |
+
mic = mic_recorder(start_prompt="Record",stop_prompt="Stop", just_once=True)
|
11 |
+
|
12 |
+
if mic is not None:
|
13 |
+
a2t = A2T(mic["bytes"])
|
14 |
+
text = a2t.predict()
|
15 |
+
st.write(text)
|
16 |
+
|
17 |
|
18 |
if __name__ == "__main__":
|
19 |
print('RAM memory % used:', psutil.virtual_memory()[2])
|