|
@@ -385,13 +385,17 @@ class XunfeiAsr:
|
|
|
# 测试时候在此处正确填写相关信息即可运行
|
|
|
time1 = datetime.now()
|
|
|
ws_url = self.create_url()
|
|
|
+ self.logger.info("xunfei.Asr.call_id:%s, ws_url:%s", self.__id, ws_url)
|
|
|
self.ws = websocket.WebSocketApp(ws_url, on_message=self.on_message, on_error=self.on_error, on_close=self.on_close)
|
|
|
+ self.logger.info("xunfei.Asr.call_id:%s, 111111111", self.__id)
|
|
|
self.ws.on_open = self.on_open
|
|
|
+ self.logger.info("xunfei.Asr.call_id:%s, 2222222222", self.__id)
|
|
|
self.ws.run_forever(sslopt={"cert_reqs": ssl.CERT_NONE})
|
|
|
+ self.logger.info("xunfei.Asr.call_id:%s, 3333333333", self.__id)
|
|
|
time_cost = (datetime.now() - time1)
|
|
|
- self.logger.debug(f"[{self.__id}]ASR session started. timeCost:{time_cost}, count:{count}")
|
|
|
+ self.logger.debug(f"xunfei.Asr.started. call_id:{self.__id}, timeCost:{time_cost}, count:{count}")
|
|
|
self.__event.wait(timeout=.5)
|
|
|
- self.logger.debug(f"[{self.__id}]ASR session started. {count}")
|
|
|
+ self.logger.debug(f"xunfei.Asr.started. call_id:{self.__id}, {count}")
|
|
|
except Exception as e:
|
|
|
traceback.print_exc()
|
|
|
self.logger.debug(f"[{self.__id}]ASR session start exception. {e}")
|