ThatOneCoder commited on
Commit
c749462
·
verified ·
1 Parent(s): ec663e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -16
app.py CHANGED
@@ -1,22 +1,11 @@
1
  import streamlit as st
2
  from streamlit_mic_recorder import mic_recorder,speech_to_text
3
 
4
- #text=speech_to_text(language='en',use_container_width=True,just_once=True,key='STT')
5
 
6
- #if text:
7
- #state.text_received.append(text)
8
 
9
- #for text in state.text_received:
10
- #st.write(text)
11
 
12
- audio = mic_recorder(
13
- start_prompt="Start recording",
14
- stop_prompt="Stop recording",
15
- just_once=False,
16
- use_container_width=False,
17
- callback=None,
18
- args=(),
19
- kwargs={},
20
- key=None
21
- )
22
- st.write(audio)
 
1
  import streamlit as st
2
  from streamlit_mic_recorder import mic_recorder,speech_to_text
3
 
4
+ text=speech_to_text(language='en',use_container_width=True,just_once=True,key='STT')
5
 
6
+ if text:
7
+ state.text_received.append(text)
8
 
9
+ for text in state.text_received:
10
+ st.write(text)
11