From 912cc9c48b323b0a9f8f5b78120b9936d1381523 Mon Sep 17 00:00:00 2001 From: hrz <1710360675@qq.com> Date: Tue, 4 Feb 2025 18:38:15 +0800 Subject: [PATCH] =?UTF-8?q?update:=E4=BC=98=E5=8C=96=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 ++++++++-- README_en.md | 24 +++++++++++++++++------- core/handle/textHandle.py | 2 +- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 9084b983..96e9c608 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,8 @@ pip install -r requirements.txt 配置说明:这里是各个功能使用的默认组件,例如LLM默认使用`ChatGLMLLM`模型。如果需要切换模型,就是改对应的名称。 +本项目的默认配置仅是成本最低配置(`glm-4-flash`和`EdgeTTS`都是免费的),如果需要更优的更快的搭配,需要自己结合部署环境切换各组件的使用。 + ``` selected_module: ASR: FunASR @@ -215,9 +217,13 @@ https://espressif.github.io/esp-launchpad/ ## 3、为啥我的ChatGLMLLM回复有点问题,明明它才是小智,却把我当小智。 -建议:第一步可以先`配置文件`里的调整提示词。第二步,`配置文件`中用的模型是免费的模型:`glm-4-flash`,可以考虑换成收费版本的。 +建议: 可以先修改`配置文件`里的提示词。也可以把免费的`glm-4-flash`,换成`智谱`其他收费版本的模型。 -## 4、更多问题,可联系我们反馈 +## 4、我想通过小智控制电灯、空调、远程开关机等操作。 + +建议:在配置文件里,将`LLM`设置成`DifyLLM`,然后通过`Dify`编排智能体实现。 + +## 5、更多问题,可联系我们反馈 ![图片](docs/images/wechat.jpg) diff --git a/README_en.md b/README_en.md index 543a801a..fd07e8ca 100644 --- a/README_en.md +++ b/README_en.md @@ -87,14 +87,19 @@ Download [SenseVoiceSmall](https://modelscope.cn/models/iic/SenseVoiceSmall/reso ### 4.Configure Project -Modify the `Config.yaml` file to configure the various parameters required for this project. The default LLM uses -`Chatglmllm`, you need to configure the key to start. -The default TTS uses `Edgetts`. This does not require configuration. If you need to replace it with` TTS`, you need to +Modify the `config.yaml` file to configure the various parameters required for this project. The default LLM uses +`ChatGLMLLM`, you need to configure the key to start. +The default TTS uses `EdgeTTS`. This does not require configuration. If you need to replace it with`Doubao TTS`, you +need to configure the key. -Configuration description: This is the default component of each function, such as LLM default to use the `Chatglmllm` +Configuration description: This is the default component of each function, such as LLM default to use the `ChatGLMLLM` model. If you need to switch the model, it is the corresponding name. +The default configuration of this project is only the lowest operating cost configuration(`glm-4-flash`and`EdgeTTS`are +free),If you need to be better and faster, you need to combine the use of the deployment environment to switch the use +of each component。 + ``` selected_module: ASR: FunASR @@ -225,10 +230,15 @@ changing the local model. Or try to switch different interface models. ## 3、Why is my ChatGLMLLM replying to a bit? Obviously it is Xiaozhi, but treats me as Xiaozhi. -Suggestion: The first step can be to adjust the prompt words in the configuration file. The second step, the model used -in the configuration file is the free model: `glm-4-flash`. You might consider switching to the paid version. +Suggestion: You can modify the prompts in the configuration file first. You can also replace the free `GLM-4-FLASH` to +the model of other toll versions of `ChatGlm`. -## 4、For more questions, contact us to feedback +## 4、I want to control the operation of electric lights, air conditioners, remote switching and other operations through Xiaozhi. + +Suggestion: In the configuration file, set the `LLM` to`DifyLLM`, and then arrange the smart application by the +`Dify`. + +## 5、For more questions, contact us to feedback ![图片](docs/images/wechat.jpg) diff --git a/core/handle/textHandle.py b/core/handle/textHandle.py index 3a85fdc4..27890bcc 100644 --- a/core/handle/textHandle.py +++ b/core/handle/textHandle.py @@ -19,7 +19,7 @@ async def handleTextMessage(conn, message): elif msg_json["type"] == "listen": if "mode" in msg_json: conn.client_listen_mode = msg_json["mode"] - logger.info(f"客户端拾音模式:{conn.client_listen_mode}") + logger.debug(f"客户端拾音模式:{conn.client_listen_mode}") if msg_json["state"] == "start": conn.client_have_voice = True conn.client_voice_stop = False