diff --git a/paddlespeech/server/engine/asr/online/asr_engine.py b/paddlespeech/server/engine/asr/online/asr_engine.py index 0c5e4586e47a0e9f70827879448db5d1d51645b0..ec19aaf167d35fb54dc22a8dc82e3ba1109a7016 100644 --- a/paddlespeech/server/engine/asr/online/asr_engine.py +++ b/paddlespeech/server/engine/asr/online/asr_engine.py @@ -794,7 +794,7 @@ class ASRServerExecutor(ASRExecutor): # update num_decoding_left_chunks if num_decoding_left_chunks: self.config.decode.num_decoding_left_chunks = num_decoding_left_chunks - assert self.config.decode.num_decoding_left_chunks == -1 or self.config.decode.num_decoding_left_chunks >= 0, f"num_decoding_left_chunks should be -1 or >=0" + assert self.config.decode.num_decoding_left_chunks == -1 or self.config.decode.num_decoding_left_chunks >= 0, "num_decoding_left_chunks should be -1 or >=0" # we only support ctc_prefix_beam_search and attention_rescoring dedoding method # Generally we set the decoding_method to attention_rescoring if self.config.decode.decoding_method not in [ diff --git a/paddlespeech/server/ws/asr_api.py b/paddlespeech/server/ws/asr_api.py index 23609b41ae1c91afb64221c0c1d1024be75746bd..ae1c8831077dee41e9336ea1d96fb279fd5b2fb8 100644 --- a/paddlespeech/server/ws/asr_api.py +++ b/paddlespeech/server/ws/asr_api.py @@ -92,7 +92,7 @@ async def websocket_endpoint(websocket: WebSocket): else: resp = {"status": "ok", "message": "no valid json data"} await websocket.send_json(resp) - + elif "bytes" in message: # bytes for the pcm data message = message["bytes"]