salomonsky commited on
Commit
e9ba3a2
verified
1 Parent(s): 5d744dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -6,6 +6,9 @@ from gtts import gTTS
6
  from audiorecorder import audiorecorder
7
  import speech_recognition as sr
8
 
 
 
 
9
  def recognize_speech(audio_data, show_messages=True):
10
  recognizer = sr.Recognizer()
11
  audio_recording = sr.AudioFile(audio_data)
@@ -73,10 +76,8 @@ def text_to_speech(text, speed=1.3):
73
  audio_fp.seek(0)
74
  return audio_fp
75
 
76
- def main():
77
- if "history" not in st.session_state:
78
- st.session_state.history = []
79
 
 
80
  audio_data = audiorecorder("Habla para grabar", "Deteniendo la grabaci贸n...")
81
 
82
  if not audio_data.empty():
 
6
  from audiorecorder import audiorecorder
7
  import speech_recognition as sr
8
 
9
+ if "history" not in st.session_state:
10
+ st.session_state.history = []
11
+
12
  def recognize_speech(audio_data, show_messages=True):
13
  recognizer = sr.Recognizer()
14
  audio_recording = sr.AudioFile(audio_data)
 
76
  audio_fp.seek(0)
77
  return audio_fp
78
 
 
 
 
79
 
80
+ def main():
81
  audio_data = audiorecorder("Habla para grabar", "Deteniendo la grabaci贸n...")
82
 
83
  if not audio_data.empty():