Update audio_handler.py

pull/2244/head
Zhao Yuting 2 years ago committed by GitHub
parent 092687d3f7
commit d02e04d532
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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(
{

Loading…
Cancel
Save