diff --git a/main/xiaozhi-server/core/connection.py b/main/xiaozhi-server/core/connection.py index 7543d0c5c..717a7e152 100644 --- a/main/xiaozhi-server/core/connection.py +++ b/main/xiaozhi-server/core/connection.py @@ -608,9 +608,11 @@ class ConnectionHandler: """Chat with the user and then close the connection""" try: # Use the existing chat method - self.chat(text) + if hasattr(self.tts, 'provider_name') and self.tts.provider_name == 'linkerai' and self.tts.stream_mode == 'double_stream': self.chat_double_stream(text) + else: + self.chat(text) # After chat is complete, close the connection self.close_after_chat = True