diff --git a/config.py b/config.py index 94c31af..4fbb331 100644 --- a/config.py +++ b/config.py @@ -123,7 +123,7 @@ put your new bing cookies here """ -# 阿里云实时语音识别 配置门槛较高 限高级用户使用 参考 https://help.aliyun.com/document_detail/450255.html +# 阿里云实时语音识别 配置难度较高 仅建议高手用户使用 参考 https://help.aliyun.com/document_detail/450255.html ENABLE_AUDIO = False ALIYUN_TOKEN="" # 例如 f37f30e0f9934c34a992f6f64f7eba4f ALIYUN_APPKEY="" # 例如 RoPlZrM88DnAFkZK \ No newline at end of file diff --git a/crazy_functional.py b/crazy_functional.py index 431a2e6..060502e 100644 --- a/crazy_functional.py +++ b/crazy_functional.py @@ -418,14 +418,17 @@ def get_crazy_functions(): try: - from crazy_functions.语音助手 import 语音助手 - function_plugins.update({ - "实时音频采集": { - "Color": "stop", - "AsButton": True, - "Function": HotReload(语音助手) - } - }) + from toolbox import get_conf + ENABLE_AUDIO, = get_conf('ENABLE_AUDIO') + if ENABLE_AUDIO: + from crazy_functions.语音助手 import 语音助手 + function_plugins.update({ + "实时音频采集": { + "Color": "stop", + "AsButton": True, + "Function": HotReload(语音助手) + } + }) except: print('Load function plugin failed') diff --git a/main.py b/main.py index a9ce90e..03a6c5d 100644 --- a/main.py +++ b/main.py @@ -16,7 +16,7 @@ def main(): from check_proxy import get_current_version from theme.theme import adjust_theme, advanced_css, theme_declaration initial_prompt = "Serve me as a writing and programming assistant." - title_html = f"