Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -28,10 +28,10 @@ def recognize_speech(audio_data, show_messages=True):
|
|
28 |
st.write(audio_text)
|
29 |
st.success("Reconocimiento de voz completado.")
|
30 |
except sr.UnknownValueError:
|
31 |
-
st.warning("
|
32 |
audio_text = ""
|
33 |
except sr.RequestError:
|
34 |
-
st.error("
|
35 |
audio_text = ""
|
36 |
|
37 |
return audio_text
|
@@ -96,6 +96,9 @@ def display_recognition_result(audio_text, output, audio_file):
|
|
96 |
unsafe_allow_html=True)
|
97 |
|
98 |
def main():
|
|
|
|
|
|
|
99 |
audio_bytes = audio_recorder(text="", recording_color="#A52A2A", neutral_color="#FFFFFF",)
|
100 |
|
101 |
if audio_bytes:
|
|
|
28 |
st.write(audio_text)
|
29 |
st.success("Reconocimiento de voz completado.")
|
30 |
except sr.UnknownValueError:
|
31 |
+
st.warning("Habla mas claro, cerca del micr贸fono.")
|
32 |
audio_text = ""
|
33 |
except sr.RequestError:
|
34 |
+
st.error("Presiona el boton y habla!")
|
35 |
audio_text = ""
|
36 |
|
37 |
return audio_text
|
|
|
96 |
unsafe_allow_html=True)
|
97 |
|
98 |
def main():
|
99 |
+
if not st.session_state.pre_prompt_sent:
|
100 |
+
st.session_state.pre_prompt_sent = True
|
101 |
+
|
102 |
audio_bytes = audio_recorder(text="", recording_color="#A52A2A", neutral_color="#FFFFFF",)
|
103 |
|
104 |
if audio_bytes:
|