this is a mess
in your pic you have speaker> resistor> leds
resistors only have two legs. I think you are looking for the word transistor, which would have three legs. BUT
you are doing direct contact off the speakers. this is exactly that. to use the speakers in that maner you must use an external switch to turn it of and on, and get rid of that transistor.
the wifi switch provides a grounding point for your leds, it is not a on/off switch if you want to use the wife switch to turn it off and on, you need to use the lm386 mod.