Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -84,7 +84,8 @@ def text_to_speech(text, speed=1.3):
|
|
84 |
|
85 |
def main():
|
86 |
st.title("Chatbot de Voz a Voz")
|
87 |
-
|
|
|
88 |
|
89 |
if not audio_data.empty():
|
90 |
st.audio(audio_data.export().read(), format="audio/wav")
|
@@ -92,11 +93,9 @@ def main():
|
|
92 |
audio_text = recognize_speech("audio.wav")
|
93 |
|
94 |
if audio_text:
|
|
|
95 |
output, audio_file = generate(audio_text, history=st.session_state.history)
|
96 |
|
97 |
-
if audio_text:
|
98 |
-
st.session_state.history.append((audio_text, output))
|
99 |
-
|
100 |
if audio_file is not None:
|
101 |
st.markdown(
|
102 |
f"""
|
|
|
84 |
|
85 |
def main():
|
86 |
st.title("Chatbot de Voz a Voz")
|
87 |
+
st.info("Habla para grabar...")
|
88 |
+
audio_data = audiorecorder("Escuchando...", "Deteniendo la grabaci贸n...")
|
89 |
|
90 |
if not audio_data.empty():
|
91 |
st.audio(audio_data.export().read(), format="audio/wav")
|
|
|
93 |
audio_text = recognize_speech("audio.wav")
|
94 |
|
95 |
if audio_text:
|
96 |
+
st.success("Frase detectada. Procesando audio...")
|
97 |
output, audio_file = generate(audio_text, history=st.session_state.history)
|
98 |
|
|
|
|
|
|
|
99 |
if audio_file is not None:
|
100 |
st.markdown(
|
101 |
f"""
|