CineAI commited on
Commit
cd60f99
1 Parent(s): 8d3b844

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
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
- a2t = A2T()
10
- text = a2t.get_text()
11
- st.write(text)
 
 
 
 
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])