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" } 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);" } } }