From 932f44a6c10be17d1639b00d04668bd23065df65 Mon Sep 17 00:00:00 2001 From: ikaros <327209194@qq.com> Date: Sun, 17 Dec 2023 21:10:44 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E6=9E=81=E5=9C=B0?= =?UTF-8?q?=E6=9E=81=E5=85=89UI=E9=85=8D=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.json | 5 +++++ config.json.bak | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/config.json b/config.json index 4f3c05b9..90c4ce13 100644 --- a/config.json +++ b/config.json @@ -980,6 +980,11 @@ "login_card": "width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;position: fixed;left: 0;top: 0;", "tab_panel": "", "card": "margin:10px 0px;" + }, + "极地极光": { + "login_card": "background:linear-gradient(45deg, #027333, #025959);width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;position: fixed;left: 0;top: 0;", + "tab_panel": "background: linear-gradient(45deg, #027333, #025959);", + "card": "margin:10px 0px;background: linear-gradient(45deg, #027333, #04D939);" } } } diff --git a/config.json.bak b/config.json.bak index 4f3c05b9..90c4ce13 100644 --- a/config.json.bak +++ b/config.json.bak @@ -980,6 +980,11 @@ "login_card": "width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;position: fixed;left: 0;top: 0;", "tab_panel": "", "card": "margin:10px 0px;" + }, + "极地极光": { + "login_card": "background:linear-gradient(45deg, #027333, #025959);width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;position: fixed;left: 0;top: 0;", + "tab_panel": "background: linear-gradient(45deg, #027333, #025959);", + "card": "margin:10px 0px;background: linear-gradient(45deg, #027333, #04D939);" } } } From 8c0b8e9d84b82d461ad86a9f3a3a4c0299857b3a Mon Sep 17 00:00:00 2001 From: ikaros <327209194@qq.com> Date: Sun, 17 Dec 2023 21:11:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dapi=20=E8=81=8A=E5=A4=A9?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E7=9B=B8=E5=85=B3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/api.py b/api.py index 8ba8dd60..86b68f5d 100644 --- a/api.py +++ b/api.py @@ -1,6 +1,6 @@ import logging, os, sys, json import threading -import schedule +import schedule, time import random import aiohttp, asyncio import traceback @@ -1394,9 +1394,11 @@ def run_live(self): # 冷却时间 0.3 秒 cooldown = 0.3 last_pressed = 0 + + stop_do_listen_and_comment_thread_event = threading.Event() - signal.signal(signal.SIGINT, exit_handler) - signal.signal(signal.SIGTERM, exit_handler) + # signal.signal(signal.SIGINT, exit_handler) + # signal.signal(signal.SIGTERM, exit_handler) # 录音功能(录音时间过短进入openai的语音转文字会报错,请一定注意) def record_audio(): @@ -2026,7 +2028,7 @@ def sys_cmd(): if data_json['type'] == 'run': """ { - "type": "factory", + "type": "run", "data": { "config_path": "config.json" } @@ -2037,7 +2039,7 @@ def sys_cmd(): elif data_json['type'] =='stop': """ { - "type": "factory", + "type": "stop", "data": { "config_path": "config.json" }