def main(): while (True): if (srn.sound_recognize().sound_recognize(3)): pass else: continue results = roxf.integration_from_nao() roxf.str_sclassification(results)
def onSoundLocated(self, eventName, value, subscriberIdentifier): print("已经检测到地理位置") print(eventName) print(value) print(subscriberIdentifier) if (self.onplay_flag): return else: self.onplay_flag = True self.sound_record.sound_record_stop() result = toxf.integration_from_nao() toxf.str_sclassification(result) self.sound_record.sound_record_start() self.onplay_flag = False
def onFrontTactilTouched(self, strVarName, value): # to avoid repetitions print("还是不一样的") print(value) if (value > 0.5): if (self.Flag): self.Flag = False sound_record.sound_record_start() else: self.Flag = True sound_record.sound_record_stop() file_transport.transit_to_c() s = toxf.sendfile_to_service() toxf.str_sclassification(s) print(strVarName) print(self.Flag)
def interact(): while (True): print('开始') localtime = time.localtime(time.time()) print "本地时间为 :", localtime result = ro.integration_from_nao() ti = ro.str_sclassification(result) print('中止') localtime = time.localtime(time.time()) print "本地时间为 :", localtime
def onFrontTactilTouched(self, strVarName, value): # to avoid repetitions print("还是不一样的") print(value) if (value > 0.5): if (self.Flag): print("开始") self.Flag = False self.sound_record.sound_record_start() else: self.Flag = True print("结束") self.sound_record.sound_record_stop() file_transport.transit_to_c() s = toxf.sendfile_to_service() toxf.str_sclassification(s) data = memory.getData("WordRecognized") print("居然还检测到了数据data: %s" % data) print(data) print(strVarName) print(self.Flag)