When a dog wants to go out or wants to come out from its home when locked, it usually barks. At that time you might not be in a mode letting it release from its home or go outside. Considering the facts, a guy named David Hunt has made such a door that automatically unlocks when the dog barks.
David Hunt has dubbed the door, Pi-Rex. Hunt created Pi-Rex by using Raspberry Pi, a motor driver PCB circuit and a noise detector circuit. He puts the Raspberry Pi in the center and the motor driver PCB to the left. The PCB on the right is the audio detection circuit from Maplin. And at the bottom he used a 12V actuator. The small Printed Circuit Board (PCB) is just a voltage breakout with GND, +5v and +3.5v, to make the wiring easier. Once Raspberry Pi detects the dog’s bark with the aid of a noise detector, the PCB tells the actuator to move a metal arm, which pulls back the tongue of the door’s lock. You will find more detail on Hunt’s blog. Here’a a video for you.