提交 262f42d4 编写于 作者: H Hui Zhang

do not reset result for web ws api

上级 3a05d0a2
...@@ -4,6 +4,6 @@ export CUDA_VISIBLE_DEVICE=0,1,2,3 ...@@ -4,6 +4,6 @@ export CUDA_VISIBLE_DEVICE=0,1,2,3
# nohup python3 punc_server.py --config_file conf/punc_application.yaml > punc.log 2>&1 & # nohup python3 punc_server.py --config_file conf/punc_application.yaml > punc.log 2>&1 &
paddlespeech_server start --config_file conf/punc_application.yaml &> punc.log & paddlespeech_server start --config_file conf/punc_application.yaml &> punc.log &
# nohup python3 streaming_asr_server.py --config_file conf/ws_conformer_application.yaml > streaming_asr.log 2>&1 & # nohup python3 streaming_asr_server.py --config_file conf/ws_conformer_wenetspeech_application.yaml > streaming_asr.log 2>&1 &
paddlespeech_server start --config_file conf/ws_conformer_application.yaml &> streaming_asr.log & paddlespeech_server start --config_file conf/ws_conformer_wenetspeech_application.yaml &> streaming_asr.log &
...@@ -161,7 +161,9 @@ class PaddleASRConnectionHanddler: ...@@ -161,7 +161,9 @@ class PaddleASRConnectionHanddler:
self.model_reset() self.model_reset()
self.searcher.reset() self.searcher.reset()
self.endpointer.reset() self.endpointer.reset()
self.output_reset()
# reset hys will trancate history transcripts.
# self.output_reset()
def reset(self): def reset(self):
if "deepspeech2" in self.model_type: if "deepspeech2" in self.model_type:
......
...@@ -92,6 +92,7 @@ async def websocket_endpoint(websocket: WebSocket): ...@@ -92,6 +92,7 @@ async def websocket_endpoint(websocket: WebSocket):
else: else:
resp = {"status": "ok", "message": "no valid json data"} resp = {"status": "ok", "message": "no valid json data"}
await websocket.send_json(resp) await websocket.send_json(resp)
elif "bytes" in message: elif "bytes" in message:
# bytes for the pcm data # bytes for the pcm data
message = message["bytes"] message = message["bytes"]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册