From 85e65cf9e8f9363dac1f244dbef3d21b10766590 Mon Sep 17 00:00:00 2001 From: shiyin Date: Fri, 12 Dec 2025 18:28:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=88=9D=E5=A7=8B=E5=8C=96ASR=E6=97=B6,?= =?UTF-8?q?=E5=88=A4=E6=96=ADASR=E7=B1=BB=E5=9E=8B=E5=8F=96=E5=80=BC?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/xiaozhi-server/core/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/xiaozhi-server/core/connection.py b/main/xiaozhi-server/core/connection.py index b37745c7..9805fb5e 100644 --- a/main/xiaozhi-server/core/connection.py +++ b/main/xiaozhi-server/core/connection.py @@ -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