Exemplo n.º 1
0
 def reload(self):
     """ 重新初始化 """
     try:
         self.asr = ASR.get_engine_by_slug(config.get('asr_engine', 'tencent-asr'))
         self.ai = AI.get_robot_by_slug(config.get('robot', 'tuling'))
         self.tts = TTS.get_engine_by_slug(config.get('tts_engine', 'baidu-tts'))
     except Exception as e:
         logger.critical("对话初始化失败:{}".format(e))
Exemplo n.º 2
0
 def reload(self):
     """ 重新初始化 """
     try:
         self.asr = ASR.get_engine_by_slug(config.get('asr_engine', 'tencent-asr'))
         self.ai = AI.get_robot_by_slug(config.get('robot', 'tuling'))
         self.tts = TTS.get_engine_by_slug(config.get('tts_engine', 'baidu-tts'))
         self.nlu = NLU.get_engine_by_slug(config.get('nlu_engine', 'unit'))
         self.player = None
         self.brain = Brain(self)
         self.brain.printPlugins()
     except Exception as e:
         logger.critical("对话初始化失败:{}".format(e))
Exemplo n.º 3
0
 def reInit(self):
     """重新初始化"""
     try:
         self.asr = ASR.get_engine_by_slug(
             config.get("asr_engine", "tencent-asr"))
         self.ai = AI.get_robot_by_slug(config.get("robot", "tuling"))
         self.tts = TTS.get_engine_by_slug(
             config.get("tts_engine", "baidu-tts"))
         self.nlu = NLU.get_engine_by_slug(config.get("nlu_engine", "unit"))
         self.player = None
         self.brain = Brain(self)
         self.brain.printPlugins()
     except Exception as e:
         logger.critical("对话初始化失败:{}".format(e))
Exemplo n.º 4
0
def init():
    global asr, ai, tts
    config.init()
    asr = ASR.get_engine_by_slug(config.get('asr_engine', 'tencent-asr'))
    ai = AI.get_robot_by_slug(config.get('robot', 'tuling'))
    tts = TTS.get_engine_by_slug(config.get('tts_engine', 'baidu-tts'))