mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
websocket 2pass bugfix
This commit is contained in:
parent
7eaf608c2d
commit
219c2482ab
@ -170,8 +170,9 @@ async def async_asr(websocket, audio_in):
|
||||
rec_result = inference_pipeline_punc(text_in=rec_result['text'],
|
||||
param_dict=websocket.param_dict_punc)
|
||||
# print("offline", rec_result)
|
||||
message = json.dumps({"mode": "2pass-offline", "text": rec_result["text"], "wav_name": websocket.wav_name})
|
||||
await websocket.send(message)
|
||||
if 'text' in rec_result:
|
||||
message = json.dumps({"mode": "2pass-offline", "text": rec_result["text"], "wav_name": websocket.wav_name})
|
||||
await websocket.send(message)
|
||||
|
||||
|
||||
async def async_asr_online(websocket, audio_in):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user