From 67165e4cf54cb3132f9caf9a77c786a341c5de19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8C=AA=E9=BA=A6?= Date: Wed, 29 Oct 2025 17:40:47 +0800 Subject: [PATCH] [Fix] asr finished in on_event --- dashscope/audio/asr/recognition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashscope/audio/asr/recognition.py b/dashscope/audio/asr/recognition.py index 7728981..1a20104 100644 --- a/dashscope/audio/asr/recognition.py +++ b/dashscope/audio/asr/recognition.py @@ -189,7 +189,7 @@ def __receive_worker(self): responses = self.__launch_request() for part in responses: if part.status_code == HTTPStatus.OK: - if len(part.output) == 0: + if len(part.output) == 0 or ('finished' in part.output and part.output['finished'] == True): self._on_complete_timestamp = time.time() * 1000 logger.debug('last package delay {}'.format( self.get_last_package_delay()))