The lock part is easy, as there are a variety of electrical locks (basically just a solenoid). The voice recognition is hard and you'll likely need some significant software skills to get something working reliably and with vanishingly small errors. You might find it much easier to use some other kind of unlocking function -- for example, use someone's fingerprint, as the hardware for those detectors are available. You might even find that recognizing a video image of the person at the door might be doable with some software that's out there on the web (I'm assuming some research group somewhere has put some open source stuff out there). But, again, these tasks might take some significant software ability.