mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-24 04:19:48 +01:00
增加asr初始化ID判断
This commit is contained in:
parent
4076136fe4
commit
63d9dae18b
1 changed files with 6 additions and 0 deletions
|
|
@ -454,6 +454,12 @@ def check_asr_update(before_config, new_config):
|
|||
update_asr = False
|
||||
current_asr_module = before_config["selected_module"]["ASR"]
|
||||
new_asr_module = new_config["selected_module"]["ASR"]
|
||||
|
||||
# 如果模块名称不同,就需要更新
|
||||
if current_asr_module != new_asr_module:
|
||||
return True
|
||||
|
||||
# 如果模块名称相同,再比较类型
|
||||
current_asr_type = (
|
||||
current_asr_module
|
||||
if "type" not in before_config["ASR"][current_asr_module]
|
||||
|
|
|
|||
Loading…
Reference in a new issue