未验证 提交 d02e04d5 编写于 作者: Z Zhao Yuting 提交者: GitHub

Update audio_handler.py

上级 092687d3
......@@ -167,11 +167,11 @@ class ASRWsAudioHandler:
await ws.send(chunk_data.tobytes())
msg = await ws.recv()
msg = json.loads(msg)
if self.punc_server and len(msg["result"]) > 0:
msg["result"] = self.punc_server.run(msg["result"])
logger.info("client receive msg={}".format(msg))
#client start to punctuation restore
if self.punc_server and len(msg['result']) > 0:
msg["result"] = self.punc_server.run(msg["result"])
logger.info("client punctuation restored msg={}".format(msg))
# 4. we must send finished signal to the server
audio_info = json.dumps(
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册