def __init__(self, cfg, commands, dialogue_act_in, text_out, close_event): multiprocessing.Process.__init__(self) self.cfg = cfg self.commands = commands self.dialogue_act_in = dialogue_act_in self.text_out = text_out self.close_event = close_event nlg_type = get_nlg_type(cfg) self.nlg = nlg_factory(nlg_type, cfg)
def __init__(self, cfg, tts_preproc_output=False): super(TextHub, self).__init__(cfg) self.slu = None self.dm = None self.nlg = None self.tts = None self.slu = slu_factory(cfg) dm_type = get_dm_type(cfg) self.dm = dm_factory(dm_type, cfg) self.dm.new_dialogue() nlg_type = get_nlg_type(cfg) self.nlg = nlg_factory(nlg_type, cfg) if tts_preproc_output: tts_type = get_tts_type(cfg) self.tts = tts_factory(tts_type, cfg)