toecm commited on
Commit
9a8df4f
·
verified ·
1 Parent(s): 22c8241

Update src/ux_agent.py

Browse files
Files changed (1) hide show
  1. src/ux_agent.py +9 -6
src/ux_agent.py CHANGED
@@ -217,12 +217,15 @@ class AgentUX:
217
  transcription_result = self.input.transcribe(audio_path, language=language_code)
218
  print(f"✅ Whisper Result: {transcription_result}")
219
  transcribed_text = transcription_result[0]['text']
220
- # Inside automated_pipeline:
221
- if isinstance(transcription_result, list) and len(transcription_result) > 0:
222
- # Extract just the text from the first entry
223
- transcribed_text = transcription_result[0].get('text', str(transcription_result))
224
- else:
225
- transcribed_text = str(transcription_result)
 
 
 
226
 
227
  status_log += f"🗣️ Heard: '{transcribed_text}'\n\n"
228
 
 
217
  transcription_result = self.input.transcribe(audio_path, language=language_code)
218
  print(f"✅ Whisper Result: {transcription_result}")
219
  transcribed_text = transcription_result[0]['text']
220
+
221
+ # Inside automated_pipeline:
222
+ if isinstance(transcription_result, list) and len(transcription_result) > 0:
223
+ # Extract just the text from the first entry
224
+ transcribed_text = transcription_result[0].get('text', str(transcription_result))
225
+ else:
226
+ transcribed_text = str(transcription_result)
227
+ else:
228
+ transcribed_text = "Audio Received."
229
 
230
  status_log += f"🗣️ Heard: '{transcribed_text}'\n\n"
231