Grove Sound Recorder: PLAY/REC Switching from Manual to Digital 

While trying to decipher how to bypass a manual switch with a digital gate, I found transistors to be helpful, but for the sound recorder itself.
First I tried to switch an LED on/off. Here is a photo of the LED circuit.
Then I tried to replace the play/ record switch in the sound recorder with two transistors, with this schematic:
But I had no luck!
This was the code I used:
You will need the library