def enrollVoice(self): # Voice enrollment code goes here self.newCode = speaker.train() # Save data to dictionary and storage self.adminDict[self.newID] = self.newAdmin self.accessDict[self.newID] = self.newAccess self.codeDict[self.newID] = self.newCode self.show_frame(authDisclaim) np.save('Arrays/{}'.format(self.newID),self.newCode) tree = ET.parse('voicedata.xml') root = tree.getroot() element = ET.SubElement(root,'s'+str(self.newID),admin=str(self.newAdmin),access=str(self.newAccess)) tree.write('voicedata.xml')
def enrollVoice(self): # Voice enrollment code goes here self.newCode = speaker.train() # Save data to dictionary and storage self.adminDict[self.newID] = self.newAdmin self.accessDict[self.newID] = self.newAccess self.codeDict[self.newID] = self.newCode self.show_frame(authDisclaim) np.save('Arrays/{}'.format(self.newID), self.newCode) tree = ET.parse('voicedata.xml') root = tree.getroot() element = ET.SubElement(root, 's' + str(self.newID), admin=str(self.newAdmin), access=str(self.newAccess)) tree.write('voicedata.xml')
self.show_frame(enrollFace) def enroll(self): name = "Kaylee Ye" <<<<<<< HEAD self.newID = FaceRecognizer.LBPHupdate(name) print self.newID ======= FaceRecognizer.LBPHupdate(name) >>>>>>> 51cb991d2810400666b21076fe81a908c2b31d62 self.show_frame(enrollVoice) def enrollVoice(self): # Voice enrollment code goes here <<<<<<< HEAD self.newCode = speaker.train() ======= # self.newCode = train() >>>>>>> 51cb991d2810400666b21076fe81a908c2b31d62 # Save data to dictionary and storage self.adminDict[self.newID] = self.newAdmin self.accessDict[self.newID] = self.newAccess self.codeDict[self.newID] = self.newCode self.show_frame(faceCapture) def faceAuth(self): # Facial Recognition # successful=fr.Authenticate() #Add id successful,label = FaceRecognizer.Authenticate() self.id=label
from speaker import test, train c = train("data/train/s9.wav") print test("data/test/s9.wav", c)