Spaces:
Runtime error
Runtime error
Update AICoreAGIX_with_TB.py
Browse files- 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}")
|