def load_unit(path): with open(path, 'rb') as f: data = pickle.load(f) conf = make_conf(dict_to_object(data['conf'])) unit = TimeUnit(conf, data=data['unit']) return unit
def run(): conf = make_conf(audio_conf) unit = TimeUnit(conf) teach_unit(unit)