Raiff1982 commited on
Commit
3504539
·
verified ·
1 Parent(s): 1a738dc

Update AICoreAGIX_with_TB.py

Browse files
Files changed (1) hide show
  1. AICoreAGIX_with_TB.py +13 -1
AICoreAGIX_with_TB.py CHANGED
@@ -320,4 +320,16 @@ class AICoreAGIX:
320
  return {
321
  "codriao_to_codette": message,
322
  "codette_reply": response
323
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
320
  return {
321
  "codriao_to_codette": message,
322
  "codette_reply": response
323
+ }
324
+
325
+ async def shutdown(self):
326
+ if self.http_session and not self.http_session.closed:
327
+ await self.http_session.close()
328
+ logger.info("[Codriao]: HTTP session closed.")
329
+
330
+ if hasattr(self.speech_engine, "stop"):
331
+ try:
332
+ self.speech_engine.stop()
333
+ logger.info("[Codriao]: Speech engine stopped.")
334
+ except Exception as e:
335
+ logger.warning(f"[Codriao]: Failed to stop speech engine: {e}")