From 7fe7ae5b497dfc633d6e7d3954bfb884b19dc169 Mon Sep 17 00:00:00 2001 From: DinoMalin Date: Fri, 7 Mar 2025 16:13:06 +0100 Subject: [PATCH] feat: finitions --- .env.example | 2 ++ ai.py | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index f5a5479..f394492 100644 --- a/.env.example +++ b/.env.example @@ -1 +1,3 @@ OPENAI_API_KEY=... +SPEECH_KEY=... +REGION=... diff --git a/ai.py b/ai.py index 35e2c87..5f05076 100644 --- a/ai.py +++ b/ai.py @@ -112,10 +112,12 @@ def ask_ai(prompt): print(data["emotion"]) print(data["score"]) -i = 0 -while True: - ask_ai(listen_voice()) - i += 1 + +try: + while True: + ask_ai(listen_voice()) +except: + print("Program stopped.") # send_emotion("Complice")