Skip to content

Commit a26ab52

Browse files
lengjiayikevinlin09
authored andcommitted
[Fix] asr finished in on_event
1 parent df33bfc commit a26ab52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dashscope/audio/asr/recognition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def __receive_worker(self):
189189
responses = self.__launch_request()
190190
for part in responses:
191191
if part.status_code == HTTPStatus.OK:
192-
if len(part.output) == 0:
192+
if len(part.output) == 0 or ('finished' in part.output and part.output['finished'] == True):
193193
self._on_complete_timestamp = time.time() * 1000
194194
logger.debug('last package delay {}'.format(
195195
self.get_last_package_delay()))

0 commit comments

Comments
 (0)