Fix incorrect assignment of 'end' attribute to 'start' in sentences list comprehension (#1680)

This commit is contained in:
nsdou 2024-05-15 17:48:37 +08:00 committed by GitHub
parent 7555b7776f
commit d50edc297a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -117,7 +117,7 @@ async def api_recognition(audio: UploadFile = File(..., description="audio file"
for sentence in rec_result["sentence_info"]:
# 每句话的时间戳
sentences.append(
{"text": sentence["text"], "start": sentence["start"], "end": sentence["start"]}
{"text": sentence["text"], "start": sentence["start"], "end": sentence["end"]}
)
ret = {"text": text, "sentences": sentences, "code": 0}
logger.info(f"识别结果:{ret}")