def voiceAuth(self): # Run speaker Recognition (including voice capture) successful = speaker.test(self.code) if successful is True: self.admin = self.adminDict[self.id] self.access = self.accessDict[self.id] print self.access + "," + self.admin #print str(bool(self.access))+","+str(bool(self.admin)) if self.access == "True": if self.admin == "True": #print "!!"+self.admin self.show_frame(success) else: #print "!?"+self.admin self.show_frame(success_notAdmin) else: self.admin = False self.id = -1 self.code = None self.show_frame(failure) else: self.admin = False self.id = -1 self.code = None self.show_frame(voiceCapture_again)
def voiceAuth(self): # Run speaker Recognition (including voice capture) successful = speaker.test(self.code) if successful is True: self.admin = self.adminDict[self.id] self.access = self.accessDict[self.id] print self.access+","+self.admin #print str(bool(self.access))+","+str(bool(self.admin)) if self.access=="True": if self.admin=="True": #print "!!"+self.admin self.show_frame(success) else: #print "!?"+self.admin self.show_frame(success_notAdmin) else: self.admin = False self.id = -1 self.code = None self.show_frame(failure) else: self.admin = False self.id = -1 self.code = None self.show_frame(failure)
def voiceAuth(self): # Run speaker Recognition (including voice capture) successful = speaker.test(self.code) if successful: self.admin = self.adminDict[self.id] self.access = self.accessDict[self.id] if self.access: self.show_frame(success) else: self.admin = False self.id = -1 self.code = None self.show_frame(failure) else: self.admin = False self.id = -1 self.code = None self.show_frame(failure)
print label if successful == 1 and self.id in self.codeDict: ======= if successful == 1: # TODO Find code,admin,access >>>>>>> 51cb991d2810400666b21076fe81a908c2b31d62 self.code = self.codeDict[self.id] self.show_frame(voiceCapture) else: self.id = -1 self.show_frame(failure) def voiceAuth(self): <<<<<<< HEAD # Run speaker Recognition (including voice capture) successful = speaker.test(self.code) if successful: self.admin = self.adminDict[self.id] self.access = self.accessDict[self.id] if self.access: self.show_frame(success) else self.admin = False self.id = -1 self.code = None self.show_frame(failure) ======= # TODO Run speaker Recognition (including voice capture) # success = test(self.code) success = True if success:
from speaker import test, train c = train("data/train/s9.wav") print test("data/test/s9.wav", c)