Spaces:
Building
Building
Update websocket_handler.py
Browse files- websocket_handler.py +6 -6
websocket_handler.py
CHANGED
@@ -218,12 +218,12 @@ class RealtimeSession:
|
|
218 |
|
219 |
log_info("β
STT streaming started successfully", session_id=self.session.session_id)
|
220 |
return True
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
|
228 |
async def change_state(self, new_state: ConversationState):
|
229 |
"""Change conversation state"""
|
|
|
218 |
|
219 |
log_info("β
STT streaming started successfully", session_id=self.session.session_id)
|
220 |
return True
|
221 |
+
|
222 |
+
except Exception as e:
|
223 |
+
log_error(f"β Failed to initialize STT", error=str(e), traceback=traceback.format_exc(), session_id=self.session.session_id)
|
224 |
+
self.stt_manager = None
|
225 |
+
self.is_streaming = False
|
226 |
+
return False
|
227 |
|
228 |
async def change_state(self, new_state: ConversationState):
|
229 |
"""Change conversation state"""
|