haepada commited on
Commit
b729fab
·
verified ·
1 Parent(s): 855e809

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -15
app.py CHANGED
@@ -1129,7 +1129,7 @@ def create_interface():
1129
  try:
1130
  # 상태 업데이트
1131
  status_msg = "음성 분석 중..."
1132
-
1133
  # 음성 데이터 전처리
1134
  sr, y = audio_data
1135
  if len(y) == 0:
@@ -1141,13 +1141,13 @@ def create_interface():
1141
  "",
1142
  "분석 실패"
1143
  )
1144
-
1145
  status_msg = "음성 특성 분석 중..."
1146
  acoustic_features = calculate_baseline_features((sr, y))
1147
-
1148
  status_msg = "음성 인식 중..."
1149
  new_state, text, voice_result, text_result, prompt = analyze_voice(audio_data, state)
1150
-
1151
  status_msg = "분석 완료"
1152
  return (
1153
  new_state,
@@ -1157,17 +1157,17 @@ def create_interface():
1157
  prompt,
1158
  status_msg
1159
  )
1160
-
1161
- except Exception as e:
1162
- print(f"Voice analysis error: {str(e)}")
1163
- return (
1164
- state,
1165
- "음성 분석 중 오류가 발생했습니다. 다시 시도해주세요.",
1166
- "",
1167
- "",
1168
- "",
1169
- "분석 실패"
1170
- )
1171
  # 이벤트 연결
1172
  name_submit_btn.click(
1173
  fn=handle_name_submit,
 
1129
  try:
1130
  # 상태 업데이트
1131
  status_msg = "음성 분석 중..."
1132
+
1133
  # 음성 데이터 전처리
1134
  sr, y = audio_data
1135
  if len(y) == 0:
 
1141
  "",
1142
  "분석 실패"
1143
  )
1144
+
1145
  status_msg = "음성 특성 분석 중..."
1146
  acoustic_features = calculate_baseline_features((sr, y))
1147
+
1148
  status_msg = "음성 인식 중..."
1149
  new_state, text, voice_result, text_result, prompt = analyze_voice(audio_data, state)
1150
+
1151
  status_msg = "분석 완료"
1152
  return (
1153
  new_state,
 
1157
  prompt,
1158
  status_msg
1159
  )
1160
+
1161
+ except Exception as e:
1162
+ print(f"Voice analysis error: {str(e)}")
1163
+ return (
1164
+ state,
1165
+ "음성 분석 중 오류가 발생했습니다. 다시 시도해주세요.",
1166
+ "",
1167
+ "",
1168
+ "",
1169
+ "분석 실패"
1170
+ )
1171
  # 이벤트 연결
1172
  name_submit_btn.click(
1173
  fn=handle_name_submit,