Below is my hardware environment
Hardware needed:
1.Raspberrypi 4B
2.a sound recording device
3.a picamera
Below is my software environment
Software needed:
1.python 2.7
2.pip install pyaudio (with apt install portaudio19-dev needed)
3.pip install rpi.gpio