mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-24 04:19:48 +01:00
fix:初始化ASR时,判断ASR类型取值错误修复
This commit is contained in:
parent
41887ef431
commit
85e65cf9e8
1 changed files with 1 additions and 1 deletions
|
|
@ -496,7 +496,7 @@ class ConnectionHandler:
|
|||
|
||||
def _initialize_asr(self):
|
||||
"""初始化ASR"""
|
||||
if self._asr.interface_type == InterfaceType.LOCAL:
|
||||
if self._asr is not None and hasattr(self._asr, "interface_type") and self._asr.interface_type == InterfaceType.LOCAL:
|
||||
# 如果公共ASR是本地服务,则直接返回
|
||||
# 因为本地一个实例ASR,可以被多个连接共享
|
||||
asr = self._asr
|
||||
|
|
|
|||
Loading…
Reference in a new issue