pull/2034/head
Hui Zhang 2 years ago
parent 5ad2f6f7fb
commit 28c1794b9b

@ -794,7 +794,7 @@ class ASRServerExecutor(ASRExecutor):
# update num_decoding_left_chunks # update num_decoding_left_chunks
if num_decoding_left_chunks: if num_decoding_left_chunks:
self.config.decode.num_decoding_left_chunks = 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 # we only support ctc_prefix_beam_search and attention_rescoring dedoding method
# Generally we set the decoding_method to attention_rescoring # Generally we set the decoding_method to attention_rescoring
if self.config.decode.decoding_method not in [ if self.config.decode.decoding_method not in [

@ -92,7 +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"]

Loading…
Cancel
Save