Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -917,13 +917,13 @@ if st.session_state["generated_questions"]:
|
|
| 917 |
st.rerun()
|
| 918 |
|
| 919 |
elif st.session_state["record_phase"] == "listening":
|
| 920 |
-
st.success("🎧 Review your response below:")
|
| 921 |
st.audio(st.session_state["response_file"], format="audio/wav")
|
|
|
|
| 922 |
if st.button("⏹️ Confirm & Next"):
|
| 923 |
st.session_state["answers"].append({
|
| 924 |
-
|
| 925 |
-
|
| 926 |
-
"response_text": st.session_state.get("recorded_text", "")
|
| 927 |
})
|
| 928 |
|
| 929 |
st.session_state.update({
|
|
@@ -931,7 +931,9 @@ if st.session_state["generated_questions"]:
|
|
| 931 |
"recording_started": False,
|
| 932 |
"question_played": False,
|
| 933 |
"question_start_time": 0.0,
|
| 934 |
-
"current_question_index": idx + 1
|
|
|
|
|
|
|
| 935 |
})
|
| 936 |
|
| 937 |
if st.session_state["current_question_index"] == len(st.session_state["generated_questions"]):
|
|
|
|
| 917 |
st.rerun()
|
| 918 |
|
| 919 |
elif st.session_state["record_phase"] == "listening":
|
| 920 |
+
st.success("🎧 Review your recorded response below:")
|
| 921 |
st.audio(st.session_state["response_file"], format="audio/wav")
|
| 922 |
+
|
| 923 |
if st.button("⏹️ Confirm & Next"):
|
| 924 |
st.session_state["answers"].append({
|
| 925 |
+
"question": question,
|
| 926 |
+
"response_file": st.session_state["response_file"]
|
|
|
|
| 927 |
})
|
| 928 |
|
| 929 |
st.session_state.update({
|
|
|
|
| 931 |
"recording_started": False,
|
| 932 |
"question_played": False,
|
| 933 |
"question_start_time": 0.0,
|
| 934 |
+
"current_question_index": idx + 1,
|
| 935 |
+
"response_file": None,
|
| 936 |
+
"audio_waiting": True
|
| 937 |
})
|
| 938 |
|
| 939 |
if st.session_state["current_question_index"] == len(st.session_state["generated_questions"]):
|