def __init__(self, cfg, commands, text_in, audio_out, close_event): multiprocessing.Process.__init__(self) self.cfg = cfg self.commands = commands self.text_in = text_in self.audio_out = audio_out self.close_event = close_event tts_type = get_tts_type(cfg) self.tts = tts_factory(tts_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)