|
|
@@ -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):
|